simgenotypes {MasterBayes}R Documentation

Genotype and Genotyping Error Simulation

Description

Simulates genotypes given a pedigree and allele frequencies. Option exists to simulate observed genotypes given Wangs's (2004) model of genotyping error.

Usage

simgenotypes(A, E1 = 0, E2 = 0, pedigree, no_dup = 1, ...)

Arguments

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

Value

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

Author(s)

Jarrod Hadfield j.hadfield@sheffield.ac.uk

References

Wang J.L. 2004 Genetics 166 4 1963-1979

See Also

genotype

Examples

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]])

[Package MasterBayes version 1.0 Index]