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 matrixcluster()wrote withmethod="hierarchical".key (
str(default:'cluster')) – Thekey_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 cutcluster()chose, or scipy’s own default when that run set the count directly.ax (
Axes|None(default:None)) – Axes to draw on, orNonefor a new figure.
- Return type:
- Returns:
The axes drawn on, holding 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).