run.gadgets | R Documentation |
This function runs the GADGETS algorithm to detect multi-SNP effects in case-parent triad studies.
run.gadgets( data.list, n.chromosomes, chromosome.size, results.dir, cluster.type, registryargs = list(file.dir = NA, seed = 1500), resources = list(), cluster.template = NULL, n.workers = min(detectCores() - 2, n.islands/island.cluster.size), n.chunks = NULL, n.different.snps.weight = 2, n.both.one.weight = 1, weight.function.int = 2, generations = 500, gen.same.fitness = 50, initial.sample.duplicates = FALSE, snp.sampling.type = "chisq", crossover.prop = 0.8, n.islands = 1000, island.cluster.size = 4, migration.generations = 50, n.migrations = 20, recessive.ref.prop = 0.75, recode.test.stat = 1.64, n.random.chroms = 10000, null.mean.vec = NULL, null.sd.vec = NULL )
data.list |
The output list from |
n.chromosomes |
An integer specifying the number of chromosomes to use for each island in GADGETS. |
chromosome.size |
An integer specifying the number of SNPs in each chromosome. |
results.dir |
The directory to which island results will be saved. |
cluster.type |
A character string indicating the type of cluster on which to evolve solutions in parallel. Supported options are interactive, socket, multicore, sge, slurm, lsf, openlava, or torque. See the \ documentation for package batchtools for more information. |
registryargs |
A list of the arguments to be provided to
|
resources |
A named list of key-value pairs to be substituted into the
template file. Options available are specified in
|
cluster.template |
A character string of the path to the template file
required for the cluster specified in |
n.workers |
An integer indicating the number of workers for the cluster
specified in |
n.chunks |
An integer specifying the number of chunks jobs running
island clusters should be split into when dispatching jobs using
|
n.different.snps.weight |
The number by which the number of different SNPs between a case and complement or 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 or 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 |
generations |
The maximum number of generations for which GADGETS will run. Defaults to 500. |
gen.same.fitness |
The number of consecutive generations with the same fitness score required for algorithm termination. Defaults to 50. |
initial.sample.duplicates |
A logical indicating whether the same SNP can appear in more than one chromosome in the initial sample of chromosomes (the same SNP may appear in more than one chromosome thereafter, regardless). Default to FALSE. |
snp.sampling.type |
A string indicating how SNPs are to be sampled for
mutations. Options are 'chisq', 'random', or 'manual'. The 'chisq' option
takes into account the marginal association between a SNP and disease status,
with larger marginal associations corresponding to higher sampling
probabilities. The 'random' option gives each SNP the same sampling
probability regardless of marginal association. The 'manual' option should be
used when |
crossover.prop |
A numeric between 0 and 1 indicating the proportion of chromosomes to be subjected to cross over.The remaining proportion will be mutated. Defaults to 0.8. |
n.islands |
An integer indicating the number of islands to be used. Defaults to 1000. |
island.cluster.size |
An integer specifying the number of islands in a
given cluster. Must evenly divide |
migration.generations |
An integer equal to the number of generations
between migrations among islands of a distinct cluster.
Argument |
n.migrations |
The number of chromosomes that migrate among islands.
This value must be less than |
recessive.ref.prop |
The proportion to which the observed proportion of informative cases with the provisional risk genotype(s) will be compared to determine whether to recode the SNP as recessive. Defaults to 0.75. |
recode.test.stat |
For a given SNP, the minimum test statistic required to recode and recompute the fitness score using recessive coding. Defaults to 1.64. See the GADGETS paper for specific details. |
n.random.chroms |
(experimental) The number of random chromosomes used to construct a reference null mean and standard deviations vectors to compute the E-GADGETS (GxGxE) fitness score. |
null.mean.vec |
(experimental) A vector of estimated null means for each
of the components of the E-GADGETS fitness score. This needs to be specified
if running permutes under the no-GxE null, and should be set to the values in
the "null.mean" element of the "null.mean.sd.info.rds" file stored in the
|
null.sd.vec |
A vector of estimated null standard deviations for the
components of the E-GADGETS fitness score. See argument |
For each island, a list of two elements will be written to
results.dir
:
A data.table of the final generation
chromosomes, their fitness scores, and, for GADGETS, additional information
pertaining to nominated risk-related genotypes. See the package vignette for
an example and the documentation for chrom.fitness.score
for
additional details.
The total number of generations run.
data(case) case <- as.matrix(case) data(dad) dad <- as.matrix(dad) data(mom) mom <- as.matrix(mom) pp.list <- preprocess.genetic.data(case[, 1:10], father.genetic.data = dad[ , 1:10], mother.genetic.data = mom[ , 1:10], ld.block.vec = c(10)) run.gadgets(pp.list, n.chromosomes = 4, chromosome.size = 3, results.dir = 'tmp', cluster.type = 'interactive', registryargs = list(file.dir = 'tmp_reg', seed = 1500), generations = 2, n.islands = 2, island.cluster.size = 1, n.migrations = 0) unlink('tmp_bm', recursive = TRUE) unlink('tmp', recursive = TRUE) unlink('tmp_reg', recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.