Description Usage Arguments Value Author(s) Examples
View source: R/generateOffspring.R
Simulat offspring's genotypes given genotypes of the parents. No LD is assumed.
1 | generateOffspring(g1, g2, q = NULL)
|
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. |
a vector containing simulated genotypes of offspring
Yurii Aulchenko
1 2 3 4 | eaf <- runif(10)
g1 <- rbinom(10,2,eaf)
g2 <- rbinom(10,2,eaf)
generateOffspring(g1,g2)
|
Loading required package: MASS
Loading required package: GenABEL.data
[1] 0 0 0 2 1 0 0 2 2 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.