simgenotypes {MasterBayes} | R Documentation |
Simulates genotypes given a pedigree and allele frequencies. Option exists to simulate observed genotypes given Wangs's (2004) model of genotyping error.
simgenotypes(A, E1 = 0, E2 = 0, pedigree, no_dup = 1, ...)
A |
list of allele frequencies at each locus |
E1 |
Allelic Dropout Rate |
E2 |
Stochastic Error Rate |
pedigree |
pedigree in 3 columns: id, dam, sire. Base individuals have NA as parents. All parents must be in id, and each indivdiual must either have both parents in id, or both parents as base. |
no_dup |
integer: number of times genotypes are to be observed |
... |
Further arguments to be passed |
G |
list of genotype objects; true genotypes for each locus |
Gid |
vector of id names indexing G |
Gobs |
list of genotype objects; observed genotypes for each locus |
id |
vector of id names indexing Gobs |
Jarrod Hadfield j.hadfield@sheffield.ac.uk
Wang J.L. 2004 Genetics 166 4 1963-1979
genotype
pedigree<-cbind(1:10, rep(NA,10), rep(NA, 10)) gen_data<-simgenotypes(A=list(loc_1=c(0.5, 0.2, 0.1, 0.075, 0.025)), E1=0.1, E2=0.1, pedigree=pedigree, no_dup=1) summary(gen_data$G[[1]]) summary(gen_data$Gobs[[1]])