This script calculates various distances between populations based on allele frequencies. The distances are calculated by scripts in the stats or vegan libraries, with the exception of the pcfixed (percent fixed differences) and pa (total private alleles) distances.
gl.dist.pop(x, method = "euclidean", binary = FALSE, diag = TRUE,
upper = FALSE, p = NULL, v = 2)
-- name of the genlight containing the SNP genotypes [required]
-- Specify distance measure [method=euclidean]
-- Perform presence/absence standardization before analysis using decostand [binary=FALSE]
-- Compute and display diagonal [TRUE]
-- Return also upper triangle [FALSE]
-- The power of the Minkowski distance (typically a value ranging from 0.25 to infinity) [0.5]
-- verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2]
A matrix of distances between populations (class dist)
The distance measure can be one of "manhattan", "euclidean", "pcfixed", "pa", canberra", "bray", "kulczynski", "jaccard", "gower", "morisita", "horn", "mountford", "raup" , "binomial", "chao", "cao", "mahalanobis", "maximum", "binary" or "minkowski". Refer to the documentation for dist stats or vegdist vegan for definitions.
Distance pcfixed calculates the pair-wise count of fixed allelic differences between populations. Distance pa tallies the total number of private alleles possessed by one or the other population.
# NOT RUN {
gl.dist.pop(testset.gl, method="euclidean", diag=TRUE)
# }
Run the code above in your browser using DataLab