COR_DeltaDd: Function for calculating pairwise Delta D and correlation...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/COR_DeltaDd.R

Description

This function calculates new pairwise genetic differentiation, Delta D (Gaggiotti OE, et al, 2018), as well as the correlation between genetic differentiation (Delta D) and geographic distance.

Usage

1
COR_DeltaDd(f, d, ncode, nrepet)

Arguments

f

A genetic data files, the format is genepop format.

d

Pairwise geographic distance for calculating correlations. If no actual geographic distance, d=NULL. If TRUE, the geographic distance should be a matrix that corresponds to the pairwise genetic differentiation matrix.

ncode

The coding type of your genetic data.

nrepet

Number of permutations.

Details

This function returns to lists of pairwise Delta D matrix, and a matrix of theorical geographical distance if d is NULL, as well as the correlation coefficient.

Value

PairwiseDeltaD

The pairwise genetic differentiation matrix (Delta D).

Dgeo

The pairwise geographical distance matrix.

CorDeltaDd

Pearson correlation coefficient between genetic differentiation (Delta D) and geographic distance.

Author(s)

qinxinghu@gmail.com

References

Gaggiotti, O. E., Chao, A., Peres-Neto, P., Chiu, C. H., Edwards, C., Fortin, M. J., ... & Selkoe, K. A. (2018). Diversity from genes to ecosystems: A unifying framework to study variation across biological metrics and scales. Evolutionary Applications.

See Also

COR_Fst

Examples

1
2
3
4
5
# example genepop file
f <- system.file('extdata',package='HierDpart')
infile <- file.path(f, "Island.gen")
d1=COR_DeltaDd(infile,d=NULL,ncode=3,nrepet=999)
print(d1)

HierDpart documentation built on March 31, 2021, 5:09 p.m.