mantispy.pl.dendrogram#
- mantispy.pl.dendrogram(adata, key='cluster', color_threshold=None, ax=None)[source]#
Draw the hierarchical clustering tree stored by
cluster().- Parameters:
- adata
AnnData Object holding the linkage matrix
cluster()wrote withmethod="hierarchical".- key
str(default:'cluster') The
key_addedthat run used, whose summary (leaf labels and the chosen cut) is read fromuns["mantispy"][key].- color_threshold
float|None(default:None) Height below which branches share a colour, marking the clusters. Defaults to the cut
cluster()chose, or scipy’s own default when that run set the count directly.- 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 tree, with the profiles as leaves and merge height on the y axis.- Raises:
KeyError –
uns["mantispy"]holds nokey + "_linkage"(the run usedmethod="leiden", or none ran).