Skip to main content

Third-party portable Python package for CAMP metacell partitioning (not the official paper repo)

Project description

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.tl.partition(adata, method="camp3", gamma=25, random_state=0)
cp.metrics.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.

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

campmc-0.1.1.tar.gz (361.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

campmc-0.1.1-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file campmc-0.1.1.tar.gz.

File metadata

  • Download URL: campmc-0.1.1.tar.gz
  • Upload date:
  • Size: 361.2 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for campmc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6d321501032116f31cfcfde7c02e6e2ab77e7701b74109d89022941e4148a887
MD5 cbebb287cec837c03b46ab87d3288784
BLAKE2b-256 09540050dc56fa0d5ba2bb515f90750c96f06a4d144722c1bcf62c61c140af06

See more details on using hashes here.

File details

Details for the file campmc-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: campmc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for campmc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1452f28abdb0bb7c7ca3efd48d66507ca3680431e8eb1297fabfc141da927945
MD5 e78d8d19495bad1726a0de5e270a1034
BLAKE2b-256 a0fc985ab239c08b8082e87e9b112b33d40b7906e11f52c36bf6c59b9018f3de

See more details on using hashes here.

Supported by

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