diff --git a/doc/installation/checkInstallation.html b/doc/installation/checkInstallation.html index 57b56d96..d9e06d5d 100644 --- a/doc/installation/checkInstallation.html +++ b/doc/installation/checkInstallation.html @@ -91,311 +91,311 @@

SOURCE CODE ^%Get the RAVEN path 0030 [ST, I]=dbstack('-completenames'); 0031 [ravenDir,~,~]=fileparts(fileparts(ST(I).file)); -0032 -0033 % Do not print first few lines if only version should be reported -0034 if ~versionOnly -0035 fprintf('\n*** THE RAVEN TOOLBOX ***\n\n'); -0036 %Print the RAVEN version if it is not the development version -0037 fprintf([myStr(' > Installing from location',40) '%f']); -0038 fprintf('%s\n',ravenDir) -0039 fprintf([myStr(' > Checking RAVEN release',40) '%f']); -0040 end -0041 if exist(fullfile(ravenDir,'version.txt'), 'file') == 2 -0042 currVer = fgetl(fopen(fullfile(ravenDir,'version.txt'))); -0043 fclose('all'); -0044 if ~versionOnly -0045 fprintf([currVer '\n']); -0046 try -0047 newVer=strtrim(webread('https://raw.githubusercontent.com/SysBioChalmers/RAVEN/main/version.txt')); -0048 newVerNum=str2double(strsplit(newVer,'.')); -0049 currVerNum=str2double(strsplit(currVer,'.')); -0050 for i=1:3 -0051 if currVerNum(i)<newVerNum(i) -0052 fprintf([myStr(' > Latest RAVEN release available',40) '%f']) -0053 printOrange([newVer,'\n']) -0054 hasGit=isfolder(fullfile(ravenDir,'.git')); -0055 if hasGit -0056 printOrange(' Run git pull in your favourite git client\n') -0057 printOrange(' to get the latest RAVEN release\n'); -0058 else -0059 printOrange([myStr(' Instructions on how to upgrade',40) '%f']) -0060 fprintf('<a href="https://github.com/SysBioChalmers/RAVEN/wiki/Installation#upgrade-to-latest-raven-release">here</a>\n'); -0061 end -0062 break -0063 elseif i==3 -0064 fprintf(' > You are running the latest RAVEN release\n'); -0065 end -0066 end -0067 catch -0068 fprintf([myStr(' > Checking for latest RAVEN release',40) '%f']) -0069 printOrange('Fail\n'); -0070 printOrange(' Cannot reach GitHub for release info\n'); -0071 end -0072 end -0073 else -0074 currVer = 'develop'; -0075 if ~versionOnly; fprintf('DEVELOPMENT\n'); end -0076 end -0077 if strcmp(developMode,'versionOnly') -0078 return; -0079 end -0080 -0081 fprintf([myStr(' > Checking MATLAB release',40) '%f']) -0082 fprintf([version('-release') '\n']) -0083 fprintf([myStr(' > Checking system architecture',40) '%f']) -0084 fprintf([computer('arch'),'\n']) -0085 -0086 fprintf([myStr(' > Set RAVEN in MATLAB path',40) '%f']) -0087 subpath=regexp(genpath(ravenDir),pathsep,'split'); %List all subdirectories -0088 pathsToKeep=cellfun(@(x) ~contains(x,'.git'),subpath) & cellfun(@(x) ~contains(x,'doc'),subpath); -0089 try -0090 addpath(strjoin(subpath(pathsToKeep),pathsep)); -0091 fprintf('Pass\n'); -0092 fprintf([myStr(' > Save MATLAB path',40) '%f']) -0093 try -0094 savepath -0095 fprintf('Pass\n') -0096 catch -0097 printOrange('Fail\n') -0098 fprintf([' You might have to rerun checkInstallation again\n'... -0099 ' next time you start up MATLAB\n']) -0100 end -0101 catch -0102 printOrange('Fail\n') -0103 end -0104 -0105 if isunix -0106 fprintf([myStr(' > Make binaries executable',40) '%f']) -0107 status = makeBinaryExecutable(); -0108 if status == 0 -0109 fprintf('Pass\n') -0110 else -0111 printOrange('Fail\n') -0112 end -0113 end -0114 -0115 %Check if it is possible to parse an Excel file -0116 fprintf('\n=== Model import and export ===\n'); -0117 fprintf([myStr(' > Add Java paths for Excel format',40) '%f']) -0118 try -0119 %Add the required classes to the static Java path if not already added -0120 addJavaPaths(); -0121 fprintf('Pass\n') -0122 catch -0123 printOrange('Fail\n') -0124 end -0125 fprintf([myStr(' > Checking libSBML version',40) '%f']) -0126 try -0127 evalc('importModel(fullfile(ravenDir,''tutorial'',''empty.xml''))'); -0128 try -0129 libSBMLver=OutputSBML; % Only works in libSBML 5.17.0+ -0130 fprintf([libSBMLver.libSBML_version_string '\n']); -0131 catch -0132 printOrange('Fail\n') -0133 fprintf(' An older libSBML version was found, update to version 5.17.0 or higher for a significant improvement of model import\n'); -0134 end -0135 catch -0136 printOrange('Fail\n') -0137 fprintf(' Download libSBML from http://sbml.org/Software/libSBML/Downloading_libSBML and add to MATLAB path\n'); -0138 end -0139 fprintf(' > Checking model import and export\n') -0140 [~,res]=evalc("runtests('importExportTests.m');"); -0141 -0142 fprintf([myStr(' > Import Excel format',40) '%f']) -0143 if res(1).Passed == 1 -0144 fprintf('Pass\n') -0145 else -0146 printOrange('Fail\n') -0147 addList = matlab.addons.installedAddons; -0148 if any(strcmpi(addList.Name,'Text Analytics Toolbox')) -0149 fprintf([' Excel import/export is incompatible with MATLAB Text Analytics Toolbox.\n' ... -0150 ' Further instructions => https://github.com/SysBioChalmers/RAVEN/issues/55#issuecomment-1514369299\n']) -0151 end -0152 end -0153 -0154 fprintf([myStr(' > Export Excel format',40) '%f']) -0155 if res(3).Passed == 1 -0156 fprintf('Pass\n') -0157 else -0158 printOrange('Fail\n') -0159 end -0160 -0161 fprintf([myStr(' > Import SBML format',40) '%f']) -0162 if res(2).Passed == 1 -0163 fprintf('Pass\n') -0164 else -0165 printOrange('Fail\n') -0166 end -0167 -0168 fprintf([myStr(' > Export SBML format',40) '%f']) -0169 if res(4).Passed == 1 -0170 fprintf('Pass\n') -0171 else -0172 printOrange('Fail\n') -0173 end -0174 -0175 if res(1).Passed~=1 && res(3).Passed~=1 && exist('vaderSentimentScores.m','file')==2 -0176 fprintf([' > MATLAB Text Analytics Toolbox found. This should be\n'... -0177 ' uninstalled if you want to read/write Excel files.\n'... -0178 ' See RAVEN GitHub Issues page for instructions.\n']) -0179 end -0180 -0181 %Check if it is possible to import an YAML model -0182 % fprintf(' > Checking import of model in YAML format:\t\t\t'); -0183 % try -0184 % readYaml(ymlFile,true); -0185 % fprintf('Pass\n'); -0186 % catch -0187 % printOrange('Fail\n'); -0188 % end -0189 -0190 fprintf('\n=== Model solvers ===\n'); -0191 -0192 %Get current solver. Set it to 'none', if it is not set -0193 fprintf(' > Checking for LP solvers\n') -0194 [~,res]=evalc("runtests('solverTests.m');"); -0195 -0196 fprintf([myStr(' > glpk',40) '%f']) -0197 if res(1).Passed == 1 -0198 fprintf('Pass\n') -0199 else -0200 printOrange('Fail\n') -0201 end -0202 -0203 fprintf([myStr(' > gurobi',40) '%f']) -0204 if res(2).Passed == 1 -0205 fprintf('Pass\n') -0206 else -0207 printOrange('Fail\n') -0208 end -0209 -0210 fprintf([myStr(' > scip',40) '%f']) -0211 if res(3).Passed == 1 -0212 fprintf('Pass\n') -0213 else -0214 printOrange('Fail\n') -0215 end -0216 -0217 fprintf([myStr(' > cobra',40) '%f']) -0218 if res(4).Passed == 1 -0219 fprintf('Pass\n') -0220 else -0221 printOrange('Fail\n') -0222 end -0223 fprintf([myStr(' > Set RAVEN solver',40) '%f']) -0224 try -0225 oldSolver=getpref('RAVEN','solver'); -0226 solverIdx=find(strcmp(oldSolver,{'glpk','gurobi','scip','cobra'})); -0227 catch -0228 solverIdx=0; -0229 end -0230 % Do not change old solver if functional -0231 if solverIdx~=0 && res(solverIdx).Passed == 1 -0232 fprintf([oldSolver '\n']) -0233 % Order of preference: gurobi > glpk > soplex > cobra -0234 elseif res(2).Passed == 1 -0235 fprintf('gurobi\n') -0236 setRavenSolver('gurobi'); -0237 elseif res(1).Passed == 1 -0238 fprintf('glpk\n') -0239 setRavenSolver('glpk'); -0240 elseif res(3).Passed == 1 -0241 fprintf('soplex\n') -0242 setRavenSolver('soplex'); -0243 elseif res(4).Passed == 1 -0244 fprintf('cobra\n') -0245 setRavenSolver('cobra'); -0246 else -0247 fprintf('None, no functional solvers\n') -0248 fprintf(' The glpk should always be working, check your RAVEN installation to make sure all files are present\n') -0249 end -0250 -0251 fprintf('\n=== Essential binary executables ===\n'); -0252 fprintf([myStr(' > Checking BLAST+',40) '%f']) -0253 [~,res]=evalc("runtests('blastPlusTests.m');"); -0254 res=interpretResults(res); -0255 if res==false -0256 fprintf(' This is essential to run getBlast()\n') -0257 end -0258 -0259 fprintf([myStr(' > Checking DIAMOND',40) '%f']) -0260 [~,res]=evalc("runtests('diamondTests.m');"); -0261 res=interpretResults(res); -0262 if res==false -0263 fprintf(' This is essential to run the getDiamond()\n') -0264 end -0265 -0266 fprintf([myStr(' > Checking HMMER',40) '%f']) -0267 [~,res]=evalc("runtests('hmmerTests.m')"); -0268 res=interpretResults(res); -0269 if res==false -0270 fprintf([' This is essential to run getKEGGModelFromHomology()\n'... -0271 ' when using a FASTA file as input\n']) -0272 end -0273 -0274 if developMode -0275 fprintf('\n=== Development binary executables ===\n'); -0276 fprintf('NOTE: These binaries are only required when using KEGG FTP dump files in getKEGGModelForOrganism\n'); -0277 -0278 fprintf([myStr(' > Checking CD-HIT',40) '%f']) -0279 [~,res]=evalc("runtests('cdhitTests.m');"); -0280 interpretResults(res); -0281 -0282 fprintf([myStr(' > Checking MAFFT',40) '%f']) -0283 [~,res]=evalc("runtests('mafftTests.m');"); -0284 interpretResults(res); -0285 end -0286 -0287 fprintf('\n=== Compatibility ===\n'); -0288 fprintf([myStr(' > Checking function uniqueness',40) '%f']) -0289 checkFunctionUniqueness(); -0290 -0291 fprintf('\n*** checkInstallation complete ***\n\n'); -0292 end -0293 -0294 function res = interpretResults(results) -0295 if results.Failed==0 && results.Incomplete==0 -0296 fprintf('Pass\n'); -0297 res=true; -0298 else -0299 printOrange('Fail\n') -0300 fprintf(' Download/compile the binary and rerun checkInstallation\n'); -0301 res=false; -0302 end +0032 status = makeBinaryExecutable(); +0033 +0034 % Do not print first few lines if only version should be reported +0035 if ~versionOnly +0036 fprintf('\n*** THE RAVEN TOOLBOX ***\n\n'); +0037 %Print the RAVEN version if it is not the development version +0038 fprintf([myStr(' > Installing from location',40) '%f']); +0039 fprintf('%s\n',ravenDir) +0040 fprintf([myStr(' > Checking RAVEN release',40) '%f']); +0041 end +0042 if exist(fullfile(ravenDir,'version.txt'), 'file') == 2 +0043 currVer = fgetl(fopen(fullfile(ravenDir,'version.txt'))); +0044 fclose('all'); +0045 if ~versionOnly +0046 fprintf([currVer '\n']); +0047 try +0048 newVer=strtrim(webread('https://raw.githubusercontent.com/SysBioChalmers/RAVEN/main/version.txt')); +0049 newVerNum=str2double(strsplit(newVer,'.')); +0050 currVerNum=str2double(strsplit(currVer,'.')); +0051 for i=1:3 +0052 if currVerNum(i)<newVerNum(i) +0053 fprintf([myStr(' > Latest RAVEN release available',40) '%f']) +0054 printOrange([newVer,'\n']) +0055 hasGit=isfolder(fullfile(ravenDir,'.git')); +0056 if hasGit +0057 printOrange(' Run git pull in your favourite git client\n') +0058 printOrange(' to get the latest RAVEN release\n'); +0059 else +0060 printOrange([myStr(' Instructions on how to upgrade',40) '%f']) +0061 fprintf('<a href="https://github.com/SysBioChalmers/RAVEN/wiki/Installation#upgrade-to-latest-raven-release">here</a>\n'); +0062 end +0063 break +0064 elseif i==3 +0065 fprintf(' > You are running the latest RAVEN release\n'); +0066 end +0067 end +0068 catch +0069 fprintf([myStr(' > Checking for latest RAVEN release',40) '%f']) +0070 printOrange('Fail\n'); +0071 printOrange(' Cannot reach GitHub for release info\n'); +0072 end +0073 end +0074 else +0075 currVer = 'develop'; +0076 if ~versionOnly; fprintf('DEVELOPMENT\n'); end +0077 end +0078 if strcmp(developMode,'versionOnly') +0079 return; +0080 end +0081 +0082 fprintf([myStr(' > Checking MATLAB release',40) '%f']) +0083 fprintf([version('-release') '\n']) +0084 fprintf([myStr(' > Checking system architecture',40) '%f']) +0085 fprintf([computer('arch'),'\n']) +0086 +0087 fprintf([myStr(' > Set RAVEN in MATLAB path',40) '%f']) +0088 subpath=regexp(genpath(ravenDir),pathsep,'split'); %List all subdirectories +0089 pathsToKeep=cellfun(@(x) ~contains(x,'.git'),subpath) & cellfun(@(x) ~contains(x,'doc'),subpath); +0090 try +0091 addpath(strjoin(subpath(pathsToKeep),pathsep)); +0092 fprintf('Pass\n'); +0093 fprintf([myStr(' > Save MATLAB path',40) '%f']) +0094 try +0095 savepath +0096 fprintf('Pass\n') +0097 catch +0098 printOrange('Fail\n') +0099 fprintf([' You might have to rerun checkInstallation again\n'... +0100 ' next time you start up MATLAB\n']) +0101 end +0102 catch +0103 printOrange('Fail\n') +0104 end +0105 +0106 if isunix +0107 fprintf([myStr(' > Make binaries executable',40) '%f']) +0108 status = makeBinaryExecutable(); +0109 if status == 0 +0110 fprintf('Pass\n') +0111 else +0112 printOrange('Fail\n') +0113 end +0114 end +0115 +0116 %Check if it is possible to parse an Excel file +0117 fprintf('\n=== Model import and export ===\n'); +0118 fprintf([myStr(' > Add Java paths for Excel format',40) '%f']) +0119 try +0120 %Add the required classes to the static Java path if not already added +0121 addJavaPaths(); +0122 fprintf('Pass\n') +0123 catch +0124 printOrange('Fail\n') +0125 end +0126 fprintf([myStr(' > Checking libSBML version',40) '%f']) +0127 try +0128 evalc('importModel(fullfile(ravenDir,''tutorial'',''empty.xml''))'); +0129 try +0130 libSBMLver=OutputSBML; % Only works in libSBML 5.17.0+ +0131 fprintf([libSBMLver.libSBML_version_string '\n']); +0132 catch +0133 printOrange('Fail\n') +0134 fprintf(' An older libSBML version was found, update to version 5.17.0 or higher for a significant improvement of model import\n'); +0135 end +0136 catch +0137 printOrange('Fail\n') +0138 fprintf(' Download libSBML from http://sbml.org/Software/libSBML/Downloading_libSBML and add to MATLAB path\n'); +0139 end +0140 fprintf(' > Checking model import and export\n') +0141 [~,res]=evalc("runtests('importExportTests.m');"); +0142 +0143 fprintf([myStr(' > Import Excel format',40) '%f']) +0144 if res(1).Passed == 1 +0145 fprintf('Pass\n') +0146 else +0147 printOrange('Fail\n') +0148 addList = matlab.addons.installedAddons; +0149 if any(strcmpi(addList.Name,'Text Analytics Toolbox')) +0150 fprintf([' Excel import/export is incompatible with MATLAB Text Analytics Toolbox.\n' ... +0151 ' Further instructions => https://github.com/SysBioChalmers/RAVEN/issues/55#issuecomment-1514369299\n']) +0152 end +0153 end +0154 +0155 fprintf([myStr(' > Export Excel format',40) '%f']) +0156 if res(3).Passed == 1 +0157 fprintf('Pass\n') +0158 else +0159 printOrange('Fail\n') +0160 end +0161 +0162 fprintf([myStr(' > Import SBML format',40) '%f']) +0163 if res(2).Passed == 1 +0164 fprintf('Pass\n') +0165 else +0166 printOrange('Fail\n') +0167 end +0168 +0169 fprintf([myStr(' > Export SBML format',40) '%f']) +0170 if res(4).Passed == 1 +0171 fprintf('Pass\n') +0172 else +0173 printOrange('Fail\n') +0174 end +0175 +0176 if res(1).Passed~=1 && res(3).Passed~=1 && exist('vaderSentimentScores.m','file')==2 +0177 fprintf([' > MATLAB Text Analytics Toolbox found. This should be\n'... +0178 ' uninstalled if you want to read/write Excel files.\n'... +0179 ' See RAVEN GitHub Issues page for instructions.\n']) +0180 end +0181 +0182 %Check if it is possible to import an YAML model +0183 % fprintf(' > Checking import of model in YAML format:\t\t\t'); +0184 % try +0185 % readYaml(ymlFile,true); +0186 % fprintf('Pass\n'); +0187 % catch +0188 % printOrange('Fail\n'); +0189 % end +0190 +0191 fprintf('\n=== Model solvers ===\n'); +0192 +0193 %Get current solver. Set it to 'none', if it is not set +0194 fprintf(' > Checking for LP solvers\n') +0195 [~,res]=evalc("runtests('solverTests.m');"); +0196 +0197 fprintf([myStr(' > glpk',40) '%f']) +0198 if res(1).Passed == 1 +0199 fprintf('Pass\n') +0200 else +0201 printOrange('Fail\n') +0202 end +0203 +0204 fprintf([myStr(' > gurobi',40) '%f']) +0205 if res(2).Passed == 1 +0206 fprintf('Pass\n') +0207 else +0208 printOrange('Fail\n') +0209 end +0210 +0211 fprintf([myStr(' > scip',40) '%f']) +0212 if res(3).Passed == 1 +0213 fprintf('Pass\n') +0214 else +0215 printOrange('Fail\n') +0216 end +0217 +0218 fprintf([myStr(' > cobra',40) '%f']) +0219 if res(4).Passed == 1 +0220 fprintf('Pass\n') +0221 else +0222 printOrange('Fail\n') +0223 end +0224 fprintf([myStr(' > Set RAVEN solver',40) '%f']) +0225 try +0226 oldSolver=getpref('RAVEN','solver'); +0227 solverIdx=find(strcmp(oldSolver,{'glpk','gurobi','scip','cobra'})); +0228 catch +0229 solverIdx=0; +0230 end +0231 % Do not change old solver if functional +0232 if solverIdx~=0 && res(solverIdx).Passed == 1 +0233 fprintf([oldSolver '\n']) +0234 % Order of preference: gurobi > glpk > soplex > cobra +0235 elseif res(2).Passed == 1 +0236 fprintf('gurobi\n') +0237 setRavenSolver('gurobi'); +0238 elseif res(1).Passed == 1 +0239 fprintf('glpk\n') +0240 setRavenSolver('glpk'); +0241 elseif res(3).Passed == 1 +0242 fprintf('soplex\n') +0243 setRavenSolver('soplex'); +0244 elseif res(4).Passed == 1 +0245 fprintf('cobra\n') +0246 setRavenSolver('cobra'); +0247 else +0248 fprintf('None, no functional solvers\n') +0249 fprintf(' The glpk should always be working, check your RAVEN installation to make sure all files are present\n') +0250 end +0251 +0252 fprintf('\n=== Essential binary executables ===\n'); +0253 fprintf([myStr(' > Checking BLAST+',40) '%f']) +0254 [~,res]=evalc("runtests('blastPlusTests.m');"); +0255 res=interpretResults(res); +0256 if res==false +0257 fprintf(' This is essential to run getBlast()\n') +0258 end +0259 +0260 fprintf([myStr(' > Checking DIAMOND',40) '%f']) +0261 [~,res]=evalc("runtests('diamondTests.m');"); +0262 res=interpretResults(res); +0263 if res==false +0264 fprintf(' This is essential to run the getDiamond()\n') +0265 end +0266 +0267 fprintf([myStr(' > Checking HMMER',40) '%f']) +0268 [~,res]=evalc("runtests('hmmerTests.m')"); +0269 res=interpretResults(res); +0270 if res==false +0271 fprintf([' This is essential to run getKEGGModelFromHomology()\n'... +0272 ' when using a FASTA file as input\n']) +0273 end +0274 +0275 if developMode +0276 fprintf('\n=== Development binary executables ===\n'); +0277 fprintf('NOTE: These binaries are only required when using KEGG FTP dump files in getKEGGModelForOrganism\n'); +0278 +0279 fprintf([myStr(' > Checking CD-HIT',40) '%f']) +0280 [~,res]=evalc("runtests('cdhitTests.m');"); +0281 interpretResults(res); +0282 +0283 fprintf([myStr(' > Checking MAFFT',40) '%f']) +0284 [~,res]=evalc("runtests('mafftTests.m');"); +0285 interpretResults(res); +0286 end +0287 +0288 fprintf('\n=== Compatibility ===\n'); +0289 fprintf([myStr(' > Checking function uniqueness',40) '%f']) +0290 checkFunctionUniqueness(); +0291 +0292 fprintf('\n*** checkInstallation complete ***\n\n'); +0293 end +0294 +0295 function res = interpretResults(results) +0296 if results.Failed==0 && results.Incomplete==0 +0297 fprintf('Pass\n'); +0298 res=true; +0299 else +0300 printOrange('Fail\n') +0301 fprintf(' Download/compile the binary and rerun checkInstallation\n'); +0302 res=false; 0303 end -0304 -0305 function str = myStr(InputStr,len) -0306 str=InputStr; -0307 lenDiff = len - length(str); -0308 if lenDiff < 0 -0309 warning('String too long'); -0310 else -0311 str = [str blanks(lenDiff)]; -0312 end +0304 end +0305 +0306 function str = myStr(InputStr,len) +0307 str=InputStr; +0308 lenDiff = len - length(str); +0309 if lenDiff < 0 +0310 warning('String too long'); +0311 else +0312 str = [str blanks(lenDiff)]; 0313 end -0314 -0315 function status = makeBinaryExecutable() -0316 if ispc -0317 status = 0; % No need to run on Windows -0318 return; -0319 end -0320 +0314 end +0315 +0316 function status = makeBinaryExecutable() +0317 if ispc +0318 status = 0; % No need to run on Windows +0319 return; +0320 end 0321 binDir = fullfile(findRAVENroot(),'software'); 0322 -0323 binList = {fullfile(binDir,'blast+','blastp'); -0324 fullfile(binDir,'blast+','makeblastdb'); -0325 fullfile(binDir,'cd-hit','cd-hit'); -0326 fullfile(binDir,'diamond','diamond'); -0327 fullfile(binDir,'hmmer','hmmbuild'); -0328 fullfile(binDir,'hmmer','hmmsearch'); -0329 fullfile(binDir,'GLPKmex','glpkcc'); -0330 fullfile(binDir,'libSBML','TranslateSBML'); -0331 fullfile(binDir,'libSBML','OutputSBML'); -0332 fullfile(binDir,'mafft','mafft-linux64','mafft'); -0333 fullfile(binDir,'mafft','mafft-mac','mafft');}; +0323 binList = {fullfile(binDir,'blast+','blastp'); fullfile(binDir,'blast+','blastp.mac'); +0324 fullfile(binDir,'blast+','makeblastdb'); fullfile(binDir,'blast+','makeblastdb.mac'); +0325 fullfile(binDir,'cd-hit','cd-hit'); fullfile(binDir,'cd-hit','cd-hit.mac'); +0326 fullfile(binDir,'diamond','diamond'); fullfile(binDir,'diamond','diamond.mac'); +0327 fullfile(binDir,'hmmer','hmmbuild'); fullfile(binDir,'hmmer','hmmbuild.mac'); +0328 fullfile(binDir,'hmmer','hmmsearch'); fullfile(binDir,'hmmer','hmmsearch.mac'); +0329 fullfile(binDir,'GLPKmex','glpkcc.mexa64'); fullfile(binDir,'GLPKmex','glpkcc.mexglx'); fullfile(binDir,'GLPKmex','glpkcc.mexmaci64'); +0330 fullfile(binDir,'libSBML','TranslateSBML.mexa64'); fullfile(binDir,'libSBML','TranslateSBML.mexglx'); fullfile(binDir,'libSBML','TranslateSBML.mexmaci64'); +0331 fullfile(binDir,'libSBML','OutputSBML.mexa64'); fullfile(binDir,'libSBML','OutputSBML.mexglx'); fullfile(binDir,'libSBML','OutputSBML.mexmaci64'); +0332 fullfile(binDir,'mafft','mafft-linux64','mafft.bat'); +0333 fullfile(binDir,'mafft','mafft-mac','mafft.bat');}; 0334 0335 for i=1:numel(binList) -0336 [status,cmdout] = system(['chmod +x "' binList{i} '".(mexa64|mexglx|mexmaci64|mac|bat)']); +0336 [status,cmdout] = system(['chmod +x "' binList{i} '"']); 0337 if status ~= 0 0338 warning('Failed to make %s executable: %s ',binList{i},strip(cmdout)) 0339 end diff --git a/installation/checkInstallation.m b/installation/checkInstallation.m index 83a84686..79e4c326 100755 --- a/installation/checkInstallation.m +++ b/installation/checkInstallation.m @@ -29,6 +29,7 @@ %Get the RAVEN path [ST, I]=dbstack('-completenames'); [ravenDir,~,~]=fileparts(fileparts(ST(I).file)); + status = makeBinaryExecutable(); % Do not print first few lines if only version should be reported if ~versionOnly @@ -317,23 +318,22 @@ status = 0; % No need to run on Windows return; end - binDir = fullfile(findRAVENroot(),'software'); -binList = {fullfile(binDir,'blast+','blastp'); - fullfile(binDir,'blast+','makeblastdb'); - fullfile(binDir,'cd-hit','cd-hit'); - fullfile(binDir,'diamond','diamond'); - fullfile(binDir,'hmmer','hmmbuild'); - fullfile(binDir,'hmmer','hmmsearch'); - fullfile(binDir,'GLPKmex','glpkcc'); - fullfile(binDir,'libSBML','TranslateSBML'); - fullfile(binDir,'libSBML','OutputSBML'); - fullfile(binDir,'mafft','mafft-linux64','mafft'); - fullfile(binDir,'mafft','mafft-mac','mafft');}; +binList = {fullfile(binDir,'blast+','blastp'); fullfile(binDir,'blast+','blastp.mac'); + fullfile(binDir,'blast+','makeblastdb'); fullfile(binDir,'blast+','makeblastdb.mac'); + fullfile(binDir,'cd-hit','cd-hit'); fullfile(binDir,'cd-hit','cd-hit.mac'); + fullfile(binDir,'diamond','diamond'); fullfile(binDir,'diamond','diamond.mac'); + fullfile(binDir,'hmmer','hmmbuild'); fullfile(binDir,'hmmer','hmmbuild.mac'); + fullfile(binDir,'hmmer','hmmsearch'); fullfile(binDir,'hmmer','hmmsearch.mac'); + fullfile(binDir,'GLPKmex','glpkcc.mexa64'); fullfile(binDir,'GLPKmex','glpkcc.mexglx'); fullfile(binDir,'GLPKmex','glpkcc.mexmaci64'); + fullfile(binDir,'libSBML','TranslateSBML.mexa64'); fullfile(binDir,'libSBML','TranslateSBML.mexglx'); fullfile(binDir,'libSBML','TranslateSBML.mexmaci64'); + fullfile(binDir,'libSBML','OutputSBML.mexa64'); fullfile(binDir,'libSBML','OutputSBML.mexglx'); fullfile(binDir,'libSBML','OutputSBML.mexmaci64'); + fullfile(binDir,'mafft','mafft-linux64','mafft.bat'); + fullfile(binDir,'mafft','mafft-mac','mafft.bat');}; for i=1:numel(binList) - [status,cmdout] = system(['chmod +x "' binList{i} '".(mexa64|mexglx|mexmaci64|mac|bat)']); + [status,cmdout] = system(['chmod +x "' binList{i} '"']); if status ~= 0 warning('Failed to make %s executable: %s ',binList{i},strip(cmdout)) end