modelGeneration¶
- checkCobraModelUnique(model, renameFlag)¶
Checks uniqueness of reaction and metabolite names
USAGE:
model = checkCobraModelUnique(model, renameFlag)
- INPUT:
model: COBRA model structure
- OPTIONAL INPUT:
- renameFlag: Renames non-unique reaction names and metabolites
(Default = false)
- OUTPUT:
model: COBRA model structure isUnique: true if the model has unique reaction and metabolite names
- checkDuplicateRxn(model, method, removeFlag, printLevel, boundsFlag)¶
Checks model for duplicate reactions and removes them. By default, it detects the columns of S that are identical upto scalar multiplication
USAGE:
[modelOut, removedRxnInd, keptRxnInd] = checkDuplicateRxn(model, method, removeFlag, printLevel, boundsFlag)
- INPUTS:
model: Cobra model structure
- OPTIONAL INPUTS:
- method: S –> checks rxn S matrix (default),
rxnAbbr –> checks rxn abbreviations, FR –> checks F + R matrix, where \(S:=-F + R\), which ignores reaction direction
- OUTPUTS:
modelOut: COBRA model structure without (with) duplicate reactions removedRxnInd: Reaction numbers in model that were (should be) removed keptRxnInd: Reaction numbers in model that were (should be) kept
- checkModelPreFBA(model, param)¶
checks if a model is (stoichiometrically and flux) consistent, which are necessary conditions prior to FBA
INPUT model COBRA model, or a fileName containing a model
OPTIONAL INPUT param parameters
OUTPUT isConsistent {1,0} if stoichiometrically and flux consistent, or not
- detectDeadEnds(model, removeExternalMets)¶
Returns a list of indices of metabolites which either participate in only one reaction or can only be produced or consumed (i.e. all reactions involving the metabolite either only produce or only consume it, respecting the reaction lower and upper bounds).
USAGE:
outputMets = detectDeadEnds(model, removeExternalMets)
- INPUT:
model: COBRA model structure
- OPTIONAL INPUT:
- removeExternalMets: Dont return metabolites that participate in reactions of the following type:
“A <=>/-> ” or ” <=>/-> A” or exclusively present in inconsistent reactions as defined in Gevorgyan et al, Bioinformatics, 2008
- OUTPUT:
- outputMets: List of indicies of metabolites which can ether
only be produced or consumed.
- fastLeakTest(model, testRxns, demandTest)¶
Tests if any metabolites in a model are leaking. A metabolite is leaking if the exchange reaction can carry secretion flux in the closed model (no uptake flux through any exchange reactions is permitted).
USAGE:
[LeakMets, modelClosed, FluxExV] = fastLeakTest(model, testRxns, demandTest)
- INPUTS:
model: Model structure testRxns: List of exchange reactions to be testetd for leaks demandTest: Optional: if ‘true’ is entered, demand reactions
for all metabolites in the model are created
- OUTPUTS:
LeakMets: List of exchange reactions for leaking metabolites modelClosed: Model strucutre that has been tested for leaks FluxExV: Flux vector for computed exchange reactions in the closed model
- printObjective(model)¶
Prints out the Stoichiometric Coefficients for each Metabolite, with the name of the objective
USAGE:
objectiveAbbr = printObjective(model)
- INPUT:
model: COBRA model structure
- OUTPUT:
objectiveAbbr: Objective reaction abbreviation
- removeDeadEnds(model)¶
Removes all dead end metabolites and reactions from the model
USAGE:
[model, removedMets, removedRxns] = removeDeadEnds(model)
- INPUT:
model: COBRA model structure
- OUTPUTS:
- model: COBRA model structure w/o dead end metabolites and
reactions
removedMets: List of removed metabolites removedRxns: List of removed reactions
- setConstraintsIrrevModel(constrOpt, model, modelIrrev, rev2irrev)¶
Sets constraints for a subset of rxns while converting reversible to irreversible reaction names and handling the constraint directions correctly
USAGE:
constrOptIrrev = setConstraintsIrrevModel(rxnNameList, constrValue, constrSense, model, modelIrrev)
- INPUTS:
constrOpt: Constraint options
rxnList - Reaction selection cell array (for reversible representation)
values - Constraint values
sense - Constraint senses ordered as rxnNameList
model: Model in reversible format modelIrrev: Model in irreversible format rev2irrev: Reversible to irreversible reaction index conversion
obtained from convertToIrreversible
- OUTPUTS:
constrOpt: Constraint options in irrev model
rxnList - Reaction selection cell array
rxnInd - Selection index for constraints in irreversible model (e.g. [2 4 5 9 10])
values - Correctly ordered constraint values
sense - Correctly ordered constraint senses
- test4HumanFctExt(model, test, optionSinks)¶
test for the ~288 human functions
- USAGE:
[TestSolution,TestSolutionName,TestedRxns,PercTestedRxns] = test4HumanFctExt(model,test,optionSinks)
- INPUT:
model: model structure (Recon1, with desired in silico condition) test: possible statements: Recon1, IECori, IEC, all (default)
(choose IECori if you intend to test the IEC model OR a model that contains lumen (‘u’) as compartment otw choose IEC); all check for Recon1 and IEC
- option: if true = set sink reactions to 0 (default, leave unchanged).
Note that all lb’s of exchanges and demands will be set to 0
- OUTPUT:
TestSolution: array containing the optimal value for the different tests TestSolutionName: array containing the names for the different tests
- testATPYieldFromCsources(model, modelName, extraCellCompIn, extraCellCompOut, minCard)¶
computes the ATP yield from various carbon sources in Recon2 or Recon3.
- USAGE:
[Table_csources,TestedRxns,PercTestedRxns] = testATPYieldFromCsources(model,modelName)
- INPUT:
model model structure modelName name of the model structure, by default Recon3 extraCellCompIn abbreviation for extracellular compartment
(in-going), default [e]
- extraCellCompOut abbreviation for extracellular compartment
(out-going), default [e]
- OUTPUT:
Table_csources: table listing ATP yield computed for the carbon sources TestedRxns: list of reactions that are contributing to ATP production from carbon sources PercTestedRxns: Fraction that tested reactions make up compared with all reactions in model