g1<-ggplot()+geom_point(aes(x=locinfo$POS,y=div$Hobs-div$Hexp),size=0.3)+xlab("Position")+ylab("Hobs - Hexp")+ggtitle("Difference between Hobs and Hexp for each position")+theme_light()
g1
# Bartlett test (homogeneity of variance)
# H0 : Hobs = Hexp
bartlett.test(list(div$Hexp,div$Hobs))
# ggplot2 try
g1<-ggplot()+geom_point(aes(x=locinfo$POS,y=div$Hobs))+xlab("Position")+ylab("Observed heterozygosity")+ggtitle("Observed heterozygosity per locus")+theme_light()