Skip to contents

Compute p-val permutation testing

Usage

compute_perm_pval(celltype_pair_oi, shuffled_df, obs_df, metric)

Arguments

celltype_pair_oi

string with cell type pair of interest existing in shuffled_df and obs_df

shuffled_df

dataframe with 'source_target' and 'metric' for all iterations (permutations)

obs_df

dataframe with 'source_target' and 'metric' (observed)

metric

string with metric of interest, e.g. 'mean_frac'

Value

dataframe of single row with 'source_target', 'mean_obs', 'overall_mean_shuffled' and 'pval'