This repository contains research code for the ongoing project about controllable diffusion models for single-cell data simulation.
A Python package scdeepsim (located under ./scdeepsim/), is built for convenient and reproducible research experiments. It provides a unified interface for latent diffusion modeling and controlled data simulation.
Notebooks under ./experiments/ show example analyses.
The package is defined by ./scdeepsim/pyproject.toml. To install from the repository root:
python -m pip install -U pip
python -m pip install -e "./scdeepsim"scdeepsim/src/scdeepsim/: package sourcediffusion_model.py: denoising backbone (MLP U-Net style) + classifier-free guidance logicdiffusion_core.py: diffusion schedules, losses, DDPM/DDIM samplinglightning_diffusion.py: Lightning training loop + sampling conveniencedataset.py:ScDataset/ScDataModuleae.py: autoencoder for single-cell datatransform.py: preprocessing scalersplot.py: UMAP plotting helperscontrol.py: controlled data simulation utilities
experiments/: research notebooks
- This repository is released under the MIT License (see
LICENSE). - Upstream inspiration/adaptation: parts of the diffusion implementation were inspired by and/or adapted from
lucidrains/denoising-diffusion-pytorch(MIT). SeeTHIRD_PARTY_NOTICES.mdfor details.