simgenotypes | R Documentation |
Simulates genotypes given a pedigree and allele frequencies. Option exists to simulate observed genotypes given Wangs's (2004) or CERVUS's model (Marshall 1998) of genotyping error for codominat markers or an asymmetric allele based model for dominant markers (Hadfield, 2009).
simgenotypes(A, E1 = 0, E2 = 0, ped, no_dup = 1, prop.missing=0, marker.type="MSW")
A |
list of allele frequencies at each locus |
E1 |
if Wang's (2004) model of genotyping error for co-dominant markers is used this is the probability of an allele dropping out. If CERVUS's (Kalinowski, 2006; Marshall, 1998) model of genotyping error for co-dominant markers is used this parameter is not used. If Hadfield's (2009) model of genotyping error for dominant markers is used this is the probability of a dominant allele being scored as a recessive allele. |
E2 |
if Wang's (2004) or CERVUS's (Kalinowski, 2006; Marshall, 1998) model of genotyping error for co-dominant markers are used this is the probability of an allele being miss-scored. In the CERVUS model errors are not independent for the two alleles within a genotype and so if a genotyping error has occurred at one allele then a genotyping error occurs at the other allele with probability one. Accordingly, |
ped |
pedigree in 3 columns: id, dam, sire. Base individuals have NA as parents. All parents must be in id. |
no_dup |
integer: number of times genotypes are to be observed |
prop.missing |
proportion of observed genotypes that are missing |
marker.type |
|
G |
list of genotype objects; true genotypes for each locus |
Gid |
vector of id names indexing |
Gobs |
list of genotype objects; observed genotypes for each locus |
id |
vector of |
Jarrod Hadfield j.hadfield@ed.ac.uk
Marshall, T. C. et al (1998) Molecular Ecology 7 5 639-655 Kalinowski S.T. et al (2007) Molecular Ecology 16 5 1099-1106 Hadfield J. D. et al (2009) 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, ped=pedigree, no_dup=1) summary(gen_data$G[[1]]) summary(gen_data$Gobs[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.