simulate_qtl: Simulations of multiple QTL

View source: R/simulate_qtl.R

simulate_qtlR Documentation

Simulations of multiple QTL

Description

Simulate new phenotypes with a given number of QTL and creates new object with the same structure of class qtlpoly.data from an existing genetic map.

Usage

simulate_qtl(
  data,
  mu = 0,
  h2.qtl = c(0.3, 0.2, 0.1),
  var.error = 1,
  linked = FALSE,
  n.sim = 1000,
  missing = TRUE,
  w.size = 20,
  seed = 123,
  verbose = TRUE
)

## S3 method for class 'qtlpoly.simul'
print(x, detailed = FALSE, ...)

Arguments

data

an object of class qtlpoly.data.

mu

simulated phenotype mean, e.g. 0 (default).

h2.qtl

vector with QTL heritabilities, e.g. c(0.3, 0.2, 0.1) for three QTL (default); if NULL, only error is simulated.

var.error

simulated error variance, e.g. 1 (default).

linked

if TRUE (default), at least two QTL will be linked; if FALSE, QTL will be randomly assigned along the genetic map. Linkage is defined by a genetic distance smaller than the selected w.size.

n.sim

number of simulations, e.g. 1000 (default).

missing

if TRUE (default), phenotypes are simulated with the same number of missing data observed in data$pheno.

w.size

the window size (in centiMorgans) between two (linked) QTL, e.g. 20 (default).

seed

integer for the set.seed() function.

verbose

if TRUE (default), current progress is shown; if FALSE, no output is produced.

x

an object of class qtlpoly.sim to be printed.

detailed

if TRUE, detailed information on linkage groups and phenotypes in shown; if FALSE, no details are printed.

...

currently ignored

Value

An object of class qtlpoly.sim which contains a list of results with the same structure of class qtlpoly.data.

Author(s)

Guilherme da Silva Pereira, gdasilv@ncsu.edu

References

Pereira GS, Gemenet DC, Mollinari M, Olukolu BA, Wood JC, Mosquera V, Gruneberg WJ, Khan A, Buell CR, Yencho GC, Zeng ZB (2020) Multiple QTL mapping in autopolyploids: a random-effect model approach with application in a hexaploid sweetpotato full-sib population, Genetics 215 (3): 579-595. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1534/genetics.120.303080")}.

See Also

read_data

Examples

  
  # Estimate conditional probabilities using mappoly package
  library(mappoly)
  library(qtlpoly)
  genoprob4x = lapply(maps4x[c(5)], calc_genoprob)
  data = read_data(ploidy = 4, geno.prob = genoprob4x, pheno = pheno4x, step = 1)

  # Simulate new phenotypes
  sim.dat = simulate_qtl(data = data, n.sim = 1)
  sim.dat
  


qtlpoly documentation built on May 29, 2024, 2:14 a.m.