mantispy.pl.distance_heatmap

mantispy.pl.distance_heatmap#

mantispy.pl.distance_heatmap(adata, key='edistance', groupby='Metadata_MOA', ax=None)#

The group-by-group distance matrix, ordered so related groups sit together.

Parameters:
  • adata (AnnData) – Object holding the pairwise matrix edistance() wrote with reference=None.

  • key (str (default: 'edistance')) – Name that run’s outputs were stored under, whose matrix is key + "_pairwise".

  • groupby (str | None (default: 'Metadata_MOA')) – obs column to order the groups by, or None to keep the matrix’s own order. Ordering also needs an obs column naming the groups of the matrix, and without one the matrix is drawn unordered rather than refused.

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

Return type:

Axes

Returns:

The axes drawn on, holding the distance matrix with a white line at each groupby boundary.

Raises:

KeyErroruns["mantispy"] holds no key + "_pairwise" matrix.