R Package to compute observed heterozygosity within a population
Hello, Hs(x) in adegenet will do this for the expected heterozygosity. You can use 'summary' combined with seppop to get the average Hobs per population; example with sim2pop:
lapply(seppop(sim2pop), function(e) mean(summary(e)$Hobs, na.rm = TRUE))
$P01 [1] 0.755 $P02 [1] 0.77 Cheers Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org sites.google.com/site/thibautjombart/ github.com/thibautjombart Twitter: @TeebzR <http://twitter.com/TeebzR> +44(0)20 7594 3658 On 12 January 2017 at 13:19, Bhuller, Ravneet <
ravneet.bhuller13 at imperial.ac.uk> wrote:
Dear Members, Is there any suitable package to compute observed heterozygosity within a population? I am interested to compute observed heterozygosity for a population using genind object, rather than at a locus. Many thanks for all your time. Kind regards, Rav
_______________________________________________ R-sig-genetics mailing list R-sig-genetics at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-genetics