Skip to main content

scdiffeq_logo

PyPI pyversions PyPI version DOI

An analysis framework for modeling dynamical single-cell data with neural differential equations, most notably stochastic differential equations allow us to build generative models of single-cell dynamics.

Quickstart

Please see the scDiffEq website for a quickstart notebook: link

Install the development package

Install generally only takes a few seconds.

Using uv (recommended)

git clone https://github.com/scDiffEq/scDiffEq.git; cd ./scDiffEq;

# Install uv if you haven't already: curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync

Using pip

git clone https://github.com/scDiffEq/scDiffEq.git; cd ./scDiffEq;

pip install -e .

Optional dependency groups

Extra Contents
optional Lazily-imported integrations: umap-learn, pillow, ipython, psutil, wandb
docs Sphinx and theme packages for building the documentation
test pytest, for running the test suite
dev Jupyter, ipykernel, and pytest for interactive development
# Using uv
uv sync --extra docs

# Using pip
pip install -e ".[docs]"

Datasets

import scdiffeq as sdq

adata = sdq.datasets.larry()

Datasets are downloaded on first use and cached under <data_dir>/scdiffeq_data/. They are hosted on Zenodo (10.5281/zenodo.21947161); downloads need no authentication and are verified against the record's md5 checksums.

The record redistributes data published by other groups — please cite the original publications, listed on the data page and in the Zenodo record.

Main API

import scdiffeq as sdq

model = sdq.scDiffEq(adata=adata)

model.fit(train_epochs = 1500)

Built on

pytorch_logopytorch_lightning_logo neural_diffeqs_logo

System requirements

  • Developed on linux20.04 and MacOS (with Apple Silicon), using Python3.11.
  • Software dependencies are listed in pyproject.toml.
  • Tested with NVIDIA GPUs (A100, T4) and Apple Silicon. Most datasets likely only require an NVIDIA Tesla T4 (free in Google Colab).

Reproducibility

  • All results described in the manuscript detailing scDiffEq can be reproduced using notebooks in the companion repository: scdiffeq-analyses

Citation

@article{vinyard2025scdiffeq,
  title   = {Learning cell dynamics with neural differential equations},
  author  = {Vinyard, Michael E. and Rasmussen, Anders W. and Li, Ruitong
             and Klein, Allon M. and Getz, Gad and Pinello, Luca},
  journal = {Nature Machine Intelligence},
  volume  = {7},
  number  = {12},
  pages   = {1969--1984},
  year    = {2025},
  doi     = {10.1038/s42256-025-01150-3}
}

If you use the packaged datasets, please also cite their original publications (see the data page).

Metadata

Release files for scdiffeq 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scdiffeq 1.1.4
File Size Uploaded
scdiffeq-1.1.4.tar.gz 4.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for scdiffeq 1.1.4
File Interpreter ABI Platform
scdiffeq-1.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 4.3 MB

Release files / scdiffeq-1.1.4.tar.gz

Download URL scdiffeq-1.1.4.tar.gz
Size 4.1 MB
Tags Source
SHA-256 checksum
How to use checksums
03feb34e9e3e08fd553e52ddb7ae147f5a0e0e3483309666adaad5a029af9e5f
BLAKE2b-256 checksum
How to use checksums
b7ed6cd5f5b0e9dc59b0d06c6424b86be1b1673be3a3addb92b566f521b818bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / scdiffeq-1.1.4-py3-none-any.whl

Download URL scdiffeq-1.1.4-py3-none-any.whl
Size 209.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe1ec8df8d4821925495b63c09e0e804aa3d3281da67eb551e98d3cc26fca1b5
BLAKE2b-256 checksum
How to use checksums
3165cf4bf1a42d03ef5479d9b37d408c7fa1f6c18069282261c4f232056c566e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.1.4 This release

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.55

2 release files

0.0.54

2 release files

0.0.53

2 release files

0.0.52

2 release files

0.0.51

2 release files

0.0.50

2 release files

0.0.49

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page