simcrop: 'Simulate QTL phenotype with normal distribution'

Description Usage Arguments Value Examples

Description

Simulate crop phenotype using real genotype data for given number of QTLs, heritability. The SNP effect can be drawn from normal and gamma distributions.

Usage

1
2
simcrop(snpdf, h2, nqtl, distribution = "norm", usegcta = TRUE,
  gctapar = c("test", "snplist.txt", 1, "outfile.txt"))

Arguments

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.

Value

return A list of many values or a script to gcta command.

Examples

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

jyanglab/g3tools documentation built on May 20, 2019, 6:27 a.m.