gen.dist: Genetic distance

Description Usage Arguments Value References

View source: R/genepop.utilities.R

Description

gen.dist calculates the Jost's D between all possible population pairs using the R package mmod.

This function takes the output from the function clean.genepop (or multi.clean.genepop) as input and uses the R package adegenet to convert the input in a genind object.

A text file with extension .pairD that contains a pairwise distance matrix is saved to disk.

mean.type can be set to either "arithmetic" or "harmonic" (default), which is used to calculate the global estimates of Hs and Ht (see mmod's manual for details).

Usage

1
gen.dist(fname, mean.type = "harmonic")

Arguments

fname

A character vector with the name of the input file including the path

mean.type

The type of mean to be calculated over multiple loci

Value

Save to disk a file with same root of the input file with extension .pairD

References

Jost, L.O.U., 2008. GST and its relatives do not measure differentiation. Molecular Ecology 17, 4015-4026.

Winter, D.J., 2012. mmod: an R library for the calculation of population differentiation statistics. Molecular Ecology Resources 12, 1158-1160.


carlopacioni/HexSimR documentation built on Nov. 28, 2020, 4:12 p.m.