Post date: Jun 16, 2015 3:57:56 AM
#decay of heterozygosity over time given current Ne
#starting het at 0.5, but obviously each locus will have its own het.
## R code to plot decay of het., given Ne
## h0 = initial het., ht = het at gen. t
h0<-0.5
Ne<-99.341
ht<-h0 * (1 - 1/(2*Ne))^(1:100)
plot(1:100,ht,type='l',ylim=c(0,0.5))
Ne<-292.724
ht<-h0 * (1 - 1/(2*Ne))^(1:100)
lines(1:100,ht,col="darkblue")
##based on founders to F3 (217.945) and founders to F1 (171.121) estimates.
pdf("fut_het_26june15.pdf",width=4,height=4)
h0<-0.5
Ne<-217.945
ht<-h0 * (1 - 1/(2*Ne))^(1:100)
plot(1:100,ht,type='l',ylim=c(0,0.5))
Ne<-171.121
ht<-h0 * (1 - 1/(2*Ne))^(1:100)
lines(1:100,ht,col="darkblue")
#add an x or dash lines from y to x axis where het has dropped 5%?
dev.off()