View source: R/script_simulMGF.R
simulHS | R Documentation |
Simulate half sib progeny from one genotyped parent assuming a random genotype for the other parental. We assume that these are diploid organisms.
simulHS(x, Nprogeny)
x |
genotype matrix of a set of moms |
Nprogeny |
number of progeny's genotypes to simulate for each mom |
The function assume: a diploid organism; mendelian segregation of alleles; and independent segregation.
a matrix of dimensions (nrow(x)*Nprogeny) x ncol(x)
Martin Nahuel Garcia <orcid:0000-0001-5760-986X>
Wu, R., Ma, C., & Casella, G. (2007). Statistical genetics of quantitative traits: linkage, maps and QTL. Springer Science & Business Media.
#' #simulate 100 individuals and 1000 SNPs
set.seed(123)
simGeno(100, 1000)
#[1] "simG was generated"
#simulate the genotype of 3 sets 5 HS (one set by mom)
simulHS(simG[1:3,],5)
#[1] "simulatedHS was generated"
dim(simulatedHS)
#[1] 15 1000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.