COR_detaDd: Function to calculate pairwise detaD and correlation between...

COR_detaDdR Documentation

Function to calculate pairwise detaD and correlation between genetic differentiation (deta D) and geographic distance

Description

This function calculates new pairwise genetic differentication, deta D (Oscar E, et al, 2018), as well as the correlation between genetic differentiation (deta D) and geographic distance.

Usage

COR_detaDd(f, d, ncode)

Arguments

f

A genetic data files, the format is genepop format.

d

Pairwise geographic distance for calculating correlations. If no actual geographic distance, d=FALSE. 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

Details

This function returns to lists of pairwise deta D matrix, and a matrix of theorical geographical distance if d is FALSE, as well as their correlation coefficient.

Value

PairwiseDetaD

The pairwise genetic differentiation-detaD matrix.

Dgeo

The pairwise geographical distance matrix.

CordetaDd

Person correlation coefficient between genetic differentiation (deta 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

infile <- system.file('extdata', 'Island.gen',package='HierDpart')
locinfile <- 'Island.gen' ## file in user's directory not in R's extdata directory
check <- file.copy(infile,locinfile,overwrite=TRUE)
d1=COR_detaDd(infile,d=FALSE,ncode=3)
print(d1)

xinghuq/HierDpart documentation built on March 21, 2023, 6:43 p.m.