pairwise_genetic_diff {vcfR} | R Documentation |
Pairwise genetic differentiation across populations
Description
pairwise_genetic_diff
Calculate measures of genetic differentiation across all population pairs.
Usage
pairwise_genetic_diff(vcf, pops, method = "nei")
Arguments
vcf |
a vcfR object |
pops |
factor indicating populations |
method |
the method to measure differentiation |
Value
a data frame containing the pairwise population differentiation indices of interest across all pairs of populations in the population factor.
Author(s)
Javier F. Tabima
See Also
genetic_diff
in vcfR
Examples
data(vcfR_example)
pops <- as.factor(rep(c('a','b'), each = 9))
myDiff <- pairwise_genetic_diff(vcf, pops, method = "nei")
colMeans(myDiff[,c(4:ncol(myDiff))], na.rm = TRUE)
pops <- as.factor(rep(c('a','b','c'), each = 6))
myDiff <- pairwise_genetic_diff(vcf, pops, method = "nei")
colMeans(myDiff[,c(4:ncol(myDiff))], na.rm = TRUE)
[Package vcfR version 1.15.0 Index]