mantispy.pp.rank_int#
- mantispy.pp.rank_int(adata, by=None, c=0.375, stochastic=True, seed=0, key_added=None, copy=False)#
Replace every feature by the normal quantile of its rank.
- Parameters:
adata (
AnnData) – Object to transform. Run it afternormalize(), as the JUMP recipe and the batch-correction benchmark do.by (
str|None(default:None)) – Rank within each group of this column.Noneranks globally, as the reference implementation does, which keeps every feature comparable across the screen. Ranking per plate also removes plate-level differences in distribution shape, but can hide a plate that failed.c (
float(default:0.375)) – Blom’s constant.stochastic (
bool(default:True)) – Tie handling; seerank_inverse_normal.seed (
int(default:0)) – Tie handling; seerank_inverse_normal.key_added (
str|None(default:None)) – Write tolayers[key_added]instead of overwritingX.copy (
bool(default:False)) – Return a modified copy instead of transforming in place.
- Return type:
- Returns:
None, or the modified copy. WritesXorlayers[key_added].
Notes
Every feature comes out standard normal, so no feature dominates a distance through its units. Effect sizes are lost as well: a feature that doubled and one that moved by one percent look the same if they reorder the same wells. Keep the untransformed values with
key_addedfor effect sizes and dose-response curves.