BioCRNPyler Interface

This notebook shows the AutoReduce workflow for a BioCRNPyler-generated model. BioCRNPyler is optional; install autoreduce[bio] before running this notebook.

Workflow

The workflow is

  1. Build or load a BioCRNPyler model.

  2. Export the model to SBML.

  3. Load the SBML file as an AutoReduce System.

  4. Apply conservation laws or QSSA using AutoReduce.

AutoReduce treats SBML as a compatibility format here. The reduction itself is performed on the symbolic system that AutoReduce constructs from the imported model.

[ ]:
from pathlib import Path

from autoreduce import load_sbml

model_path = Path("models") / "biocrnpyler_gene_expression.xml"
system = load_sbml(str(model_path))

state_names = [str(state) for state in system.x]
parameter_names = [str(parameter) for parameter in system.params]

state_names, parameter_names[:5]

Inspect the imported system

The imported model can now be passed directly to the same reduction routines used for SymPy-defined models.

[ ]:
len(system.x), len(system.params)

Select reduction assumptions

For BioCRNPyler models, inspect the state names before choosing conservation laws or fast states. The correct choices depend on the mechanisms included in the model, such as transcription, translation, binding, or degradation reactions.

[ ]:
for index, state in enumerate(system.x):
    print(index, state)