mantispy.pl.feature_signature#
- mantispy.pl.feature_signature(adata, groupby=None, top=40, cluster=True, cmap='RdBu_r', figsize=None, ax=None)#
Heatmap of perturbations by feature families.
- Parameters:
adata (
AnnData) – The output offeature_signature().groupby (
str|None(default:None)) –obscolumn to average rows within, instead of showing one row per perturbation."Metadata_MOA", for example, gives one row per mechanism.top (
int|None(default:40)) – Show only this many rows, those with the largest absolute value.Noneshows all of them. Ignored whengroupbyis given.cluster (
bool(default:True)) – Order rows and columns by hierarchical clustering, so families that move together are adjacent. Otherwise the object’s order is kept.cmap (
str(default:'RdBu_r')) – Diverging colormap, centered on zero so decreases and increases read equally.figsize (
tuple[float,float] |None(default:None)) – Size of the figure, in inches, orNonefor one that grows with the number of rows and columns. Ignored whenaxis given.ax (
Axes|None(default:None)) – Axes to draw on, orNonefor a new figure.
- Return type:
- Returns:
The axes drawn on, holding perturbations against feature families on a scale centered on zero, with a colorbar beside them.
- Raises:
KeyError –
groupbywas given andobshas no such column.