Skip to content
/ scDiff Public

scDiff: A General Single-Cell Analysis Framework via Conditional Diffusion Generative Models

License

Notifications You must be signed in to change notification settings

OmicsML/scDiff

Repository files navigation

scDiff

framework

This is the official codebase for A General Single-Cell Analysis Framework via Conditional Diffusion Generative Models.

Preprint

scDiff achieves competitive performance with state-of-the-art models in various benchmarking tasks. By incorporating prior knowledge with large language models and graph neural networks, scDiff shows outstanding few-shot and zero-shot results.

Installation

conda create -n scdiff python=3.9 -y && conda activate scdiff

# PyTorch
conda install pytorch==2.0.1 torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia -y

# PyG
conda install pyg==2.3.1 -c pyg

# Other dependencies
pip install -r requirements.txt

# scDiff
pip install -e .

conda clean --all -y

Set up data

# Install gdown for downloading data and pre-trained models
pip install gdown

gdown https://drive.google.com/uc?id=1dI3FS9My-8_TR0C6YSUklHzBHiVVXN4F
tar -xzvf reproducibility.tar.gz && mv reproduce/ data/

Run main evaluations

### Annotation experiments
SEED=10 bash run/run.sh annotation

### Imputation experiments
SEED=10 bash run/run.sh denoising

### Perturbation experiments
SEED=10 bash run/run.sh perturbation

### Gene perturbation experiments
SEED=10 bash run/run.sh genepert

### One-shot annotation experiments
SEED=10 TOPK=3 bash run/oneshot.sh

About

scDiff: A General Single-Cell Analysis Framework via Conditional Diffusion Generative Models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published