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 for codominat markers or an asymmetric allele based model for dominant markers (Hadfield, 2007).
simgenotypes(A, E1 = 0, E2 = 0, pedigree, no_dup = 1, prop.missing=0, marker.type="MS", ...)
A |
list of allele frequencies at each locus |
E1 |
Allelic Dropout Rate for codominat markers. Probability of mis-scoring a dominant allele as recessive for dominant markers |
E2 |
Stochastic Error Rate for codominat markers. Probability of mis-scoring a recessive allele as dominant for dominant markers |
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 |
prop.missing |
proportion of observed genotypes that are missing |
marker.type |
"MS" or "AFLP" for codominant or dominant markers respectively |
... |
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@ed.ac.uk
Wang J.L. 2004 Genetics 166 4 1963-1979 Hadfield J.D. 2007 in prep
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]])