HierD: Function for calculating and decomposing genetic diversity...

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

View source: R/HierD.R

Description

This function calculates and decomposes genetic diversity (Hill number q=1) and differentiation (Delta D) (Oscar, E et al, 2018) into alpha, beta, gamma diversity, as well as Delta D2 and Delta D1 differentiation.

Usage

1
HierD(x, nreg, r, ncode)

Arguments

x

The genotypic data, genepop format

nreg

Number of aggregate in the hierarchical structure.

r

The number of subaggregate in the hierarchy.

ncode

Coding type of genetic data.

Details

This function calculates the hierarchical genetic differentiation (Delta D) for metapopulations structured in any hierarchy. In this function, you can input genepop file (x) and define structure (nreg, r) in the arguments, and then returns a list of your hierarchical genetic diversity and differentiation (Delta D ). The result contains D_gamma, D_alpha.2, D_alpha.1, D_beta.2, D_beta.1, Differentiation.2, Differentiation.1, which corresponds to the diversity at different hierarchical levels.

Value

Dst

Result returns to a list of hierarchical diversities (q=1) and genetic differentiations, including D_gamma (total diversity), D_alpha.2 (average total diversity between aggregates (eg. regions) within the ecosystem), D_alpha.1 (average diversity between subaggregates (eg.subpopulations)), D_beta.2 (number of aggregate equivalent), D_beta.1 (number of subaggregate equivalent), Differentiation.2 (genetic differentiation between aggragates), Differentiation.1 (genetic differentiation between subaggregates).

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

HierAr; HierFst; HierHe

Examples

1
2
3
4
5
# example genepop file
f <- system.file('extdata',package='HierDpart')
infile <- file.path(f, "Island.gen")
hierD=HierD(infile,nreg=4,r=c(7,4,2,3),ncode=3)
print(hierD)

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