| name | gsmm-builder |
| description | Build or load a genome-scale metabolic model (GSMM) using COBRApy. Covers loading from BIGG, constructing minimal models from scratch, setting medium constraints, and exporting validated .json model files.
|
| metadata | {"category":"domain","trigger-keywords":"metabolic,metabolism,GSMM,COBRApy,COBRA,BIGG,genome-scale model,stoichiometric model,model loading,medium constraints","applicable-stages":"9,10,11,12,13","priority":"2"} |
Overview
The gsmm-builder skill constructs or loads genome-scale metabolic models
(GSMMs) in the COBRApy framework. It is the entry point for every metabolic
flux analysis pipeline. Output is a validated COBRApy Model object
serialized to a JSON file ready for downstream FBA and flux analysis.
GSMMs encode every known metabolic reaction in an organism as a
stoichiometric matrix. Constraints (reaction bounds, medium composition,
objective function) turn the model into a solvable linear program.
Workflow
Step 1 — Decide: Load Existing or Build from Scratch
Option A: Load a curated BIGG model
import cobra
import cobra.io
model = cobra.io.read_sbml_model("iJO1366.xml")
model = cobra.io.load_json_model("iJO1366.json")
print(f"Loaded {model.id}: reactions, "
)