Predict metabolic fluxes and growth rates using constraint-based modeling with COBRApy.
pip install cobra
# For visualization:
pip install escherTell your AI agent what you want to do:
- "Run FBA on the E. coli core model"
- "Predict growth rate on glucose minimal media"
- "Compare growth on different carbon sources"
"Run FBA on my metabolic model and show the growth rate"
"What is the maximum theoretical yield of ethanol from glucose?"
"Simulate growth on acetate instead of glucose"
"What happens to growth under anaerobic conditions?"
"Show me the flux through glycolysis"
"Run FVA to find which reactions are flexible"
"Calculate the production envelope for lactate"
"What is the growth-coupled production rate of acetate?"
- Load metabolic model (from file or BiGG database)
- Configure media conditions and constraints
- Run FBA optimization
- Calculate growth rate and flux distribution
- Optionally run FVA for flux ranges
- Report key results and visualize if requested
- Model sources - BiGG database has curated models for many organisms
- Solver choice - GLPK is free; CPLEX/Gurobi faster for large models
- Growth units - Growth rate is typically in h^-1 (per hour)
- Uptake direction - Negative lower bound = allowed uptake
- pFBA - Use parsimonious FBA for more realistic flux distributions