mantispy.pl.feature_groups

Contents

mantispy.pl.feature_groups#

mantispy.pl.feature_groups(adata, key=None, ax=None)[source]#

How many features each group contributes, split by channel.

Pass key="selected" after feature selection to see which families survived.

Parameters:
  • adata (AnnData) – Object to draw.

  • key (str | None (default: None)) – Restrict to features flagged by this boolean var column. None, or a column the object does not hold, uses every feature.

  • ax (Axes | None (default: None)) – Axes to draw into.

Return type:

Axes | None

Returns:

The axes when the caller passed ax, else None because the plot then owns the figure it created. When returned they hold one stacked bar per feature group and one segment per channel.

Raises:

KeyError – var has no feature_group column, or no channel column.