Skip to main content

Cell DISentangled Experts for Covariate counTerfactuals (CellDISECT). Causal generative model designed to disentangle known covariate variations from unknown ones at test time while simultaneously learning to make counterfactual predictions.

Project description

CellDISECT

⚠️ BETA VERSION NOTICE: This is version 0.2.0b1, a beta release with compatibility updates for Google Colab and newer versions of torch and scvi-tools. For the stable version, please see the main branch.

celldisect-logo

PyPI version Documentation Status License Stars Downloads

🧬 Overview

CellDISECT (Cell DISentangled Experts for Covariate counTerfactuals) is a powerful causal generative model that enhances single-cell analysis by:

  • 🔍 Disentangling Variations: Separates covariate variations at test time
  • 🧪 Counterfactual Predictions: Learns to make accurate counterfactual predictions
  • 🎯 Flexible Fairness: Achieves flexible fairness through expert models for each latent space
  • 🔬 Enhanced Discovery: Captures both covariate-specific information and novel biological insights

📚 Documentation

Visit our comprehensive documentation for:

  • Detailed API reference
  • Step-by-step tutorials
  • Best practices and examples
  • Advanced usage guides

🚀 Quick Start

Prerequisites

We recommend using Anaconda/Miniconda. Create and activate a new environment:

conda create -n CellDISECT python=3.9
conda activate CellDISECT

Installation

  1. Install PyTorch (tested with pytorch 2.1.2 and cuda 12):
conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia
  1. Install CellDISECT:
# Via pip (stable version)
pip install celldisect

# Or via GitHub (latest development version)
pip install git+https://github.com/Lotfollahi-lab/CellDISECT

Optional Dependencies

Click to expand optional installations

RAPIDS/rapids-singlecell:

pip install \
    --extra-index-url=https://pypi.nvidia.com \
    cudf-cu12==24.4.* dask-cudf-cu12==24.4.* cuml-cu12==24.4.* \
    cugraph-cu12==24.4.* cuspatial-cu12==24.4.* cuproj-cu12==24.4.* \
    cuxfilter-cu12==24.4.* cucim-cu12==24.4.* pylibraft-cu12==24.4.* \
    raft-dask-cu12==24.4.* cuvs-cu12==24.4.*

pip install rapids-singlecell

CUDA-enabled JAX:

pip install -U "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

📖 Tutorials & Examples

Basic Tutorials

Tutorial Description Links
Basic Training Learn how to train CellDISECT and make counterfactual predictions using the Kang dataset Open In Colab Documentation

Advanced Applications

Tutorial Description Links
Latent Space Analysis Explore combinations of CellDISECT latent spaces for erythroid subset inference Documentation
Double Counterfactual Advanced tutorial recreating Scenario 2 counterfactual on the Eraslan dataset Documentation

🤝 Contributing

We welcome contributions! Please see our contributing guidelines for details on how to:

  • Report issues
  • Submit bug fixes
  • Propose new features
  • Submit pull requests

📜 License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

📫 Contact

For questions and support:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

celldisect-0.2.0b1.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

celldisect-0.2.0b1-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file celldisect-0.2.0b1.tar.gz.

File metadata

  • Download URL: celldisect-0.2.0b1.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.3.0

File hashes

Hashes for celldisect-0.2.0b1.tar.gz
Algorithm Hash digest
SHA256 433db6ff4a0312f1bf1d04342b1eee73305d63ad69a41a65994aad6a54001098
MD5 4e657ec0947b4d22283c81e22af135d7
BLAKE2b-256 1ccf15e18f859e373490e77371f9c04e196b966a04633090e9567f4c790a7c75

See more details on using hashes here.

File details

Details for the file celldisect-0.2.0b1-py3-none-any.whl.

File metadata

  • Download URL: celldisect-0.2.0b1-py3-none-any.whl
  • Upload date:
  • Size: 35.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.3.0

File hashes

Hashes for celldisect-0.2.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f3862a1e5ce0bad838db08914a139e4af850a152e0200ee928924c952dc551c
MD5 326b33a86c8012aa89f0e6b0f00522d4
BLAKE2b-256 960bde55d859b04331084c39312d22acc3974f853f3aec45cd515dd7901a20e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page