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
Cell DISentangled Experts for Covariate counTerfactuals (CellDISECT)
CellDISECT is a causal generative model designed to disentangle known covariate variations from unknown ones at test time while simultaneously learning to make counterfactual predictions. CellDISECT finds multiple latent representations for each cell, one unsupervised, and the rest weakly supervised by the provided covariates.
Its latent space captures not only covariate-specific information but also new biology, thereby offering users a multifaceted view of the data and enhancing the ability for cell type discovery.
Moreover, by using different "expert" models to learn each latent it achieves flexible fairness in single-cell analysis. This flexibility allows choosing which covariates to use as biological and which as batch, at test time, as opposed to at train time like with most methods.
Finally, it can model the effect of perturbations on one or many covariates by calculating the counterfactual gene expression under the perturbations.
Installation
Prerequisites
Conda Environment
We recommend using Anaconda/Miniconda to create a conda environment for using CellDISECT. You can create a python environment using the following command:
conda create -n CellDISECT python=3.9
Then, you can activate the environment using:
conda activate CellDISECT
- Install pytorch (This version of CellDISECT is tested with pytorch 2.1.2 and cuda 12, install the appropriate version of pytorch for your system.)
conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia
- (Optional) if you plan to use 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
- Install CellDISECT You can either install the stable version published on pypi using pip:
pip install celldisect
Or you can install the latest developed version directly from our github:
pip install git+https://github.com/Lotfollahi-lab/CellDISECT
- (Optional) to install cuda enabled jax:
pip install -U "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
How to use CellDISEC
| Description | Link |
|---|---|
| Counterfactual prediction and DEG analysis |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file celldisect-0.1.2.tar.gz.
File metadata
- Download URL: celldisect-0.1.2.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08c8213db194f6c05d5de7b8933e31735e16259e3d54c16f2d5eb91c39492928
|
|
| MD5 |
6c1b5197c4cc85d9cb39df7e4a75eec8
|
|
| BLAKE2b-256 |
485a4cf7417d01759e235e640f1ef3f375a262d6702e7429a9871cb1fac7ffe7
|
File details
Details for the file celldisect-0.1.2-py3-none-any.whl.
File metadata
- Download URL: celldisect-0.1.2-py3-none-any.whl
- Upload date:
- Size: 32.4 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66d169b720dff569c18209c822295eaa7b19aae5c1b27d23842bb2eedc1fc6af
|
|
| MD5 |
8f6ae1c47859c662324a5f50f01227e1
|
|
| BLAKE2b-256 |
a7bbdca15d39620a1b15e24b9c0cec708e9c507519819e7d369c1e9dcf944273
|