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
| Name | Type | Default | Description |
|---|---|---|---|
data | `ad.AnnData | pd.DataFrame` | required |
kind | str | 'violin' | Distribution style: "violin" or "raincloud". |
metrics | `Sequence[str] | str | None` |
key_added | `str | None` | None |
order | `Sequence[str | None] | None` |
palette | `str | Sequence` | 'Set2' |
figsize | `tuple[float, float] | None` | None |
transformed | bool | False | Plot distributions in fitted transformation units. |
show | bool | True | Display the figure. If False, return the figure and active axes. |
save | `str | Path | None` |
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)