vcfR (version 1.9.0)

pairwise_genetic_diff: 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.

See Also

genetic_diff in vcfR

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataCamp Workspace