msmu._tools._dea._dea
permutation_test
permutation_test(mdata, category, control, expr=None, modality='protein', n_resamples=1000, n_jobs=1, statistic='welch', force_resample=False, fdr='empirical')
Perform a permutation test on the given MuData object. Parameters
mdata : md.MuData The MuData object containing the data. modality : str The modality to perform the test on. Default is 'protein' category : str The category column in the mdata.obs. control : str The control group label. expr : str | None The experimental group label. If None, all other groups are considered experimental. Default is None. n_resamples : int The number of resamples for the permutation test. Default is 1000. n_jobs : int The number of parallel jobs to run. statistic : str The statistical test to use. Options are 'welch', 'student', 'wilcoxon', or 'median_diff'. Default is 'welch'. fdr: str | bool The FDR control method to use. Options are 'empirical', 'bh', 'storey'. Default is 'empirical'. force_resample : bool If True, forces resampling even if the number of permutations exceeds the possible combinations. Default is False. Returns
PermutationTestResult The result of the permutation test. Raises
ValueError If the statistic is not one of the supported types.