Description Usage Arguments Value Examples
Simulate crop phenotype using real genotype data for given number of QTLs, heritability. The SNP effect can be drawn from normal and gamma distributions.
1 2 | simcrop(snpdf, h2, nqtl, distribution = "norm", usegcta = TRUE,
gctapar = c("test", "snplist.txt", 1, "outfile.txt"))
|
snpdf |
A data.frame contains snpid information, must contain col: snpid. [data.frame]. |
h2 |
Broad sense heritability of the trait. [numeric(0-1)]. |
nqtl |
number of QTL. [interger]. |
distribution |
Distribution of the effects. [character=norm/gamma] |
usegcta |
For large set of SNP data, use external software GCTA to rapid simulate it. [TRUE/FALSE]. |
gctapar |
If usegcta==TRUE, here is the parameters passed to the gcta command. [vector] 1. bfile, PLINK format 2. path for causal.snpfile 3. replication number 4. path for output file. |
return A list of many values or a script to gcta command.
1 2 3 4 5 6 7 | geno <- read.table("data/geno.txt", header=TRUE)
simcrop <- function(snpid, h2, nqtl, distribution="norm", usegcta=TRUE,
gctapar=c("test", "snplist.txt", 1, "outfile.txt"))
y <- pheno[['y']]
gcta64 --bfile test --simu-qt --simu-causal-loci causal.snplist --simu-hsq 0.5
--simu-rep 3 --keep test.indi.list --out test
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.