generateOffspring: simulates offspring's genotypes

Description Usage Arguments Value Author(s) Examples

View source: R/generateOffspring.R

Description

Simulat offspring's genotypes given genotypes of the parents. No LD is assumed.

Usage

1
  generateOffspring(g1, g2, q = NULL)

Arguments

g1

vector of genotypes of parent 1, coded with 0, 1, 2 and NA

g2

vector of genotypes of parent 2, coded with 0, 1, 2 and NA

q

vector of the frequencies of effects alleles (used to simulate missings in parental genotypes). If NULL, c(0.25,0.5,0.25) is used.

Value

a vector containing simulated genotypes of offspring

Author(s)

Yurii Aulchenko

Examples

1
2
3
4
eaf <- runif(10)
g1 <- rbinom(10,2,eaf)
g2 <- rbinom(10,2,eaf)
generateOffspring(g1,g2)

Example output

Loading required package: MASS
Loading required package: GenABEL.data
 [1] 0 0 0 2 1 0 0 2 2 0

GenABEL documentation built on May 30, 2017, 3:36 a.m.