Learn R Programming

DEMEtics (version 0.8.1)

Ht: Total Heterozygosity

Description

This function calculates the total heterozygosity over all populations for each locus separately.

Usage

Ht(Table)

Arguments

Table
A data table listing the allelefrequencies for a single locus. It can be obtained from the function allelefreq that is included in this package and has to be of the following format:

Value

  • A data frame called Ht.values that lists the calculated Ht values with the corresponding locus.

Details

To get the total heterozygosity, the total homozygosity is first calculated by averaging the allelefrequencies of each allele over all populations, taking the square of these average values and finally summing up the homozygosities of all alleles. The heterozygosity is obtained by subtracting the homozygosity from 1. Equation according to Jost (2008, p. 4022).

References

Jost, L. 2008 Gst and its relatives do not measure differentiation. Molecular Ecology 17, 18, p. 4015--4026.

See Also

Hs, Hj, all.pops.D, all.pops.Dest, all.pops.Dest.Chao, all.pops.Gst, all.pops.Gst.est, pair.pops.D, pair.pops.Dest, pair.pops.Dest.Chao, pair.pops.Gst, pair.pops.Gst.est

Examples

Run this code
data(Example.transformed)
Example1 <- Example.transformed
allelefreq(Example1)
# This function is included in this package and calculates the
# allelefrequencies as well as the sample sizes

Ht(allelefrequency)

Ht

Run the code above in your browser using DataLab