Skip to contents

This function samples gene sets that closely match the co-expression profile of a target gene set. The methodology implemented is informed by Wei et al. (2022) on statistical testing in transcriptomic-neuroimaging studies.

Usage

sample_gs_matching_coexp(
  gs,
  coexp_matrix,
  tol = 0.01,
  max_iter = 1e+06,
  n_target = 5000
)

Arguments

gs

The target gene set for which similar co-expression profiles are sought.

coexp_matrix

A co-expression matrix, typically calculated as the correlation matrix of gene expression data.

tol

Tolerance for the difference between the co-expression of the target and the sampled gene sets.

max_iter

Maximum number of iterations to attempt finding matches.

n_target

Number of gene sets to sample.

Value

A list of gene sets that closely match the target gene set's co-expression profile.

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.