Conditions#
MATLAB functions in RAVEN/src/conditions of the RAVEN toolbox.
Functions#
Function |
Summary |
|---|---|
Apply a deterministic condition to a model. |
Reference#
applyCondition#
function model = applyCondition(model, condition)
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.
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.
Parameters
model: structRAVEN model struct.
condition: char or structEither 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
Returns
model: structModified model.
Examples
model = applyCondition(model, 'data/conditions/anaerobic.yml');
model = applyCondition(model, parseYAML('data/conditions/anaerobic.yml'));
See also
parseYAML