Skip to main content

Spatial-omics data embedding and analysis

Project description

stars-badge build-badge Code style: black license-badge Python 3.10|3.11|3.12

DECIPHER

DECIPHER aims to learn cells’ disentangled embeddings from intracellular state and extracellular contexts view based on single-cell spatial omics data.

DECIPHER

Installation

[!IMPORTANT] Requires Python >= 3.10 and CUDA-enabled GPU (CPU-only device is not recommended).

PyPI

We recommend to install cell-decipher to a new conda environment with RAPIDS dependencies.

mamba create -n decipher -c conda-forge -c rapidsai -c nvidia python=3.11 rapids=24.04 cuda-version=11.8 cudnn cutensor cusparselt -y && conda activate decipher
pip install cell-decipher
install_pyg_dependencies

Docker

Build docker image from Dockerfile or pull the latest image from Docker Hub by:

docker pull huhansan666666/decipher:latest

Documentation

Please check documentation for detailed tutorial.

Minimal example

Here is a minimal example for quick start:

import scanpy as sc
from decipher import DECIPHER

# Init model
model = DECIPHER(work_dir='/path/to/work_dir')

# Register data
adata = sc.read_h5ad('/path/to/adata.h5ad')
model.register_data(adata)

# Fit model
model.fit_omics()

# Get disentangled omics and spatial embeddings
omics_emb = model.center_emb
spatial_emb = model.nbr_emb

Demo

Name Description
Basic Model Tutorial (Colab) Tutorial on how to train DECIPHER
Identify Localization Related Genes Tutorial on how to identify cells’ localization related genes via DECIPHER embeddings
Multi-slices with Batch Effects Tutorial on how to remove batch effects across multiple slices
DDP Training Tutorial on how to use multi-GPUs on large datasets

Citation

TBD

If you want to repeat our benchmarks and case studies, please check the benchmark and experiments folder.

FAQ

  1. CUDA out of memory error

We do all experiments on A100-80G GPUs. We observed model.train_gene_select() may use ~40GB for 700,000 cells with 1,000 genes. If your GPU do not have enough memory, you can try running with CPU.

Acknowledgement

We thank following great open-source projects for their help or inspiration:

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

cell_decipher-0.1.0.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

cell_decipher-0.1.0-py3-none-any.whl (55.5 kB view details)

Uploaded Python 3

File details

Details for the file cell_decipher-0.1.0.tar.gz.

File metadata

  • Download URL: cell_decipher-0.1.0.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cell_decipher-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a31cefdb25582c0252894a409dfe4dd030ad33f526a801b9945c9c0c7504102d
MD5 43607ded65395ebf60ec4ad72bc8bcfa
BLAKE2b-256 22c86ce1aa99ce78370aee849413f4c62d02e8197a930ed9dad2bcc3a3ed3f28

See more details on using hashes here.

File details

Details for the file cell_decipher-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cell_decipher-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cb3181d047e7cb734de3ec892d896ecfb4d70ffb6d84c331e612d1aabed0f56
MD5 1171d289544c2e549e43349ffee70cf1
BLAKE2b-256 1b9ec1a9647312c1cfacf1aaf2baaf983c1e7bb246759b77f1e7f1de235f3909

See more details on using hashes here.

Supported by

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