GxE.test | R Documentation |
This function runs a permutation based test run a test of interaction between a collection of SNPs and exposure variables.
GxE.test( snp.cols, preprocessed.list, null.mean.vec = c(0, 0), null.sd.vec = c(1, 1), n.permutes = 10000, n.different.snps.weight = 2, n.both.one.weight = 1, weight.function.int = 2 )
snp.cols |
An integer vector specifying the columns in the input data containing the SNPs to be tested. |
preprocessed.list |
The initial list produced by function
|
null.mean.vec |
A vector of estimated null means for each
of the components of the E-GADGETS fitness score.
It should be set to the values of the "null.mean" element of the file
"null.mean.sd.info.rds" for the observed data, that is saved by the
|
null.sd.vec |
A vector of estimated null means for each
of the components of the E-GADGETS fitness score.
It should be set to the values of the "null.se" element of the file
"null.mean.sd.info.rds" for the observed data, that is saved by the
|
n.permutes |
The number of permutations on which to base the test. Defaults to 10000. |
n.different.snps.weight |
The number by which the number of different SNPs between a case and complement/unaffected sibling is multiplied in computing the family weights. Defaults to 2. |
n.both.one.weight |
The number by which the number of SNPs equal to 1 in both the case and complement/unaffected sibling is multiplied in computing the family weights. Defaults to 1. |
weight.function.int |
An integer used to assign family weights.
Specifically, we use |
A list of three elements:
The p-value of the test.
The fitness score from the observed data
A vector of fitness scores for the permuted datasets.
data(case.gxe) data(dad.gxe) data(mom.gxe) data(exposure) data(snp.annotations.mci) pp.list <- preprocess.genetic.data(case.gxe, father.genetic.data = dad.gxe, mother.genetic.data = mom.gxe, ld.block.vec = rep(6, 4), categorical.exposures = exposure) run.gadgets(pp.list, n.chromosomes = 5, chromosome.size = 3, results.dir = "tmp_gxe", cluster.type = "interactive", registryargs = list(file.dir = "tmp_reg_gxe", seed = 1300), n.islands = 8, island.cluster.size = 4, n.migrations = 1) combined.res <- combine.islands('tmp_gxe', snp.annotations.mci, pp.list, 1) top.snps <- as.vector(t(combined.res[1, 1:3])) set.seed(10) GxE.test.res <- GxE.test(top.snps, pp.list) unlink('tmp_gxe', recursive = TRUE) unlink('tmp_reg_gxe', recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.