CAMP (Coreset Accelerated Metacell Partitioning)
Third-party, installable Python reimplementation of the CAMP metacell methods for use with AnnData and Scanpy.
About this project
This repository is not maintained by the authors of the CAMP paper. It is an independent packaging effort that ports the research code from the upstream CAMP repository into a reusable library (import campmc as cp, PyPI name campmc).
Goals of this project:
- Make CAMP1–4 and related helpers portable (no hardcoded cluster paths, scanpy-style API).
- Provide tests, documentation, and a normal Python package layout.
For the official reference implementation, paper benchmarks, and experiment scripts, use the upstream CAMP repository. Behavior here should match the published algorithms in spirit, but this package is maintained separately.
If you use the CAMP method, please cite the bioRxiv preprint (Li, Ko & Canzar, 2025; doi:10.64898/2025.12.11.693725) — see Citation below.
Install
pip install campmc
Or with uv: uv add campmc.
For development from a clone:
git clone https://github.com/nictru/campmc.git
cd campmc
uv sync --group dev
Usage (scanpy-style)
import campmc as cp
import scanpy as sc
adata = sc.datasets.pbmc68k_reduced()
cp.partition(adata, method="camp3", gamma=25, random_state=0)
cp.mt.quality(adata, partition_key="camp", label_key="louvain")
Documentation
Published docs: campmc.readthedocs.io
To build HTML locally (Sphinx, MyST, scanpydoc theme, same style as Scanpy):
uv sync --group doc
uv run sphinx-build -M html docs docs/_build
Citation
If you use the CAMP method, please cite the preprint:
Li, D., Ko, Y. K., & Canzar, S. (2025). CAMP: Coreset Accelerated Metacell Partitioning enables scalable analysis of single-cell data. bioRxiv. https://doi.org/10.64898/2025.12.11.693725
Preprint: bioRxiv
@article{li2025camp,
title = {CAMP: Coreset Accelerated Metacell Partitioning enables scalable analysis of single-cell data},
author = {Li, Danrong and Ko, Young Kun and Canzar, Stefan},
journal = {bioRxiv},
year = {2025},
doi = {10.64898/2025.12.11.693725},
url = {https://www.biorxiv.org/content/10.64898/2025.12.11.693725v1}
}
This campmc package is a third-party implementation; citing the preprint refers to the CAMP method, not this repository.
Tests
uv run pytest -q
License
MIT — see LICENSE. Algorithm code is adapted from the upstream CAMP repository (MIT, © danrongLi). This campmc package is a separate third-party distribution; it is not affiliated with or endorsed by the original CAMP authors unless they state otherwise.
Metadata
Release files for campmc 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| campmc-0.1.2.tar.gz | 187.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| campmc-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 208.9 kB
Release files / campmc-0.1.2.tar.gz
| Download URL | campmc-0.1.2.tar.gz |
|---|---|
| Size | 187.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
560d4a3133064db247058a5c7b613d0470b5a77c8dcd690b2578317f98c18296
|
|
BLAKE2b-256 checksum How to use checksums |
ef22c7f659716335a4f87d0719d83642a946835852439c2142d7a9e9f14b7dee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / campmc-0.1.2-py3-none-any.whl
| Download URL | campmc-0.1.2-py3-none-any.whl |
|---|---|
| Size | 21.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7fcef3aa888bc934c18fca081900742166f8a79bff7e39dc6dba8bcaa48f9c48
|
|
BLAKE2b-256 checksum How to use checksums |
1a2f3d438b7d254ae24c3a8bfc96cd565960ce7b4fc22a38b1e84604415aa3a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|