campmc

Contents

campmc#

campmc is a third-party, Scanpy-style Python package for CAMP metacell partitioning on AnnData objects.

Online documentation: campmc.readthedocs.io

Note

This site documents the campmc package — an independent port for portable use with Scanpy. It is not the official documentation of the CAMP paper authors. For the reference implementation and paper benchmarks, see upstream CAMP.

Quick start#

import campmc as cp
import scanpy as sc
adata = sc.datasets.pbmc68k_reduced()
cp.partition(adata, method="camp3", gamma=50, random_state=0)
cp.mt.quality(adata, partition_key="camp", label_key="louvain")[["metacell_id", "size", "purity"]].head()
metacell_id size purity
0 seed0-50-__all__ 65 0.984615
1 seed1-50-__all__ 34 0.911765
2 seed10-50-__all__ 3 0.666667
3 seed11-50-__all__ 158 0.708861
4 seed12-50-__all__ 42 0.809524

For raw counts, run campmc.preprocess() first so obsm['X_pca'] is available.

Installation

Install with pip install campmc (or from a clone for development).

Installation
User guide

Workflow overview, CAMP1–4 methods, and AnnData keys.

User guide
Tutorials

Walk through partitioning on Scanpy example datasets.

Tutorials
API reference

Functions in pp, tl, mt, and related modules.

API reference