A Python package for the identification, characterization and comparison of spatial clusters from spatial -omics data.
Project description
A Python package for the identification, characterization and comparison of spatial clusters from spatial -omics data.
Documentation • Examples • Paper • Preprint
Background
Spatial clustering determines cellular niches characterized by specific admixing of these populations. It assigns cells to clusters based on both their intrinsic features (e.g., protein or mRNA expression), and the features of neighboring cells in the tissue.
CellCharter is able to automatically identify spatial clusters, and offers a suite of approaches for cluster characterization and comparison.
Getting started
Please refer to the documentation. In particular, the
Installation
- Create a conda or pyenv environment
- Install Python <= 3.10 and PyTorch <= 1.12.1. If you are planning to use a GPU, make sure to download and install the correct version of PyTorch first.
- Install the library used for dimensionality reduction and batch effect removal according the data type you are planning to analyze:
- scVI for spatial transcriptomics and/or epigenomics data such as 10x Visium and Xenium, Nanostring CosMx, Vizgen MERSCOPE, Stereo-seq, DBiT-seq, MERFISH and seqFISH data.
- A modified version of scArches's TRVAE model for spatial proteomics data such as Akoya CODEX, Lunaphore COMET, CyCIF, IMC and MIBI-TOF data.
- Install CellCharter using pip:
pip install cellcharter
We suggest using mamba
to install the dependencies.
Installing the latest version of the dependencies (in particular scvi-tools
and spatialdata
) may lead to dependency conflicts.
However, this should not be a problem because CellCharter doesn't use any of the mismatching features.
We report here an example of an installation aimed at analyzing spatial transcriptomics data (and thus installing scvi-tools
).
This example is based on a Linux CentOS 7 system with an NVIDIA A100 GPU.
conda create -n cellcharter-env -c conda-forge python=3.10 mamba
conda activate cellcharter-env
mamba install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.6 mkl=2024.0 -c pytorch -c conda-forge
pip install pyro-ppl==1.8.6 scvi-tools==0.20.3
pip install cellcharter
Note: a different system may require different commands to install PyTorch and JAX. Refer to their respective documentation for more details.
Contribution
If you found a bug or you want to propose a new feature, please use the issue tracker.
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
Hashes for cellcharter-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c95b539961723152c73fbb9ed837faa703d96593f002217308206eb9f5f13b7b |
|
MD5 | fe9c8bf168bef0d81b347aa8f8207296 |
|
BLAKE2b-256 | c178b0bfa41e860654c74b7becbacc63e918bf78033af430a046eba607b0d013 |