Code for "Simulation-based inference captures non-Markovian effects as exemplified in protein production kinetics through cell division"
This repository contains the code associated with the PNAS-published article "Simulation-based inference captures non-Markovian effects as exemplified in protein production kinetics through cell division"
In this work, we introduce a neural network–based inference framework that estimates likelihoods from simulation data, enabling inference in biological models that are non-Markovian or otherwise have intractable likelihoods.
You can fin the final version on PNAS:https://www.pnas.org/doi/10.1073/pnas.2517309123
model1_DCD/– Deterministic Cell Division (Model 1)model2_SCD/– Stochastic Cell Division (Model 2)model3_FCYeast/– Fluorescence-based flow cytometry inference (Model 3)real/– Inference from experimental S. cerevisiae data
To reproduce the results for Model 1 (Figure 3 in the manuscript), run:
cd model1_DCD
python 1DCD_training.pyThen run the Jupyter notebook 2DCD_figure.ipynb
which generates Fig3 of the manuscript.
Analogously for Model 2 run the rescpective files in the model2_SCD1 directory
To run inference on experimental flow cytometry data, place the data file found
here
into the folder clean_data/ then run the script:
cd real
python clean_data.pyThis will clean and preprocess the raw flow cytometry data for use in the inference in the real model and the autofluorescence calibration (in both Model 3 and real data)
In both the model3_FCYeast/ and real/ directories, a bash.sh script is provided to automate the workflow.
This script prepares the data, trains the necessary normalizing flows, and runs MCMC inference.
To execute, navigate into the respective folder and run:
cd model3_FCYeast
bash bash.sh
cd real
bash bash.shThese will generate the results and trained models used to produce Figures 5 and 6 of the manuscript. The corresponding Jupyter notebooks in each directory can then be used to visualize and export the figures.
This codebase builds on the normflows library.
Please make sure it is installed before running the scripts.
If you encounter any issues or have questions about the code or manuscript, feel free to open an issue or reach out to the authors via the contact information provided in the paper.
If you find this work useful, we appreciate the citation. Here's the BibTeX:
@article{pessoa2025simulation,
author = {Pedro Pessoa and Juan Andres Martinez and Vincent Vandenbroucke and Frank Delvigne and Steve Pressé },
title = {Simulation-based inference captures non-Markovian effects as exemplified in protein production kinetics through cell division},
journal = {Proceedings of the National Academy of Sciences},
volume = {123},
number = {15},
pages = {e2517309123},
year = {2026},
doi = {10.1073/pnas.2517309123}
}
