Learn R Programming

dartR.base (version 1.0.5)

gl.report.shannon: Report SNP diversity from a genlight object, with reference to Ma, Z., Li, L., & Zhang, Y. P. (2020). Defining individual-level genetic diversity and similarity profiles. Scientific reports, 10(1), 5805.

Description

This function needs package adegenet, please install it.

Usage

gl.report.shannon(
  x,
  plot.display = TRUE,
  plot.theme = theme_dartR(),
  plot.dir = NULL,
  plot.file = NULL,
  level = "alpha",
  order = 5,
  verbose = 2
)

Value

A dataframe containing SNP diversity per individual

Arguments

x

A genlight file (works only for diploid data) [required].

plot.display

Specify if plot is to be produced [default TRUE].

plot.theme

Theme for the plot. See Details for options [default theme_dartR()].

plot.dir

Directory to save the plot RDS files [default as specified by the global working directory or tempdir()]..

plot.file

Name for the RDS binary file to save (base name only, exclude extension) [default NULL].

level

The types of SNP diversity to report. [default 'alpha', also accept 'beta', 'gamma'].

order

The number of order to report. Starts from 0. [default 5].

verbose

Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2, unless specified using gl.set.verbosity].

Author

Ching Ching Lau (Post to https://groups.google.com/d/forum/dartr)

Details

details

  • SNP diversity per individual

References

  • Ma, Z., Li, L., & Zhang, Y. P. (2020). Defining individual-level genetic diversity and similarity profiles. Scientific reports, 10(1), 5805.

Examples

Run this code
if (FALSE) {
obj <- gl.report.shannon(gl)
}

Run the code above in your browser using DataLab