mantispy.pp.feature_reproducibility#
- mantispy.pp.feature_reproducibility(adata, by='Metadata_Perturbation', min_icc=0.2, key_added='icc', copy=False)[source]#
Score each feature by how consistently replicates of a perturbation agree on it.
A feature that varies only within replicate groups is noise, however large its variance. The intraclass correlation is the share of variance that lies between groups, which a variance filter does not measure.
- Parameters:
- adata
AnnData Profiles with several replicates per group, at well or perturbation resolution.
- by
str(default:'Metadata_Perturbation') obscolumn whose groups are the replicate sets.- min_icc
float(default:0.2) Threshold for the boolean column. See the Notes on choosing it.
- key_added
str(default:'icc') var[key_added]holds the ICC;var[key_added + "_selected"]the flag.- copy
bool(default:False) Return a modified copy instead of mutating in place.
- adata
- Return type:
- Returns:
None, or the modified copy. Writes the ICC tovar[key_added]and the flag tovar[key_added + "_selected"].- Raises:
ValueError – If
byhas a single group, so that no variance can lie between groups.
Notes
Filtering on ICC improves replicate retrieval, but the best cutoff differs by dataset, so
0.2is a conservative default; choose one from the distribution invar[key_added].ICC filtering can hurt other tasks. ICC measures reproducibility within a treatment, which is a different property from agreement between compounds that share a mechanism.