Methods for fitting dynamical models to single-cell data
Our paper about this method and application to resident-memory T cell data has been published in PLOS Computational Biology:
CH van Dorp, JI Gray, DH Paik, DL Farber, AJ Yates. A Variational deep-learning approach to modeling memory T cell dynamics PLoS Comput Biol 21(7): e1013242 (2025)
To install the scdynsys package, first clone the git repository,
and then create a virtual environment
git clone git@github.com:chvandorp/scdynsys.git
cd scdynsys
python3 -m venv .venvHere it is assumed that python3 points to a python version >= 3.10. Next, activate the virtual environment and install the package. This will download and install all dependencies.
source .venv/bin/activate
pip install .You can use pytest to see if something isn't working.
This will collect all unittests in the tests folder and run them.
pip install pytest
python3 -m pytestLarge data files are hosted on Zenodo.
To run the notebooks (see below), you first have to download the flow cytometry data from Zenodo.
Downloading the files can be done with the fetch_data command (provided by the scdynsys package):
fetch_dataThe files are download to the data folder.
The notebooks folder contains code used for the aforementioned preprint.
this folder also constans an overview (README) file describing what all notebooks are used for and the order in which
they have to be executed.
Some improvements:
- Replace python
pickles in the data folder with human-readablejsonfiles. - Refactor the notebooks to avoid code repetition between the CD8 and CD4 analysis.