mantispy.pl.sets_heatmap

Contents

mantispy.pl.sets_heatmap#

mantispy.pl.sets_heatmap(adata, groupby, score_key='score_ulm', top=30, ax=None)[source]#

Mean enrichment score per group per feature set.

Parameters:
  • adata (AnnData) – Object enrich() has scored, holding the per-row scores in obsm.

  • groupby (str) – obs column whose groups become the rows.

  • score_key (str (default: 'score_ulm')) – obsm key holding those scores, named after the method that wrote them.

  • top (int (default: 30)) – How many feature sets to draw, taken by their largest absolute mean score.

  • ax (Axes | None (default: None)) – Axes to draw on, or None for a new figure.

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 groups against feature sets, the sets it kept sorted by name, on a diverging scale.

Raises:

KeyError – obsm holds nothing under score_key.