# NOT RUN {
data(WarblerG)
A<-extractA(WarblerG[,16:17])
pedigree<-matrix(NA, 8,3)
pedigree[,1]<-1:8
pedigree[,2][5:8]<-c(1,1,2,2)
pedigree[,3][5:8]<-c(3,3,4,4)
G<-simgenotypes(A, E1=0, E2=0.3, ped=pedigree, no_dup=1)
newG<-legalG(G=G$Gobs,A=A,ped=pedigree)
newG$valid
# The input genotypes had a zero probability given the pedigree
# (because of genotype error) but the output genotypes have
# positive probability
legalG(newG$G,A,pedigree)$valid
# }
Run the code above in your browser using DataLab