Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions GECKOInstaller.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
paths = GECKOInstaller.GetFilteredSubPaths(sourceDir, GECKOInstaller.FILE_FILTER);

GECKOInstaller.checkRAVENversion('3.0.0'); % Minimum RAVEN version
GECKOInstaller.checkRAVENExperiments(); % loadExperimentData and related functions of RAVEN

% Check unique function names
if ~exist("checkFunctionUniqueness.m")
Expand Down Expand Up @@ -61,6 +62,21 @@
newPaths = char(join(pathsLeft, pathSep));
end

function checkRAVENExperiments()
% GECKO scores and constrains models against measured conditions with
% the functions of the experiments folder of RAVEN (loadFluxData,
% loadExperimentData, simulateConditions, computeCarbonWeights,
% experimentDistance, applyFluxDataConstraints). The version check
% ignores the pre-release suffix of RAVEN, so it cannot tell a RAVEN
% that has these functions from one that has not.
if exist('loadExperimentData','file') ~= 2 || exist('applyFluxDataConstraints','file') ~= 2
error(['The installed RAVEN does not have the experiments functions ' ...
'(loadExperimentData, applyFluxDataConstraints, ...), which GECKO requires. ' ...
'Upgrade RAVEN by following the instructions available ' ...
'<a href="https://raven-docs.readthedocs.io/en/latest/installation/raven.html#upgrade">here</a>.'])
end
end

function checkRAVENversion(minmVer)
wrongVersion = false;
try
Expand Down
2 changes: 1 addition & 1 deletion src/change_model/addNewRxnsToEC.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
% --------
% applyKcatConstraints, setKcatForReactions, assignKcats

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'newEnzymes', []; ...
'modelAdapter', []});
newEnzymes = p.newEnzymes;
Expand Down
2 changes: 1 addition & 1 deletion src/change_model/applyComplexData.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
% --------
% getComplexData, makeEcModel

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'complexInfo', []; ...
'modelAdapter', []; ...
'verbose', true});
Expand Down
2 changes: 1 addition & 1 deletion src/change_model/applyKcatConstraints.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
% --------
% makeEcModel, fillKcatsFromIsozymes, setKcatForReactions

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'updateRxns', []});
updateRxns = p.updateRxns;

Expand Down
2 changes: 1 addition & 1 deletion src/change_model/findMetSmiles.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
% noSMILES : cell
% metabolite names for which no SMILES could be found.
%
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'modelAdapter', []; ...
'verbose', true});
modelAdapter = p.modelAdapter;
Expand Down
2 changes: 1 addition & 1 deletion src/change_model/getComplexData.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
% --------
% applyComplexData, makeEcModel

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'taxonomicID', []; ...
'modelAdapter', []});
taxonomicID = p.taxonomicID;
Expand Down
2 changes: 1 addition & 1 deletion src/change_model/makeEcModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
% --------
% applyKcatConstraints, applyComplexData

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'geckoLight', false; ...
'modelAdapter', []});
geckoLight = p.geckoLight;
Expand Down
2 changes: 1 addition & 1 deletion src/change_model/setProtPoolSize.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
% --------
% makeEcModel

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'Ptot', []; ...
'f', []; ...
'sigma', []; ...
Expand Down
16 changes: 8 additions & 8 deletions src/deprecated/addCarbonNum.m
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
function varargout = addCarbonNum(varargin)
% addCarbonNum Deprecated alias for fillCarbonNum.
function varargout = addCarbonNum(varargin) %#ok<STOUT>
% addCarbonNum Removed: carbon numbers of exchange reactions of GECKO 3.
%
% Kept for backward compatibility with pre-GECKO4 code. Will be removed
% in a future release; switch to fillCarbonNum.
% This function raises an error that names its replacement, RAVEN's
% computeCarbonWeights, which returns the carbon weight of each reaction as a
% containers.Map instead of writing the field model.excarbon.
%
% See also
% --------
% fillCarbonNum
% computeCarbonWeights

