mantispy.pl.distance_heatmap#
- mantispy.pl.distance_heatmap(adata, key='edistance', groupby='Metadata_MOA', ax=None)[source]#
The group-by-group distance matrix, ordered so related groups sit together.
- Parameters:
- adata
AnnData Object holding the pairwise matrix
edistance()wrote withreference=None.- key
str(default:'edistance') Name that run’s outputs were stored under, whose matrix is
key + "_pairwise".- groupby
str|None(default:'Metadata_MOA') obscolumn to order the groups by, orNoneto keep the matrix’s own order. Ordering also needs anobscolumn 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
Nonefor a new figure.
- adata
- Return type:
- Returns:
The axes when the caller passed
ax, elseNonebecause the plot then owns the figure it created. When returned they hold the distance matrix with a white line at eachgroupbyboundary.- Raises:
KeyError –
uns["mantispy"]holds nokey + "_pairwise"matrix.