Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Hs

Expected heterozygosity (Hs)


Description

This function computes the expected heterozygosity (Hs) within populations of a genpop object. This function is available for codominant markers (@type="codom") only. Hs is commonly used for measuring within population genetic diversity (and as such, it still has sense when computed from haploid data).

Usage

Hs(x, pop = NULL)

Arguments

x

a genind or genpop object.

pop

only used if x is a genind; an optional factor to be used as population; if not provided, pop(x) is used.

Details

Let m(k) be the number of alleles of locus k, with a total of K loci. We note f_i the allele frequency of allele i in a given population. Then, Hs is given for a given population by:

\frac{1}{K} ∑_{k=1}^K (1 - ∑_{i=1}^{m(k)} f_i^2)

Value

a vector of Hs values (one value per population)

Author(s)

Thibaut Jombart t.jombart@imperial.ac.uk

See Also

Hs.test to test differences in Hs between two groups

Examples

## Not run: 
data(nancycats)
Hs(genind2genpop(nancycats))

## End(Not run)

adegenet

Exploratory Analysis of Genetic and Genomic Data

v2.1.3
GPL (>= 2)
Authors
Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>), Zhian N. Kamvar [aut, cre] (<https://orcid.org/0000-0003-1458-7108>), Caitlin Collins [ctb], Roman Lustrik [ctb], Marie-Pauline Beugin [ctb], Brian J. Knaus [ctb], Peter Solymos [ctb], Vladimir Mikryukov [ctb], Klaus Schliep [ctb], Tiago Maié [ctb], Libor Morkovsky [ctb], Ismail Ahmed [ctb], Anne Cori [ctb], Federico Calboli [ctb], RJ Ewing [ctb], Frédéric Michaud [ctb], Rebecca DeCamp [ctb], Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.