qDplot: Plot the genetic diversity profiles (q=0,1,2)

View source: R/qDplot.R

qDplotR Documentation

Plot the genetic diversity profiles (q=0,1,2)

Description

This function calculates the diversity profiles and generates a line plot. You can get either one of the diversity index plot, richness (q=0), exponential Shannon entropy (q=1), and heterozygosity related measure of diversity (q=2), or all of them.

Usage

qDplot(x, q, ncode)

Arguments

x

The input genetic files, genepop format

q

The order of Hill numbers, q =0,1,2, or "all".If q= "all", this will return plot including three diversities.

ncode

The coding type of your data.

Details

Result returns a diversity plot.

Author(s)

qinxinghu@gmail.com

References

Qin, X., & Gaggiotti, O. E. (2022). Information-based summary statistics for spatial genetic structure inference. Molecular Ecology Resources, 22(6), 2183-2195.

Marcon, E., & Herault, B. (2015). entropart: An R package to measure and partition diversity. Journal of Statistical Software, 67(8).

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

qD

Examples

# example genepop file
f1 <- function(f) system.file("extdata", f,package="HierDpart")
# plot allelic richness
qDplot(f1("Island.gen"),q=0,ncode=3)
#plot all three diversity profiles
qDplot(f1("Island.gen"),q="all",ncode=3)

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