This function serves to simulate GWAS data. The output resembles that of the
PLINK output when generated using the --assoc
flag for association testing.
The purpose of this function is mainly for debugging and testing of other
scripts. Default setting is to create one significant column. This can be set
in the AddSigSNPs
field (logical). The parameters of the significant column
are SigCHR
to specify which chromosome the significant column should appear
in (integer between 1 and 22), and the number of significant columns in
nSigCols
(integer).
Other parameters are the number of SNPs (nSNPs
) in the fake dataset, and
the number of individuals in the dataset. Note that these last two parameters
are subject to change due to the algorithm by which random data is generated
in this function.
A known bug is that the data can be a little "tail-heavy" towards the smaller
chromosomes.
1 2 3 4 5 | sim.dat <- simulateGWAS()
sim.dat <- simulateGWAS(nSNPs = 5e5, N = 2e4,
AddSigSNPs = FALSE, SigCHR = NULL, nSigCols = NULL)
sim.dat <- simulateGWAS(nSNPs = 2e5, N = 6e5,
AddSigSNPs = TRUE, SigCHR = c(2,4,6,7), nSigCols = 4)
|
nSNPs |
Number of SNPs in datafile (roughly) |
N |
Number of individuals in dataset |
AddSigSNPs |
Add significant SNPs (logical) |
SigCHR |
Chromosome(s) with the significant SNPs |
nSigCols |
Number of significant columns |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.