warning('GECKO:deprecatedName', ...
'addCarbonNum is deprecated; use fillCarbonNum instead. The old name will be removed in a future release.');
[varargout{1:nargout}] = fillCarbonNum(varargin{:});
error('GECKO:removedFunction', ['addCarbonNum was removed in GECKO 4. Use computeCarbonWeights (RAVEN),' ...
' which returns the carbon weight of each reaction as a containers.Map.']);
end
2 changes: 1 addition & 1 deletion src/deprecated/applyCustomKcats.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
warning('GECKO:deprecatedFunction', ['applyCustomKcats is deprecated; use convertCustomKcats, ' ...
'which writes data/kcats/custom.tsv for collectKcats and assignKcats. applyCustomKcats ' ...
'will be removed in a future release.'])
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'customKcats', []; ...
'modelAdapter', []});
customKcats = p.customKcats;
Expand Down
4 changes: 2 additions & 2 deletions src/deprecated/bayesianSensitivityTuning.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
%
% GECKO 4 tunes kcats against experimental data with cmaesKcatTuning (the
% advanced kcat tuning), which reads the same kinds of data from
% data/evotuneMaxGrowth.tsv, data/evotuneFluxData.tsv and
% data/evotuneZeroExch.tsv (see loadEvotuneData). sensitivityTuning is the
% data/maxGrowth.tsv, data/fluxData.tsv and
% data/zeroFlux.tsv (see loadEvotuneData). sensitivityTuning is the
% standard kcat tuning. This function raises an error that names them.
%
% See also
Expand Down
6 changes: 3 additions & 3 deletions src/deprecated/getcarbonnum.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
%
% See also
% --------
% fillCarbonNum
% computeCarbonWeights

error('GECKO:removedFunction', ['getcarbonnum was removed in GECKO 4. Use fillCarbonNum, which writes' ...
' the carbon number of each exchange reaction to model.excarbon.']);
error('GECKO:removedFunction', ['getcarbonnum was removed in GECKO 4. Use computeCarbonWeights (RAVEN),' ...
' which returns the carbon weight of each reaction as a containers.Map.']);
end
2 changes: 1 addition & 1 deletion src/deprecated/mergeDLKcatAndFuzzyKcats.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
% --------
% mergeKcats, readDLKcatOutput, fuzzyKcatMatching, assignKcatValues

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'topOriginLimit', 4; ...
'bottomOriginLimit', 6; ...
'wildcardLimit', 3});
Expand Down
2 changes: 1 addition & 1 deletion src/deprecated/readDLKcatOutput.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

warning('GECKO:deprecatedFunction', ['readDLKcatOutput is deprecated; use ' ...
'kcatsFromDLKcat(model, ''via'', ''file''). It will be removed in a future release.'])
p = parseGECKOargs(varargin, {'outFile', []; 'modelAdapter', []; 'strict', []});
p = parseRAVENargs(varargin, {'outFile', []; 'modelAdapter', []; 'strict', []});
if ~isempty(p.strict)
warning('GECKO:deprecatedOption', ['The strict option of readDLKcatOutput is ignored: rows ' ...
'with a substrate that is not in model.metNames are left out with a warning.'])
Expand Down
2 changes: 1 addition & 1 deletion src/deprecated/updateProtPool.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
warning('GECKO:deprecatedFunction', ['updateProtPool is deprecated; use setProtPoolSize ' ...
'instead. The function will be removed in a future release.']);

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'Ptot', []; ...
'modelAdapter', []});
Ptot = p.Ptot;
Expand Down
2 changes: 1 addition & 1 deletion src/download_databases/loadBRENDAdata.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
% --------
% loadDatabases, getECfromDatabase

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'modelAdapter', [], @(x) assert(isempty(x) || isa(x,'ModelAdapter'), ...
'loadBRENDAdata:invalidModelAdapter', ...
'modelAdapter must be a ModelAdapter.'); ...
Expand Down
2 changes: 1 addition & 1 deletion src/download_databases/loadDatabases.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
% --------
% getECfromDatabase, loadBRENDAdata, downloadKEGG, downloadUniProt

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'selectDatabase', 'both'; ...
'modelAdapter', []});
selectDatabase = p.selectDatabase;
Expand Down
2 changes: 1 addition & 1 deletion src/enzyme_usage/getEnzymeBottlenecks.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
% bottlenecks = getEnzymeBottlenecks(ecModel);
% bottlenecks = getEnzymeBottlenecks(ecModel, 'top', 5, 'foldChange', 3);

