mantispy.pl.setting_agreement#
- mantispy.pl.setting_agreement(adata, key='transport', by=None, cluster=True, ax=None)[source]#
Settings against settings: which plates, batches or laboratories agree with each other.
Uses the same effect vectors as
transport(), compared between settings instead of between perturbations. Two settings agree when the perturbations they share moved the same way in both, weighted by effect size, so agreement on inactive compounds counts for little.- Parameters:
- adata
AnnData Object
transport()has run on.- key
str(default:'transport') The key it was stored under.
- by
str|None(default:None) obscolumn to annotate the settings with, e.g."Metadata_Source"when the units are plates. Settings are ordered by it with a line at each boundary, so a laboratory whose plates disagree shows as a broken block.- cluster
bool(default:True) Order the settings by similarity instead. Ignored when
byis given.- ax
Axes|None(default:None) Axes to draw into.
- 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 settings-by-settings agreement matrix with a white line at eachbyboundary.- Raises:
KeyError –
uns["mantispy"]holds nokey + "_units"matrix, orbywas given and noobscolumn names the settings it holds.