Conditions#

MATLAB functions in RAVEN/src/conditions of the RAVEN toolbox.

Functions#

Function

Summary

applyCondition

Apply a deterministic condition to a model.

Reference#

applyCondition#

function model = applyCondition(model, condition)

Apply a deterministic condition to a model.

The steps of a condition are applied in this order: a prelude that resets exchange bounds, metabolite removals from a pseudoreaction with automatic charge rebalancing, a change of biomass stoichiometry, and per-reaction bound changes. A final check compares the number of uptake bounds with an expected count. The schema covers only these steps, so a condition can be reviewed as data.

The schema applies to any GEM whose condition presets are kept as data. Project-specific extensions, for example yeast-GEM's amino_acid_ratio step that rewrites the stoichiometry of a protein pseudoreaction from a separate TSV file, are applied by the caller before or after this function.

Parameters

model : struct

RAVEN model struct.

condition : char or struct

Path to a YAML condition file, or a struct as produced by parseYAML. The schema is as follows (all keys optional). reset_exchanges is passed as the reaction type to getExchangeRxns; the lower bound of the matching reactions is set to 0 and the upper bound to 1000. charge_balance_met receives the coefficient that makes the charge of rxn_id zero, which requires the metCharges field; a participant of rxn_id other than charge_balance_met with a NaN charge raises applyCondition:unknownCharge. add entries are added to the existing coefficients. A bounds entry whose rxn is not in the model is skipped with a warning. expected_uptake_count is compared with the number of bounds entries with lb of -1000, and a warning is issued when they differ.

prelude:
  reset_exchanges: out

cofactor_pseudoreaction:
  rxn_id: r_4598
  remove_mets:
    - { met: s_3714 }
  charge_balance_met: s_0794

biomass_stoichiometry_delta:
  rxn_id: r_4041
  add:
    - { met: s_0689, coef:  0.08 }
    - { met: s_0687, coef: -0.08 }
    - { met: s_0794, coef: -0.16 }

bounds:
  - { rxn: r_1654, lb: -1000 }
  - { rxn: r_1992, lb: 0 }
  - { rxn: r_1663, lb: 0, ub: 0 }

expected_uptake_count: 15

Returns

model : struct

Model with the condition applied.

Examples

model = applyCondition(model, 'data/conditions/anaerobic.yml');
model = applyCondition(model, parseYAML('data/conditions/anaerobic.yml'));

See also

parseYAML