Skip to contents

This function resamples gene sets based on specific constraints like matching co-expression patterns. The methodology implemented is informed by Wei et al. (2022) on statistical testing in transcriptomic-neuroimaging studies. It is important to note that restricting null models to a subset of genes can be problematic. The empirical statistics sampled from the full gene pool differ from those derived from a restricted pool. Therefore, usage of this approach should be with caution.

Usage

resample_geneSetList_matching_coexp(
  gene_data,
  geneSetList,
  tol = 0.01,
  max_iter = 1e+06,
  n_perm = 5000,
  n_cores = 1
)

Arguments

gene_data

A matrix or data frame representing gene expression data.

geneSetList

A list of gene sets to be resampled.

tol

A numeric value indicating the tolerance for matching co-expression patterns (default = 0.01).

max_iter

An integer indicating the maximum number of iterations for the sampling process (default = 1000000).

n_perm

An integer indicating the number of permutations to generate (default = 5000).

n_cores

An integer indicating the number of cores to use for parallel processing (default = 1).

Value

A list of resampled gene sets based on the specified constraints.

References

Wei, Y., de Lange, S. C., Pijnenburg, R., Scholtens, L. H., Ardesch, D. J., Watanabe, K., Posthuma, D., & van den Heuvel, M. P. (2022). Statistical testing in transcriptomic-neuroimaging studies: A how-to and evaluation of methods assessing spatial and gene specificity. Human Brain Mapping, 43(3), 885–901.