genetic_diff | R Documentation |
Calculate measures of genetic differentiation.
genetic_diff(vcf, pops, method = "nei")
vcf |
a vcfR object |
pops |
factor indicating populations |
method |
the method to measure differentiation |
Measures of genetic differentiation, or fixation indicies, are commonly reported population genetic parameters. This function reports genetic differentiation for all variants presented to it.
The method nei returns Nei's Gst as well as Hedrick's G'st, a correction for high alleleism (Hedrick 2005).
Here it is calculated as in equation 2 from Hedrick (2005) with the exception that the heterozygosities are weighted by the number of alleles observed in each subpopulation.
This is similar to hierfstat::pairwise.fst()
but by using the number of alleles instead of the number of individuals it avoids making an assumption about how many alleles are contributed by each individual.
G'st is calculated as in equation 4b from Hedrick (2005).
This method is based on heterozygosity where all of the alleles in a population are used to calculate allele frequecies.
This may make this a good choice when there is a mixture of ploidies in the sample.
The method jost return's Jost's D as a measure of differentiation. This is calculated as in equation 13 from Jost (2008). Examples are available at Jost's website: http://www.loujost.com.
A nice review of Fst and some of its analogues can be found in Holsinger and Weir (2009).
Hedrick, Philip W. "A standardized genetic differentiation measure." Evolution 59.8 (2005): 1633-1638.
Holsinger, Kent E., and Bruce S. Weir. "Genetics in geographically structured populations: defining, estimating and interpreting FST." Nature Reviews Genetics 10.9 (2009): 639-650.
Jost, Lou. "GST and its relatives do not measure differentiation." Molecular ecology 17.18 (2008): 4015-4026.
Whitlock, Michael C. "G'ST and D do not replace FST." Molecular Ecology 20.6 (2011): 1083-1091.
poppr.amova in poppr, amova in ade4, amova in pegas, hierfstat, DEMEtics, and, mmod.
data(vcfR_example)
myPops <- as.factor(rep(c('a','b'), each = 9))
myDiff <- genetic_diff(vcf, myPops, method = "nei")
colMeans(myDiff[,c(3:8,11)], na.rm = TRUE)
hist(myDiff$Gprimest, xlab = expression(italic("G'"["ST"])),
col='skyblue', breaks = seq(0, 1, by = 0.01))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.