Skip to content

Commit

Permalink
Change of line endings and test model for SBML
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentheirendt committed Feb 16, 2018
1 parent 7d98f6e commit acde7ed
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions initCobraToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ function initCobraToolbox()
% define the root path of The COBRA Toolbox and change to it.
CBTDIR = fileparts(which('initCobraToolbox'));
cd(CBTDIR);

% add the external install folder
addpath(genpath([CBTDIR filesep 'external' filesep 'install']));

%And the rdir directory
addpath(genpath([CBTDIR filesep 'external' filesep 'rdir']));

% add the install folder
addpath(genpath([CBTDIR filesep 'src' filesep 'base' filesep 'install']));
addpath(genpath([CBTDIR filesep 'src' filesep 'base' filesep 'install']));

% check if git is installed
checkGit();

Expand Down Expand Up @@ -203,12 +203,12 @@ function initCobraToolbox()
fprintf(' Done.\n');
end
end
%create the Cleanup function

%create the Cleanup function
%get the current content of the init Folder
dirContent = rdir(['**' filesep '*']);
finishup = onCleanup(@() removeGitIgnoredNewFiles(CBTDIR,dirContent));

% add the folders of The COBRA Toolbox
folders = {'tutorials', 'papers', 'binary', 'deprecated', 'src', 'test', '.tmp'};

Expand All @@ -229,7 +229,7 @@ function initCobraToolbox()
addpath(genpath(tmpDir));
end
end

%Adapt the mac path depending on the mac version.
if ismac
adaptMacPath()
Expand Down Expand Up @@ -264,7 +264,7 @@ function initCobraToolbox()
end

% define xml test file
xmlTestModel = 'Ec_iAF1260_flux1.xml';
xmlTestModel = 'ecoli_core_model.xml';
xmlTestFile = [getDistributedModelFolder(xmlTestModel) filesep xmlTestModel];

% save the userpath
Expand Down Expand Up @@ -303,10 +303,10 @@ function initCobraToolbox()
% define categories of solvers: LP, MILP, QP, MIQP, NLP
OPT_PROB_TYPES = {'LP', 'MILP', 'QP', 'MIQP', 'NLP'};
%Lets define a order of the solvers fields. Starting with the most
%common solvers others will be added as needed.
%common solvers others will be added as needed.
SOLVERS = struct('gurobi',struct(),...
'ibm_cplex',struct(),...
'tomlab_cplex',struct(),...
'tomlab_cplex',struct(),...
'glpk',struct(),...
'mosek',struct(),...
'matlab',struct());
Expand Down Expand Up @@ -371,14 +371,14 @@ function initCobraToolbox()
% check the installation of the solver
for i = 1:length(supportedSolversNames)
%We will validate all solvers in init. After this, all solvers are
%checked, whether they actually work and the SOLVERS field is set.
%checked, whether they actually work and the SOLVERS field is set.
[solverOK,solverInstalled] = changeCobraSolver(supportedSolversNames{i},...
SOLVERS.(supportedSolversNames{i}).type{1},...
0, false, 2);
if solverOK
SOLVERS.(supportedSolversNames{i}).working = true;
if solverOK
SOLVERS.(supportedSolversNames{i}).working = true;
end
SOLVERS.(supportedSolversNames{i}).installed = solverInstalled;
SOLVERS.(supportedSolversNames{i}).installed = solverInstalled;
end

if ENV_VARS.printLevel
Expand Down Expand Up @@ -539,21 +539,21 @@ function initCobraToolbox()
if status_setSSLVerify ~= 0
fprintf(strrep(result_setSSLVerify, '\', '\\'));
warning('Your global git configuration could not be restored.');
end
end

%Finally set up the COBRA System path
addCOBRABinaryPathToSystemPath();

% change back to the current directory
cd(currentDir);

% clear all temporary variables
% Note: global variables are kept in memory - DO NOT clear all the variables!
if ENV_VARS.printLevel
clearvars
end


end

function checkGit()
Expand Down Expand Up @@ -654,4 +654,4 @@ function checkGit()
end
end
end
end
end

0 comments on commit acde7ed

Please sign in to comment.