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.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.

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.2.tar.gz (187.6 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.2-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: campmc-0.1.2.tar.gz
  • Upload date:
  • Size: 187.6 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.2.tar.gz
Algorithm Hash digest
SHA256 560d4a3133064db247058a5c7b613d0470b5a77c8dcd690b2578317f98c18296
MD5 400f5b68d3096b35fc57649d9b13963b
BLAKE2b-256 ef22c7f659716335a4f87d0719d83642a946835852439c2142d7a9e9f14b7dee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: campmc-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 21.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7fcef3aa888bc934c18fca081900742166f8a79bff7e39dc6dba8bcaa48f9c48
MD5 a8c8f41da4d455436a7321b22f7aba52
BLAKE2b-256 1a2f3d438b7d254ae24c3a8bfc96cd565960ce7b4fc22a38b1e84604415aa3a6

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