Constraint-based modelling of metabolism — a short course in three lectures.
Dario Pescini · University of Milano-Bicocca · Department of Statistics and Quantitative Methods
A metabolic network constrains what a cell can do long before any kinetics are known. This course takes that idea as far as it goes: from a reaction network and its stoichiometry to the set of flux distributions a cell could reach, then to Flux Balance Analysis, which picks one of them by assuming the cell optimises something. We check that answer against a real measurement, find where it disagrees, and trace the disagreement back to defects in the reconstruction itself. The last lecture asks how much of the answer was ever determined — through flux variability, gene deletions and sampling — and what to do when "optimal" is the wrong assumption.
The emphasis throughout is on what a model does not tell you. All the calculations in the slides are reproduced by a hands-on exercise you run yourself, in Python with COBRApy.
| I — From Network to Solution Space | networks and fluxes · reconstruction · the steady-state assumption · constraints · the solution space |
| II — Flux Balance Analysis | linear programming · alternative optima and pFBA · growth yield against experiment · nine diagnostic checks and how to fix what they find |
| III — Beyond the Optimum | flux variability · perturbations and deletions · sub-optimality · sampling · ensembles |
| Capstone | ENGRO 1: constrain a cancer core model, break it, and explain what it predicts |
Each lecture has a hands-on file with worked solutions and a skeleton to fill in. Models
used: a 19-reaction toy model you can hold in your head, e_coli_core, and ENGRO 1.
Everything you need is in this folder. With mamba or conda installed:
mamba env create -f environment.yml
mamba activate cbm-courseThen check it works:
python -c "import cobra; print(cobra.io.load_model('textbook').slim_optimize())"
# 0.8739215069684307That is the growth rate of E. coli on glucose, and it is the first number in Lecture II. If you get it, you are ready.
slides/ |
the three lectures, as PDFs |
CBM_L0N_exercises.md |
the exercises, with worked solutions folded away — try before opening |
CBM_L0N_functionsRecap.md |
every function used, its aim, its parameters, and where the docs are |
CBM_L0N_Scheletro.py |
a skeleton to fill in, if you prefer starting from one |
CBM_L04_capstone.md |
the capstone: one model, everything from all three lectures |
models/ |
the models — nothing downloads at run time |
scripts/diagnose.py |
the diagnostics tool, used in Lecture II exercise 6 |
Run everything from this folder, so the paths in the exercises resolve:
cd CBM_course
mamba activate cbm-course
python scripts/diagnose.py models/toymodel.xmlExercises are plain .py and .md files — no notebooks. Solutions are in each
exercises file under Show solution; every one of them runs.