Skip to main content

veryMADpy

MAD-based quality control for cell-level metrics in AnnData and pandas, designed for Scanpy workflows.

Tests Latest GitHub release Python 3.10 or later MIT license

Overview

veryMADpy fits median absolute deviation (MAD) thresholds to existing per-cell QC metrics. It flags potential outliers for review and leaves filtering decisions to the analyst. It reads metrics from adata.obs, stores flags there and fit provenance in adata.uns["verymad"], and also supports pandas DataFrames. Scanpy and plotting dependencies are optional.

The default policy applies four scaled MADs to both tails of log-transformed total counts and detected genes, and the upper tail of mitochondrial percentage. Sample-wise fitting, custom metrics and thresholds, filtering, summaries, and diagnostic plots are supported.

Installation

Install veryMADpy from PyPI:

python -m pip install veryMADpy

Install Scanpy separately to calculate QC metrics. Install the plot extra only when using vm.pl:

python -m pip install "veryMADpy[plot]"

Quick start

Given raw counts in adata.X, a Boolean mitochondrial annotation in adata.var["mt"], and a sample_id column in adata.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)

For Scanpy versions whose calculate_qc_metrics() does not support out=False, use inplace=True. Undefined QC classifications raise during filtering by default; review the guide to choose an explicit policy.

Documentation

Read the veryMADpy documentation for tutorials, generated API reference, methodology, and the four-donor PBMC validation. Source documentation and build instructions are in docs/.

Methodological inspiration

These publications motivate MAD-based QC practice; they did not introduce, evaluate, or endorse veryMADpy. Cite the software itself using CITATION.cff.

License

MIT. See LICENSE.

Metadata

Release files for veryMADpy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for veryMADpy 0.1.0
File Size Uploaded Provenance Actions
verymadpy-0.1.0.tar.gz 32.9 kB With provenance Details for verymadpy-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for veryMADpy 0.1.0
File Interpreter ABI Platform Actions
verymadpy-0.1.0-py3-none-any.whl Python 3 none any Details for verymadpy-0.1.0-py3-none-any.whl

Total release size: 58.3 kB

Release files / verymadpy-0.1.0.tar.gz

Download URL verymadpy-0.1.0.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3ce6758ae5bd30f8bc739ec5662b7d27f352e52f210e971d3912537e6e92abfc
BLAKE2b-256 checksum
How to use checksums
9123dfe2600b8e62825726524d41b962625e5cc1894282f74634de0b2f2ad80e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / verymadpy-0.1.0-py3-none-any.whl

Download URL verymadpy-0.1.0-py3-none-any.whl
Size 25.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
181c07b615bc267c9140a010a43aa2b9fd3b0be9d92666f6edc1952852101f1c
BLAKE2b-256 checksum
How to use checksums
19dbf80b479e912ab59c688441b3c3546be339a12736306e6bceb85a1608ffef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for veryMADpy 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for verymadpy-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page