p = parseGECKOargs(varargin, {'top', []; 'foldChange', []});
p = parseRAVENargs(varargin, {'top', []; 'foldChange', []});
top = p.top;
foldChange = p.foldChange;
if isempty(top)
Expand Down
2 changes: 1 addition & 1 deletion src/enzyme_usage/getEnzymeUsage.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
% --------
% reportEnzymeUsage

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'zero', true});
zero = p.zero;
if ecModel.ec.geckoLight
Expand Down
2 changes: 1 addition & 1 deletion src/enzyme_usage/reportEnzymeUsage.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
% --------
% getEnzymeUsage

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'highCapUsage', []; ...
'topAbsUsage', []});
highCapUsage = p.highCapUsage;
Expand Down
2 changes: 1 addition & 1 deletion src/flux_analysis/ecFSEOF.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
% fseof = ecFSEOF(model,prodTargetRxn,csRxn,nSteps,outputFile,filePath,modelAdapter,corrThreshold);
% fseof = ecFSEOF(model,prodTargetRxn,csRxn,'nSteps',32);

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'nSteps', 16; ...
'outputFile', false; ...
'filePath', []; ...
Expand Down
2 changes: 1 addition & 1 deletion src/flux_analysis/ecFVA.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
% --------
% mapRxnsToConv, plotEcFVA

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'runParallel', true});
runParallel = p.runParallel;

Expand Down
2 changes: 1 addition & 1 deletion src/flux_analysis/getPfbaEnzymes.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
% --------
% getEnzymeBottlenecks

p = parseGECKOargs(varargin, {'rxnId', []; 'fractionOfOptimum', []});
p = parseRAVENargs(varargin, {'rxnId', []; 'fractionOfOptimum', []});
rxnId = p.rxnId;
fractionOfOptimum = p.fractionOfOptimum;
if isempty(fractionOfOptimum)
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/assignKcatValues.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
% --------
% kcatsFromDLKcat, mergeKcats, assignKcats, applyKcatConstraints

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'criteria', []; ...
'overwrite', []});
criteria = p.criteria;
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/collectKcats.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
% assignKcats, updateKcatSources, loadKcatSource, mergeKcats, assignKcatValues

checkOptions(varargin, {'modelAdapter','writeReport'}, 'collectKcats');
p = parseGECKOargs(varargin, {'modelAdapter', []; 'writeReport', true});
p = parseRAVENargs(varargin, {'modelAdapter', []; 'writeReport', true});
modelAdapter = p.modelAdapter;
if isempty(modelAdapter)
modelAdapter = ModelAdapterManager.getDefault();
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/convertCustomKcats.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
% collectKcats, applyCustomKcats, getEcRxnKeys, upgradeGECKOproject

checkOptions(varargin, {'modelAdapter','customKcats','outFile'}, 'convertCustomKcats');
p = parseGECKOargs(varargin, {'modelAdapter', []; 'customKcats', []; 'outFile', []});
p = parseRAVENargs(varargin, {'modelAdapter', []; 'customKcats', []; 'outFile', []});
modelAdapter = p.modelAdapter;
if isempty(modelAdapter)
modelAdapter = ModelAdapterManager.getDefault();
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/extractEnzymeSubstratePairs.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
% kcatsFromDLKcat, kcatsFromHomologs

[geckoPath, ~] = findGECKOroot();
p = parseGECKOargs(varargin, {'ecRxns', []; 'modelAdapter', []});
p = parseRAVENargs(varargin, {'ecRxns', []; 'modelAdapter', []});
ecRxnsSel = p.ecRxns;
if isempty(ecRxnsSel)
ecRxnsSel = true(numel(model.ec.rxns),1);
Expand Down
4 changes: 2 additions & 2 deletions src/gather_kcats/fuzzyKcatMatching.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@
% mergeKcats, assignKcats, assignKcatValues

% Validators reject a name that landed in a positional slot, which
% happens when positional and name-value arguments are mixed. Without
% happens when a positional value follows name-value pairs. Without
% them `while forceWClvl > 0` on a char array is all-true and silently
% wildcards every EC number.
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'ecRxns', [], @(x) assert(isempty(x) || isnumeric(x) || ...
islogical(x), ...
'fuzzyKcatMatching:invalidEcRxns', ...
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/getStandardKcat.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
% --------
% removeStandardKcat, applyKcatConstraints

p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'modelAdapter', []; ...
'threshold', []; ...
'fillZeroKcat', []});
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/kcatsFromBrenda.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
% fuzzyKcatMatching, kcatsFromDLKcat, kcatsFromOKP, saveKcatSource, loadKcatSource

