Nutritionalgorithm¶
- addElementTracker(model, Element, rxnTags)[source]¶
Creates artificial metabolites and reactions that track the flux of a particular element through reactions with specified string tags.
- USAGE:
[model] = addElementTracker (model, Element, rxnTags)
- INPUTS:
model – COBRA model structure with minimal fields:
.S - stoichiometric matrix
.c - objective coefficients
.ub - upper flux bounds
.lb - lower flux bounds
.mets - metabolite identifiers
.rxns - reaction identifiers
Element – element you are interested in (e.g., ‘N’)
rxnTags – string or cell array containing the strings that mark reactions of interest to keep track of
- OUTPUTS:
model – the input model with added tracking reactions and the key “Track” reaction
- convert_EX_to_diet(model)[source]¶
Takes a model with typical exchange reactions (i.e., ‘EX_’) and translates them to uptake (diet) and secretion (exit) reactions.
- USAGE:
[model] = convert_EX_to_diet (model)
- INPUTS:
model – COBRA model structure with minimal fields:
.S - stoichiometric matrix
.c - objective coefficients
.ub - upper flux bounds
.lb - lower flux bounds
.mets - metabolite identifiers
.rxns - reaction identifiers
- OUTPUTS:
model – the input model with new uptake (’Diet_’) and secretion (’Exit_’) reactions
- getMolFormula(model, metabolite)[source]¶
Takes a metabolite in a specified model and returns its molecular formula.
- USAGE:
[molStr, molTable] = getMolFormula (model, metabolite)
- INPUTS:
model – COBRA model structure with minimal fields:
.mets - metabolite identifiers
.metFormulas - elemental formulas
metabolite – a metabolite identifier present in the model
- OUTPUTS:
molStr – the molecular formula for the specified metabolite
molTable – a cell array containing the breakdown of the metabolite by element
- integrate_cVector_into_model(model)[source]¶
Incorporates the c vector directly into the model as the reaction ‘obj_fun_rxn’.
- USAGE:
[model] = integrate_cVector_into_model (model)
- INPUTS:
model – COBRA model structure with minimal fields:
.S - stoichiometric matrix
.c - objective coefficients
- OUTPUTS:
model – Augmented COBRA model with the objective reaction ‘obj_fun_rxn’ added
- nutritionAlgorithm(model, rois, roisMinMax, options)[source]¶
This algorithm identifies the minimal changes to a diet necessary to get a desired change in one or more reactions of interest (rois). If a metabolite is entered instead of a reaction, the algorithm will optimize the diet with a sink or demand reaction for the corresponding metabolite of interest. For a walkthrough of the algorithm, see NutritionAlgorithmWalkthrough.mlx To cite the algorithm, please cite Weston and Thiele, 2022 and the COBRA Toolbox as specified on opencobra.github.io/cobratoolbox/stable/cite.html
- USAGE:
[newDietModel, pointsModel, roiFlux, pointsModelSln, menuChanges, detailedAnalysis] = nutritionAlgorithm (model, rois, roisMinMax, options)
- INPUTS:
model – COBRA model structure with minimal fields:
.S - stoichiometric matrix
.c - objective coefficients
.ub - upper flux bounds
.lb - lower flux bounds
.mets - metabolite identifiers
.rxns - reaction identifiers
.osenseStr - objective sense (‘max’ or ‘min’)
rois – cell array of all reactions of interest
roisMinMax – cell array of ‘min’/’max’ entries for rois
- OPTIONAL INPUTS:
options – Structure containing the optional specifications:
.display: display results “off” or “on”?
.roiWeights: a vector of weights for each reaction of interest
default is equal to 1
.targetedDietRxns: A nx2 cell array that specifies any dietary
items to target and the corresponding weight for adding the item.
.foodRemovalWeighting: Determines the relationship of food
removal weight with the weights specified by targetedDietRxns. The following are valid inputs for foodRemovalWeighting.
‘ones’ -> all dietary reactions from targetedDietRxns have a removal weight of one
‘inverse’ -> all dietary reactions from targetedDietRxns have a removal weight of one
‘ditto’ -> weights are equal to that of targetedDietRxns
added weights - nx2 cell array -> a customized cell array that functions like targedDietRxns but instead allows costomized weights for removing a food item rather than adding it. - {} empty cell array -> (default) An empty array assumes all dietary reactions are available from removal with a weight of one
- .slnType: Specify if solution should be ‘Detailed’ or ‘Quick’.
Default setting is ‘Detailed’
.roiBound: ‘Unbounded’ or ‘Bounded’. Default is ‘Bounded’.
- .foodAddedLimit: Specify a limit to the points produced by
adding food to the diet
- .foodRemovedLimit: Specify a limit to the points produced by
removing food from the diet
.OFS: the Objective Flux Scalar initiates a limiting threshold
for the solution’s objective function performance. A OFS of 1 means that the nutrition algorithm solution will produce a result that is atleast equal to, or greater than the maximum flux of the objective reaction on the original diet
- OUTPUTS:
newDietModel – a copy of the input model with updated diet reaction bounds to reflect recomended dietary changes
pointsModel – the resulting model that is used to identify recomended dietary changes. It includes points reactions and food added/removed reactions.
roiFlux – the flux values for each roi in the points solution
pointsModelSln – the entire points solution to pointsModel
menuChanges – summarizes the recommended dietary changes
detailedAnalysis – solutions for each simulation conducted in the detailed analysis