mantispy.pl.feature_distributions#

mantispy.pl.feature_distributions(adata, features, groupby='Metadata_Plate', layer_before='raw', kind='ecdf', group_label=None, labels=None)[source]#

Per-feature distributions, before and after normalization when layer_before exists.

Parameters:
adata AnnData

Object holding the features to draw.

features Sequence[str]

var_names to draw, one column of panels each.

groupby str (default: 'Metadata_Plate')

obs column whose groups are drawn separately within each panel.

layer_before str | None (default: 'raw')

Layer holding the values before normalization, or None to draw only the current ones. A layer that the object does not hold is skipped in the same way.

kind str (default: 'ecdf')

"ecdf", "hist", or "ridge" for one offset filled density per group, which is easier to read with many groups.

group_label str | None (default: None)

Legend title for the grouping variable, or None to leave the legend untitled.

labels Mapping[Any, str] | None (default: None)

Display names for group values, keyed by value; values left out keep their own name.

Return type:

ndarray | None

Returns:

None; this plot always creates its own figure, a 2-D grid with one row per layer shown and one column per feature.

Raises:

ValueError – kind is not one of the three accepted values.