veryMADpy
Version 0.1.0
MAD-based quality control for cell-level metrics in AnnData and pandas workflows.
veryMADpy fits transparent, pooled or sample-wise thresholds to existing QC metrics. It annotates potential outliers for review and leaves filtering decisions to you. It does not recalculate QC metrics or access expression matrices during fitting and plotting.
Start with three calls
Given an AnnData object with raw counts in X, a Boolean mitochondrial annotation in var["mt"], and sample_id in .obs:
import scanpy as sc
import verymadpy as vm
sc.pp.calculate_qc_metrics(adata, qc_vars=["mt"], out=False)
vm.pp.flag_mad_outliers(adata, batch_key="sample_id")
adata_filtered = vm.pp.filter(adata)
The first call calculates standard Scanpy QC columns. The second stores flags and fitted thresholds; the third returns a filtered AnnData copy. Review the optional summary before filtering when the data or policy warrants it.
An example of sample-wise fits on the four-donor PBMC validation data. Thresholds shown are from the stored fit.
Project links
GitHub repository · Releases · Cite veryMADpy
veryMADpy uses AnnData directly and follows Scanpy-style preprocessing and plotting namespaces. This describes interoperability; it is not a claim of official scverse ecosystem membership or endorsement.