torchcell.metabolism
Genome-scale metabolic modeling. yeast_GEM wraps the yeast-GEM model (through cobra) and derives its reaction and metabolite graphs; constraints turns a genome-scale model into constraint tensors; flux_layer is a differentiable, enzyme-constrained flux layer; media maps an ontology Media object onto exchange bounds; pathway adds a heterologous pathway to a model as a typed perturbation; and enzyme_kinetics and parameters hold kinetic parameters with their provenance. Nothing is re-exported at the package level, because yeast_GEM imports cobra and downloads the model on first use; import the submodule you need.
betaxanthin
The betaxanthin cassette Cachera transferred into the yeast knockout collection.
Functions
Build the cassette as a pathway object against one genome-scale model. |
|
Demand reactions whose flux sums to the measured yellow pigment. |
constraints
Genome-scale model -> constraint tensors, as pure functions of a GEM.
Classes
How the flux layer forms its reaction potential. |
|
How much of a parameter table is real, stated rather than assumed. |
|
Standard transformed Gibbs energies for one GEM, with provenance. |
|
The GPR, flattened into AND-terms, as index arrays rather than strings. |
|
A genome-scale model as tensors: stoichiometry, bounds, GPR, thermodynamics. |
Functions
Load \(\Delta_f G'^\circ\) / \(\Delta_r G'^\circ\) from a GEM checkout. |
|
Flatten every GPR into AND-terms indexed against |
|
Pick a maximal set of linearly independent rows of |
|
An orthonormal basis \(\mathcal{N}\) of \(\ker S\), so \(S\mathcal{N}=0\). |
|
Extract every constraint tensor from a cobra model. |
|
Check the recomputed \(\Delta_r G'^\circ\) against the shipped column. |
enzyme_kinetics
Enzyme kinetic parameters (k_cat, K_M) with provenance, from the Open Enzyme Database.
Classes
Which constant is being resolved. |
|
Where a value came from. |
|
Provenance for one retrieved OED slice. |
|
One OED row, kept verbatim. |
|
A single parameter chosen for a (protein, substrate) pair, with its audit trail. |
Functions
Page the OED |
|
Fetch an organism slice, write it with a sha256-pinned provenance record. |
|
Read the mirror and VERIFY its sha256 before returning anything. |
|
Choose one value from many measurements, by the documented cascade. |
|
Group rows by UniProt accession, the key the GPR maps yeast genes onto. |
flux_layer
A differentiable, enzyme-constrained, thermodynamically-feasible flux layer.
Classes
pH, ionic strength and membrane potential per compartment. |
|
Every switch the flux layer has, in one place so a run records what it ran. |
|
Gene tokens in, a feasible flux vector and its feasibility residuals out. |
Functions
Map GEM gene positions onto the model's gene-token positions. |
media
Map an ontology Media object onto genome-scale-model exchange bounds.
Classes
Magnitudes assigned to an uptake bound, by the component's functional role. |
|
One exchange reaction opened to an uptake magnitude, with its provenance. |
|
What became of one ontology component on the way to a bound vector. |
|
A medium expressed as exchange bounds for one specific model. |
|
Exchange-level difference between two bound vectors on the same model. |
|
Lookup tables built once from a model's exchange reactions. |
Functions
Index a model's exchange reactions by annotation identifier and by name. |
|
Place one ontology component on zero or more exchange reactions. |
|
Map an ontology |
|
Exchange-level difference between two bound vectors. |
parameters
Kinetic and physical parameters for a GEM, database-first and provenance-tagged.
Classes
Where one parameter value came from. |
|
A sequence-based turnover predictor. |
|
The predictors a run is allowed to use, in priority order. |
|
One resolved parameter per entity, with a per-entity provenance tag. |
Functions
Read |
|
Per-gene molecular weight in kDa, from SwissProt. |
|
Systematic ORF name -> UniProt accession, the join key into any kinetics database. |
|
One \(k_{cat}\) per catalytic unit, database-first. |
|
ChEBI id -> measured intracellular concentration in molar, from YMDB. |
|
Per-metabolite measured concentration prior, in molar, plus its coverage mask. |
pathway
Add a heterologous pathway to a genome-scale model, as a typed perturbation.
Classes
Where a coefficient came from, so a guess can never read as a measurement. |
|
A metabolite the genome-scale model does not have yet. |
|
A reaction the genome-scale model does not have yet. |
|
A named set of metabolites, reactions and genes added to a base strain. |
Functions
Add a pathway's metabolites, reactions and genes to a genome-scale model. |
yeast_GEM
Wrapper around the yeast-GEM metabolic model and its derived graphs.
Classes
A reaction with no metabolites, which neither graph view can represent. |
|
Download, load, and expose the yeast-GEM genome-scale model. |
Functions
Plot hypergraph for a specific reaction. |
|
Plot the entire metabolic network structure without labels. |
|
Plot a random subgraph of the metabolic network and save it. |
|
Plot a bipartite network visualization of genes to metabolites. |
|
Print details for a few random reactions as a sanity check. |
|
Analyze reactions without gene associations in the YeastGEM model. |
|
Test and display the new attributes added to the bipartite graph. |