Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

vm.pl.qc_summary

Compose metric distributions and combined QC outcomes in one figure.

Signature

def qc_summary(
    data: ad.AnnData | pd.DataFrame,
    *,
    kind: str = "violin",
    metrics: Sequence[str] | str | None = None,
    key_added: str | None = None,
    order: Sequence[str | None] | None = None,
    palette: str | Sequence = "Set2",
    figsize: tuple[float, float] | None = None,
    transformed: bool = False,
    show: bool = True,
    save: str | Path | None = None,
) -> tuple[Figure, tuple[Axes, ...]] | None: ...

Parameters

NameTypeDefaultDescription
data`ad.AnnDatapd.DataFrame`required
kindstr'violin'Distribution style: "violin" or "raincloud".
metrics`Sequence[str]strNone`
key_added`strNone`None
order`Sequence[strNone]None`
palette`strSequence`'Set2'
figsize`tuple[float, float]None`None
transformedboolFalsePlot distributions in fitted transformation units.
showboolTrueDisplay the figure. If False, return the figure and active axes.
save`strPathNone`

Returns

tuple of matplotlib.figure.Figure and tuple of matplotlib.axes.Axes, or None

The figure and active axes in reading order when show=False; the combined outcome axes are last.

Raises

ImportError

If the optional plotting dependencies are not installed.

KeyError

If the fitted run or a requested metric is missing.

ValueError

If kind or the metric selection is invalid.

Notes

Metric panels use the stored thresholds and the current observation distributions. The outcome panel covers the full selected run on the supplied object, even when metrics selects only some distribution panels. No statistics are refit and the input is not modified.

See Also

Examples

import verymadpy as vm

fig, axes = vm.pl.qc_summary(adata, kind="raincloud", show=False)