Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gl.dist.pop

Calculate a distance matrix for populations defined in an {adegenet} genlight object


Description

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) distance.

Usage

gl.dist.pop(
  x,
  method = "euclidean",
  plot = TRUE,
  boxplot = "standard",
  range = 1.5,
  binary = FALSE,
  p = NULL,
  verbose = NULL
)

Arguments

x

– name of the genlight containing the SNP genotypes [required]

method

– Specify distance measure [euclidean]

plot

– if TRUE, display a histogram of the genetic distances, and a whisker plot [TRUE]

boxplot

– if 'standard', plots a standard box and whisker plot; if 'adjusted', plots a boxplot adjusted for skewed distributions ['standard']

range

– specifies the range for delimiting outliers [1.5 interquartile ranges]

binary

– Perform presence/absence standardization before analysis using decostand [FALSE]

p

– The power of the Minkowski distance (typically a value ranging from 0.25 to infinity) [0.5]

verbose

– verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity]

Details

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.

Value

An object of class 'dist' giving distances between populations

Author(s)

Arthur Georges (Post to https://groups.google.com/d/forum/dartr)

Examples

gl.dist.pop(testset.gl, method="euclidean")

dartR

Importing and Analysing SNP and Silicodart Data Generated by Genome-Wide Restriction Fragment Analysis

v1.9.6
GPL-2
Authors
Bernd Gruber [aut, cre], Arthur Georges [aut], Jose L. Mijangos [aut], Peter J. Unmack [ctb], Oliver Berry [ctb], Lindsay V. Clark [ctb], Floriaan Devloo-Delva [ctb]
Initial release
2021-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.