mantispy.tl.percent_replicating#
- mantispy.tl.percent_replicating(adata, groupby='Metadata_Perturbation', metric='pearson', use_rep=None, null_size=10000, quantile=0.95, seed=0, key_added='percent_replicating', copy=False)[source]#
Median replicate correlation against a non-replicate null.
An older readout, largely replaced by mAP. It thresholds rather than ranks, and it depends on the number of replicates per perturbation. It is included because many published results report it.
- Parameters:
- adata
AnnData Well-level profiles with several replicates per group.
- groupby
str(default:'Metadata_Perturbation') Column whose groups are the replicate sets.
- metric
str(default:'pearson') Similarity between profiles, one of
METRICS.- use_rep
str|None(default:None) Score
obsm[use_rep]instead ofX.- null_size
int(default:10000) Number of draws in the non-replicate null.
- quantile
float(default:0.95) Quantile of the null medians a group has to beat to count as replicating.
- seed
int(default:0) Seed for the null draws.
- key_added
str(default:'percent_replicating') Name for the outputs.
- copy
bool(default:False) Return a modified copy instead of mutating in place.
- adata
- Return type:
- Returns:
None, or the modified copy. Writesuns["mantispy"][key_added]withgroup,n_replicates,median_replicate_correlation,null_thresholdandis_significant(whether the group replicates above the null), leaving out groups with a single replicate. Writesuns["mantispy"][key_added + "_summary"]withfraction_replicatingandn_groups.