The function takes in a SNP-mediator set-gene triplet and computes the total absolute mediation effect and permutation test P-value

permuteTME(
  snp,
  expression,
  mediators,
  covs,
  nperms = 1000,
  parallel = "no",
  nc
)

Arguments

snp

vector, SNP of interest

expression

vector, gene expression of interest

mediators

data frame, mediators of interest

covs

data frame, covariates

nperms

integer, number of permutations for the null distribution

parallel

character, boot parallel input

nc

integer, number of cores

Value

estimate of TME and the permutation P-value