Skip to content
Back to formatted view

Raw Message

Message-ID: <CANPRA+oLPetO7cs4-+wmuLW=wQBr6Sbc7nq8krqg-e3cDyo+AA@mail.gmail.com>
Date: 2017-01-16T12:03:14Z
From: Thibaut Jombart
Subject: R Package to compute observed heterozygosity within a population
In-Reply-To: <A1677BC1-28CB-44EB-9BF5-3E1ED7AEC82C@ic.ac.uk>

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
>

	[[alternative HTML version deleted]]