API reference#
metalsinglecell mirrors the scanpy / squidpy namespaces: pp (preprocessing), tl (tools),
gr (spatial graph). Import as:
import metalsinglecell as msc
Preprocessing — msc.pp#
Per-cell/per-gene QC metrics ( |
|
Filter cells ( |
|
Filter genes ( |
|
Normalize counts per cell ( |
|
|
|
Analytic Pearson residuals ( |
|
Highly variable genes ( |
|
Z-score genes then clip ( |
|
Regress out covariates in |
|
PCA ( |
|
kNN graph ( |
|
Batch-balanced kNN ( |
|
Harmony batch integration ( |
|
Doublet detection ( |
Tools — msc.tl#
Leiden clustering ( |
|
Louvain clustering ( |
|
k-means on an embedding; writes |
|
UMAP embedding ( |
|
t-SNE ( |
|
Diffusion map ( |
|
Force-directed layout ( |
|
Per-cell density in an embedding ( |
|
Marker genes per group ( |
|
Gene-set score ( |
|
S/G2M scores + phase ( |
Spatial graph — msc.gr#
Spatial graph from coordinates ( |
|
Moran's I / Geary's C per gene ( |
|
Cluster co-occurrence vs distance ( |
|
Ligand-receptor permutation test ( |
|
Spatial niches from neighborhood composition ( |