grassp.tl.mr_score#
- mr_score(data, condition_key, replicate_key, mcd_proportion=0.75, assume_centered=True, n_iterations=11, key_added='mr_scores', fraction_key=None)[source]#
M/R score for detecting protein translocation.
Implements the approach from Itzhak et al. 2016 where M is a moderated t-statistic (via Minimum Covariance Determinant) and R the measure of reproducibility between replicates.
- Parameters:
- data
AnnData AnnData object containing all conditions/replicates stacked in variables.
- condition_key
str data.varcolumn indicating the experimental condition (e.g. control, treatment).- replicate_key
str data.varcolumn indicating biological replicates.- mcd_proportion
float(default:0.75) Parameters forwarded to
sklearn.covariance.MinCovDet().- assume_centered
bool(default:True) Parameters forwarded to
sklearn.covariance.MinCovDet().- n_iterations
int(default:11) Parameters forwarded to
sklearn.covariance.MinCovDet().- key_added
str(default:'mr_scores') Base name for the two new columns
{key_added}_Mand{key_added}_Rwritten todata.obs.- fraction_key
str|None(default:None) data.varcolumn naming the fraction of each sample. If given, control and treatment samples are paired by fraction, and each replicate must have the same fractions in both conditions. IfNone, they are paired by column order, so the fractions must appear in the same order in both conditions.
- data
- Return type: