torchcell.metabolism.pathway.apply_pathway
- apply_pathway(model: Model, pathway: HeterologousPathway, *, inplace: bool = False) Model[source]
Add a pathway’s metabolites, reactions and genes to a genome-scale model.
- Parameters:
model – The base genome-scale model.
pathway – The pathway to add.
inplace – Edit
modelrather than a copy. Default copies, because the base model is shared across arms and a mutated copy is an invisible difference between them.
- Returns:
The edited model.
- Raises:
ValueError – A pathway id already exists, or a reaction cannot be balanced.