checkOptions(varargin, {'aggregation','forceWClvl','ecRxns','save','saveAs','modelAdapter'}, 'kcatsFromBrenda');
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'aggregation', []; ...
'forceWClvl', 0; ...
'ecRxns', []; ...
Expand Down
8 changes: 4 additions & 4 deletions src/gather_kcats/kcatsFromDLKcat.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
% kcatsFromOKP, extractEnzymeSubstratePairs, saveKcatSource

checkOptions(varargin, {'via','run','wait','ecRxns','save','saveAs','modelAdapter'}, 'kcatsFromDLKcat');
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'via', []; ...
'run', false; ...
'wait', false; ...
Expand Down Expand Up @@ -185,7 +185,7 @@ function checkOptions(args, names, functionName)
function writtenTable = writeDLKcatInput(model, varargin)
% Writes the DLKcat input (data/DLKcat.tsv by default): one row per
% enzyme-substrate pair, with the kcat column NA.
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'ecRxns', []; ...
'modelAdapter', []; ...
'onlyWithSmiles', []; ...
Expand Down Expand Up @@ -275,7 +275,7 @@ function writeRows(filename, out)
function runDLKcat(varargin)
% Runs DLKcat in its Docker image on data/DLKcat.tsv, which it overwrites
% with the predictions.
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'modelAdapter', []; ...
'filePath', []});
modelAdapter = p.modelAdapter;
Expand Down Expand Up @@ -334,7 +334,7 @@ function runDLKcat(varargin)
% (readDLKcatOutput:unknownSubstrate). A file without kcats raises
% readDLKcatOutput:noKcats, a reaction that is not in model.ec.rxns
% readDLKcatOutput:unknownReaction.
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'outFile', []; ...
'modelAdapter', []});
outFile = p.outFile;
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/kcatsFromECTree.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
% ecTreeEstimate, loadBrendaMeasurements, kcatsFromBrenda, saveKcatSource, assignKcats

checkOptions(varargin, {'k','ecRxns','measurements','save','saveAs','modelAdapter'}, 'kcatsFromECTree');
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'k', 5; ...
'ecRxns', []; ...
'measurements', []; ...
Expand Down
2 changes: 1 addition & 1 deletion src/gather_kcats/kcatsFromHomologs.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
% kcatsFromECTree, extractEnzymeSubstratePairs, saveKcatSource, collectKcats

checkOptions(varargin, {'k','minIdentity','coverage','threads','save','saveAs','modelAdapter'}, 'kcatsFromHomologs');
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'k', 10; ...
'minIdentity', 0.4; ...
'coverage', 0.8; ...
Expand Down
6 changes: 3 additions & 3 deletions src/gather_kcats/kcatsFromOKP.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
% kcatsFromBrenda, kcatsFromDLKcat, resolveOkpApiKey, saveKcatSource

checkOptions(varargin, {'method','wait','resubmit','useStored','ecRxns','save','saveAs','modelAdapter'}, 'kcatsFromOKP');
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'method', []; ...
'wait', false; ...
'resubmit', false; ...
Expand Down Expand Up @@ -393,7 +393,7 @@ function writeOpenKineticsPredictorInput(model, varargin)
[geckoPath, ~] = findGECKOroot();

%% Parse inputs
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'ecRxns', []; ...
'modelAdapter', []; ...
'onlyWithSmiles', []; ...
Expand Down Expand Up @@ -544,7 +544,7 @@ function writeOpenKineticsPredictorInput(model, varargin)
% 100 s^-1') is read as its geometric midpoint, or half the upper bound for
% the class from 0. kcatSource keeps the OKP source of each value, with
% the prefix 'OKP-'.
p = parseGECKOargs(varargin, { ...
p = parseRAVENargs(varargin, { ...
'outFile', []; ...
'modelAdapter', []});
outFile = p.outFile;
Expand Down
Loading
Loading