modelGeneration¶
-
checkCobraModelUnique
(model, renameFlag)[source]¶ 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)
Outputs
- model – COBRA model structure
- isUnique – true if the model has unique reaction and metabolite names
-
checkDuplicateRxn
(model, method, removeFlag, printLevel, boundsFlag)[source]¶ 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)Input
- model – Cobra model structure
Optional input
- 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
-
checkObjective
(model)[source]¶ Prints out the Stoichiometric Coefficients for each Metabolite, with the name of the objective
Usage
objectiveAbbr = checkObjective(model)Input
- model – COBRA model structure
Output
- objectiveAbbr – Objective reaction abbreviation
-
detectDeadEnds
(model, removeExternalMets)[source]¶ 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)[source]¶ 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
-
removeDeadEnds
(model)[source]¶ 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)[source]¶ 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
Output
- 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
- constrOpt –
Constraint options
-
test4HumanFctExt
(model, test, optionSinks)[source]¶ test for the ~288 human functions
Usage
[TestSolution,TestSolutionName,TestedRxns,PercTestedRxns] = test4HumanFctExt(model,test,optionSinks)Inputs
- 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
Outputs
- TestSolution – array containing the optimal value for the different tests
- TestSolutionName – array containing the names for the different tests
-
testATPYieldFromCsources
(model, modelName)[source]¶ computes the ATP yield from various carbon sources in Recon2 or Recon3.
Usage
[Table_csources,TestedRxns,PercTestedRxns] = testATPYieldFromCsources(model,modelName)Inputs
- model – model structure
- modelName name of the model structure, by default Recon3
Outputs
- 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