mantispy.pl.subpopulation_hits#

mantispy.pl.subpopulation_hits(adata, key='subpopulation_hits', top=30, ax=None)[source]#

Cluster by group heatmap of significance, so an effect in one cell state stands out.

Parameters:
adata AnnData

Object holding the table subpopulation_hits() wrote.

key str (default: 'subpopulation_hits')

Name of that table in uns["mantispy"].

top int (default: 30)

How many groups to draw, taken by their most significant cluster.

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 -log10 q per cluster and group, the drawn groups sorted by name, with a colorbar beside them.

Raises:
  • KeyError – uns["mantispy"] holds no table under key.

  • ValueError – That table is empty, which is what happens when no cluster held both controls and another group.