gt2popsum | R Documentation |
Functions that make population genetics summaries
gt2popsum(x, deprecated = TRUE)
gt.to.popsum(x)
x |
object of class chromR or vcfR |
deprecated |
logical specifying whether to run the function (FALSE) or present deprecation message (TRUE). |
The function 'gt2popsum' was deprecated in vcfR 1.8.0. This was because it was written entirely in R and did not perform well. Users should use 'gt.to.popsum()' instead because it has similar functionality but includes calls to C++ to increase its performance.
This function creates common population genetic summaries from either a chromR or vcfR object.
The default is to return a matrix containing allele counts, He, and Ne.
Allele_counts is the a comma delimited string of counts.
The first position is the count of reference alleles, the second positions is the count of the first alternate alleles, the third is the count of second alternate alleles, and so on.
He is the gene diversity, or heterozygosity, of the population.
This is 1 - \sum x^{2}_{i}
, or the probability that two alleles sampled from the population are different, following Nei (1973).
Ne is the effective number of alleles in the population.
This is 1/\sum x^{2}_{i}
or one minus the homozygosity, from Nei (1987) equation 8.17.
Nei, M., 1973. Analysis of gene diversity in subdivided populations. Proceedings of the National Academy of Sciences, 70(12), pp.3321-3323.
Nei, M., 1987. Molecular evolutionary genetics. Columbia University Press.
data(vcfR_test)
# Check the genotypes.
extract.gt(vcfR_test)
# Summarize the genotypes.
gt.to.popsum(vcfR_test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.