mantispy.pl.feature_correlation#
- mantispy.pl.feature_correlation(adata, key='selected', groupby='feature_group', max_features=300, ax=None)#
Correlation heatmap with features ordered by their annotation.
Features are sorted by
groupbyand then by channel, with a line at each group boundary. Ordering by annotation instead of clustering shows directly whether correlated features fall within the same measurement family.- Parameters:
adata (
AnnData) – Object to draw. Usually well-level profiles.key (
str|None(default:'selected')) – Restrict to features flagged by this booleanvarcolumn.None, or a column the object does not hold, uses every feature.groupby (
str(default:'feature_group')) –varcolumn to order and delimit by.max_features (
int(default:300)) – Draw at most this many features, taken in the sorted order.
- Return type:
- Returns:
The axes drawn on, holding the correlation matrix on a diverging scale fixed to
[-1, 1], with a line at each group boundary and one tick per group.- Raises:
KeyError –
varhas nogroupbycolumn, or nochannelcolumn.