Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tutorials

The tutorials come in two groups. Pick the group by what you want to do.

  • Simulation tutorials build a model from a paper or a question, simulate it and compare the outcome with a published figure, an exact law or archived data. No optimizer is needed to follow them.
  • Optimization tutorials put an optimizer from fcmaes around a simulation: they fit parameters to data, select models, design experiments or search for a trade-off, and then check what the optimizer returned.

The user guide, chapters 1 to 13, explains the interface that both groups use. Read chapters 1 to 4 first.

Every tutorial is runnable from this repository, saves the tables behind its figures, and says which of its numbers agree with the source, which are inconclusive and which disagree. A tutorial that misses a published value reports the miss; none is tuned until it matches.

Simulation tutorials

TutorialSourceWhat it doesOutcome
S1. mtDNA mutantsa teaching modelTakeover of a cell by mutant mtDNA: ensembles, trackers, event logs, a continuous ATP variable, methods and large studiesa worked example, not a reproduction
S2. Random drift of mtDNA mutantsKowald & Kirkwood 2013, Aging CellRe-creates Figure 1A–D: COX-negative cells over 120 years, the mutation rate for 5, 10 and 15%, clones per cellcontributed by an author of the paper
S3. Three mtDNA mechanismsKowald & Kirkwood 2014, PNAS; Kowald, Dawson & Kirkwood 2014, J. Theor. Biol.Drift, size advantage and transcription-linked replication, each calibrated to 10% affected cells, then compared by mutant lineages per cell1.26 lineages at three years, as published; two unstated model points confirmed by an author
S4. Spatial spread of mtDNA deletionsInsalata et al. 2022, PNASTwo coupled regions and a traveling wave along a muscle fiber; an extension with de novo deletionsFigure 1C agrees; the wave speed is an unresolved discrepancy (0.13–0.16 against 0.190 µm/day)
S5. Mitochondrial networks and driftAryaman et al. 2019, GeneticsVariance of the mutant fraction under fusion and fission, against Equation 13 and the archived simulationsagreement in 38 of 39 conditions, the 39th after a rerun
S6. The mtDNA bottleneckJohnston et al. 2015, eLifeSix developmental phases with divisions; approximate Bayesian computation against copy numbers and variancesFigure 3 reproduced up to 50 days; the copy number at day 100 is 23 times below the published curve
S7. Protein distributionsShahrezaei & Swain 2008, PNASExact stationary laws of two-stage expression against the negative-binomial approximationFigure 1D matches if its unit is bits, not nats; the paper does not state the unit

Optimization tutorials

Three tutorials fit models to data with fcmaes:

TutorialSourceWhat is optimizedOutcome
O1. Fitting parameters to datathe model of tutorial S1Two rates of a stochastic model against single-cell data: Monte Carlo noise, common random numbers, staged refinement, held-out checksa worked example
O2. Inferring mtDNA takeover timesKowald & Kirkwood 2026, npj AgingMutation probability, selection advantage and advantageous fraction from cell snapshotsevery true value inside its 95% interval; the baseline intervals are narrower than published, cause unknown
O3. Fitting single-cell RNA distributionsMunsky et al. 2018, PNASA four-state gene model against 59,557 yeast cells, by means and by whole histogramsthe published scores reproduce; the searches start near the published vector, so they test the route, not a blind fit

Ten lessons live with their code in tutorials/optimization and run through one command, python tutorials/optimization/run.py C1 … C10. The lessons page introduces them. C1 to C4 teach the route on synthetic data; C5 to C10 each reconstruct a published optimization study.

LessonSourceWhat is optimizedOutcome
C1. Calibrationsynthetic dataRates of a stochastic model, with reusable preparationmethod lesson
C2. Sensitivitiessynthetic dataRates of an ODE model with derivatives, then transferred to the stochastic modelmethod lesson
C3. Oscillatorssynthetic circuitsSeveral objectives and a diversity archive over oscillating circuitsmethod lesson
C4. Rulesexact aggregation lawsKernels of a rule-based model from finite samplesmethod lesson
C5. RNA count calibrationPoovathingal & Gunawan 2010, BMC BioinformaticsThree rates from count distributionsthe three rates are recovered within 3% from 10,000 trajectories; from 100 trajectories two of four data sets miss one rate by a factor 1.7 along a flat valley of the score
C6. Stimulus model selectionGómez-Schiavon et al. 2017, Genome BiologySeven hypotheses fitted to 376 measured cells, ranked by AIC and BICboth criteria select the published model; the fitted rates lie within one posterior standard deviation of the paper’s
C7. Virtual reactor designFelton et al. 2021, Chemistry–MethodsYield and waste of a reactor in 50 evaluationsat 50 evaluations MODE is no better than random search and far below the paper’s best strategy; with 500 it passes that strategy’s median
C8. Sampling designFox & Munsky 2019, PLoS Comput. Biol.Sampling times and a stimulus pulse by Fisher informationthe sampling optimum and the ranking of the two published designs in 97 of 100 parameter samples are reproduced, the archived matrices entry by entry
C9. STAT5 calibrationBoehm et al. 2014, J. Proteome Res.Nine parameters of a signaling model against a PEtab problemthe native model reproduces the archived likelihood within 2e-6 nats; a search with profiled noise scales reaches it in three of five seeds, plain retries stop 9 nats above
C10. Pathway calibrationMoles, Mendes & Banga 2003, Genome ResearchThirty-six parameters over sixteen experimentsthe objective is verified; searches of up to 20,000 evaluations reach costs of 62 to 667 against a published 0.0013 after 2.8 million

How the tutorials were made

Tutorial S2 was contributed by an author of the paper it re-creates. The other tutorials were written by AI agents directed by the maintainer: an agent read the paper, rebuilt the model, ran it and compared the numbers; other agents then reviewed the work without having seen it made. Unless a tutorial says otherwise, the papers’ authors did not write or review it. The README describes this way of working and the two others the project is built for.