Skip to content

Biomass

MATLAB functions in RAVEN/biomass of the RAVEN toolbox. Help text is collected from the source of the tracked branch.

Functions

Function Summary
fitParameters Fit parameters such as maintenance ATP by quadratic programming.
getBiomassFractions Compute mass fraction per biomass component.
scaleBiomassFraction Rescale a biomass component to a target value.
scaleBiomassPseudoreaction Rescale a biomass component pseudoreaction.
setGAM Set the growth-associated maintenance (GAM) coefficient.

Reference

fitParameters

Fit parameters such as maintenance ATP by quadratic programming.

Input arguments:

Name Type Description Default
model struct

a model structure.

required
xRxns cell

cell array with the IDs of the reactions that will be fixed for each data point.

required
xValues double

matrix with the corresponding values for each xRxns (columns are reactions).

required
rxnsToFit cell

cell array with the IDs of reactions that will be fitted to.

required
valuesToFit double

matrix with the corresponding values for each rxnsToFit (columns are reactions).

required
parameterPositions struct

structure that determines where the parameters are in the stoichiometric matrix, with fields:

  • position : cell array of vectors where each element contains the positions in the S-matrix for that parameter
  • isNegative : cell array of vectors where the elements are true if that position should be the negative of the fitted value (to differentiate between production/consumption)
required

Name-value arguments:

Name Type Description Default
fitToRatio logical

if the ratio of simulated to measured values should be fitted instead of the absolute value. Used to prevent large fluxes from having too large an impact (default true).

initialGuess double

initial guess of the parameters (default ones).

plotFitting logical

true if the resulting fitting should be plotted (default false).

Output arguments:

Name Type Description
parameters double

fitted parameters in the same order as in parameterPositions.

fitnessScore double

the corresponding residual sum of squares.

exitFlag double

exit status returned by fminsearch.

newModel struct

updated model structure with the fitted parameters.

Examples:

[parameters, fitnessScore, exitFlag, newModel]=fitParameters(model,...
    xRxns,xValues,rxnsToFit,valuesToFit,parameterPositions,fitToRatio,...
    initialGuess,plotFitting);

getBiomassFractions

Compute mass fraction per biomass component.

Compute the mass fraction (g/gDW) per biomass component plus the total. Mirrors raven_python.biomass.sum_biomass; the MATLAB counterpart of yeast-GEM's legacy sumBioMass.

The biomassConfig struct describes the per-organism biomass layout — see Parameters below. Components whose pseudoreaction is missing from the model contribute 0.

Input arguments:

Name Type Description Default
model struct

RAVEN model struct.

required
biomassConfig struct

Struct describing the biomass layout, with fields:

  • biomass_rxn : rxn id of the top-level biomass pseudoreaction.
  • proton_met : met id of cytosolic H+ (used only by rescalePseudoreaction; may be unused here).
  • components : cell array of component structs, each with fields:

  • name : component name (e.g. 'protein').

  • pseudoreaction_name : model.rxnNames entry to identify the pseudoreaction.
  • mass_strategy : 'mw' | 'mw_minus_2h' | 'mw_minus_water' | 'grams' — see Notes below.
required

Output arguments:

Name Type Description
fractions struct

Struct keyed by component name plus 'total': fractions.protein, fractions.RNA, ... etc. All values are in g/gDW.

Examples:

fractions = getBiomassFractions(model, biomassConfig);
Notes

mass_strategy values:

'mw'              MW from chemical formula
'mw_minus_2h'     MW − 2.016 g/mol (two protons released per charged
                  tRNA — protein-pseudoreaction substrates)
'mw_minus_water'  MW − 18.015 g/mol (water released per
                  polymerisation step — RNA / DNA)
'grams'           stoichiometry already in g/gDW (lipid backbone)

scaleBiomassFraction

Rescale a biomass component to a target value.

Rescale a biomass component to a target g/gDW value, optionally balancing a second component so the total biomass mass stays at 1 g/gDW. Mirrors raven_python.biomass.scale_biomass and yeast-GEM's legacy scaleBioMass.

Input arguments:

Name Type Description Default
model struct

RAVEN model struct.

required
biomassConfig struct

Struct (see getBiomassFractions).

required
componentName char

Component to rescale.

required
newValue double

Target fraction in g/gDW.

required

Name-value arguments:

Name Type Description Default
balanceOut char

Second component name to adjust so the biomass total remains 1 g/gDW. Empty / omit to skip balancing.

Output arguments:

Name Type Description
model struct

Modified model.

Examples:

model = scaleBiomassFraction(model, biomassConfig, 'protein', 0.5, 'carbohydrate');
See also

getBiomassFractions

scaleBiomassPseudoreaction

Rescale a biomass component pseudoreaction.

Multiply the substrate coefficients of one biomass component pseudoreaction by factor and rebalance H+ to preserve charge neutrality. Mirrors raven_python.biomass.rescale_pseudoreaction and yeast-GEM's legacy rescalePseudoReaction.

"Substrate" means every metabolite in the pseudoreaction whose metabolite name does NOT match the component name (the component's product is left untouched). After rescaling, the coefficient of biomassConfig.proton_met is recomputed so the pseudoreaction's total ionic charge sums to zero.

Input arguments:

Name Type Description Default
model struct

RAVEN model struct.

required
biomassConfig struct

Struct (see getBiomassFractions).

required
componentName char

Name of the component to rescale (must match biomassConfig.components{i}.name for some i, AND be the model.metNames of the produced metabolite in the matching pseudoreaction).

required
factor double

Multiplicative factor.

required

Output arguments:

Name Type Description
model struct

Modified model.

Examples:

model = scaleBiomassPseudoreaction(model, biomassConfig, 'protein', 0.9);
See also

getBiomassFractions

setGAM

Set the growth-associated maintenance (GAM) coefficient.

Set the growth-associated maintenance (GAM) coefficient in the biomass pseudoreaction, and optionally fix the non-growth maintenance (NGAM) reaction's bounds. Mirrors raven_python.biomass.set_gam and yeast-GEM's legacy changeGAM.

For every metabolite in the biomass pseudoreaction whose model.metNames entry is in cofactorMetNames, the stoichiometric coefficient is set to ±value preserving the sign of the current coefficient. Yeast-GEM scales ATP, ADP, H2O, H+ and phosphate (with ATP and H2O on the substrate side, ADP / H+ / phosphate on the product side).

Input arguments:

Name Type Description Default
model struct

RAVEN model struct.

required
value double

New GAM value (mmol ATP / gDW per growth unit).

required
biomassRxn char

Reaction id of the biomass pseudoreaction.

required
cofactorMetNames cell

Cell array of metabolite NAMES (not IDs) to rescale, e.g. {'ATP','ADP','H2O','H+','phosphate'}.

required

Name-value arguments:

Name Type Description Default
ngamRxn char

NGAM reaction id. Required when ngamValue is supplied.

ngamValue double

NGAM flux to fix. Sets the NGAM reaction's bounds to (ngamValue, ngamValue).

Output arguments:

Name Type Description
model struct

Modified model.

Examples:

model = setGAM(model, 80, 'r_4041', {'ATP','ADP','H2O','H+','phosphate'});