# API reference

Import the package as:

```python
import campmc as cp
```

| Symbol | Role |
|--------|------|
| {func}`campmc.preprocess` | Preprocessing (filter, normalize, HVG, PCA) |
| {func}`campmc.partition` | Metacell partitioning (CAMP1–4) |
| {mod}`campmc.mt` | Quality, sizes, and rare-type recovery |
| {mod}`campmc.pl` | Plotting helpers |

## Minimal example

Runnable examples are on each API function page. A typical flow:

```{eval-rst}
.. exec-jupyter::

 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").head()
```

For raw counts, call {func}`campmc.preprocess` before partitioning.
See the {doc}`../user_guide` for method choice and AnnData keys.

```{toctree}
:maxdepth: 2
:hidden:

preprocess
partition
mt
pl
```
