Skip to content

Conditions

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

Functions

Function Summary
applyCondition Apply a deterministic condition to a model.

Reference

applyCondition

Apply a deterministic condition to a model.

Apply a deterministic "condition" to a model: a prelude that resets exchange bounds, optional metabolite removals + automatic charge rebalancing of a pseudoreaction, optional biomass-stoichiometry delta, and a per-reaction bounds diff. The schema is intentionally narrow so a condition can be reviewed as data.

Yeast-GEM was the first consumer; the same schema works for any GEM that keeps its condition presets as data rather than as code. Project-specific extensions (e.g. yeast-GEM's amino_acid_ratio step that rewrites a protein pseudoreaction's stoichiometry from a side-car TSV) are handled by the caller before / after this function — kept upstream-narrow on purpose.

Input arguments:

Name Type Description Default
model struct

RAVEN model struct.

required
condition char or struct

Either a path to a YAML condition file or a struct already produced by parseYAML. The expected schema (all keys optional):

prelude:
  reset_exchanges: out      % truthy -> reset all

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
required

Output arguments:

Name Type Description
model struct

Modified model.

Examples:

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

parseYAML