Learn R Programming

DEMEtics (version 0.8.1)

calc: Genetic Differentiation - For Each Locus Separately and Averaged Over all Loci

Description

These four functions calculate measures of genetic differentiation, D, Dest Gst and Gst.est (see Jost, 2008), respectively, when allele frequencies and sample sizes are given. The level of differentiation is given for each locus that has been examined, separately, as well as averaged over all loci.

Usage

D.calc(input, sample.sizes)
Dest.calc(input, sample.sizes)
Gst.calc(input, sample.sizes)     
Gst.est.calc(input, sample.sizes)

Arguments

input
This is a data table containing the allele frequencies for the several loci and populations. It can easily be created from the raw data using the function allelefreq that is included in this package and
sample.sizes
This is a data table listing the number of individuals for each locus and population, from which allelic data are available. It can easily be created from the raw data using the function allelefreq

Value

  • A list 'D.values' (when D or Dest are calculated) or 'G.values' (when Gst or Gst.est are calculated) is returned and assigned to the workspace (.GlobalEnv). It comprises a data table and a single value.
  • D(est).values.for.loci resp. Gst.(est.)values.for.lociA data table comprising the value of genetic differentiation for each locus separately
  • Mean.D(est).value resp. Mean.Gst.(est.)valueThe mean value of genetic differentiation over all loci

Details

By using the functions D, Dest Gst or Gst.est, the measures of genetic differentiation are calculated for each locus separately. The value giving the averaged differentiation over all loci is obtained by calculating the arithmetic mean over all loci.

References

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

See Also

Gst, Gst.est, Dest, D, allelefreq all.pops.D, all.pops.Dest, all.pops.Gst, all.pops.Gst.est, pair.pops.D, pair.pops.Dest, pair.pops.Gst, pair.pops.Gst.est

Examples

Run this code
data(Example.transformed)
Example <- Example.transformed
allelefreq(Example)
# By using this function, the allele frequencies and
# sample sizes, that are needed as function arguments, are calculated
# automatically.

D.calc(allelefrequency,sample.sizes)
D.values

Dest.calc(allelefrequency,sample.sizes)
D.values

Gst.calc(allelefrequency,sample.sizes)
G.values

Gst.est.calc(allelefrequency,sample.sizes)
G.values

Run the code above in your browser using DataLab