mantispy.pl.similarity#
- mantispy.pl.similarity(adata, key='similarity', groupby='Metadata_Perturbation', max_obs=500, ax=None)#
Profile-by-profile similarity, ordered by
groupbyso blocks are visible.Subsamples to
max_obsrows with a fixed seed when the object is larger, because the matrix is quadratic.- Parameters:
adata (
AnnData) – Object holding the matrixsimilarity()wrote inobsp.key (
str(default:'similarity')) – Name of that matrix inobsp.groupby (
str|None(default:'Metadata_Perturbation')) –obscolumn to order the rows and columns by, orNoneto keep the object’s own order.max_obs (
int(default:500)) – Draw at most this many profiles, sampled from the ordering rather than from the rows.ax (
Axes|None(default:None)) – Axes to draw on, orNonefor a new figure.
- Return type:
- Returns:
The axes drawn on, holding the ordered matrix on a diverging scale fixed to
[-1, 1]with a colorbar beside it.- Raises:
KeyError –
obspholds nothing underkey.