Compocyte is a composite classifier for modular hierarchical cell type annotation of single cell data. Using Compocyte you can build different hierarchical classifier architectures following a local classifier per parent node approach. Local classifiers are built around pytorch, sklearn or CatBoost. Local classifiers can be individually modified to account for alterations in classification taxonomies or selectively improve specific annotations in human-in-the-loop approaches. While compocyte has been primarily developed for single cell RNA sequencing data it can also be used with other single cell data compatible with the AnnData and scanpy packages.
For most users, we suggest making use of our prepared Docker image. This comes with all required dependencies for standard use cases.
- Pull the image.
docker pull chbeltz/compocyte:latest- Start an interactive container.
docker run -it --rm chbeltz/compocyte:latest bashIf you want to work with your own data, mount a local directory into the container:
docker run -it --rm \
-v /path/to/your/data:/data \
chbeltz/compocyte:latest bashYour files will then be accessible inside the container at /data.
Alternatively, you can install Python 3.14 using micromamba or another environment manager, and then install Compocyte and its dependencies from conda-forge/PyPI.
micromamba create -n compocyte_python314 python=3.14
micromamba activate compocyte_python314
micromamba install gcc gxx graphviz pygraphviz
pip install CompocytePretrained Compocyte models are available on Zenodo.
They can also be loaded from within Compocyte the following way:
import Compocyte
pbmc_hc = Compocyte.pretrained.pbmc_pretrained()
til_hc = Compocyte.pretrained.til_pretrained()For a quick dive into using Compocyte to label single-cell data, refer to our Getting started on readthedocs. There, you can also find tutorials to help you make full use of Compocyte's features.
When using our pretrained classification models, please cite the Zenodo publications above.
When using Compocyte, please cite our publication (DOI will be provided shortly).