Learn R Programming

dartR.base (version 1.0.5)

gl.report.taglength: Reports summary of sequence tag length across loci

Description

SNP datasets generated by DArT typically have sequence tag lengths ranging from 20 to 69 base pairs. This function reports summary statistics of the tag lengths.

Usage

gl.report.taglength(
  x,
  plot.display = TRUE,
  plot.theme = theme_dartR(),
  plot.colors = NULL,
  plot.file = NULL,
  plot.dir = NULL,
  verbose = NULL
)

Value

Returns unaltered genlight object

Arguments

x

Name of the genlight object containing the SNP [required].

plot.display

If TRUE, histograms of base composition are displayed in the plot window [default TRUE].

plot.theme

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

plot.colors

List of two color names for the borders and fill of the plots [default c("#2171B5", "#6BAED6")].

plot.file

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

plot.dir

Directory in which to save files [default = working directory]

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

Author(s): Arthur Georges. Custodian: Arthur Georges -- Post to https://groups.google.com/d/forum/dartr

Details

This function reports sequence tag lengths for a genlight object. It is a companion function to gl.filter.taglength which can be used to filter out loci with a tag length less than a specified threshold. The table of quantiles is useful for deciding a threshold for subsequent filtering as it provides an indication of the percentages of loci that will be retained and lost. Function's output The minimum, maximum, mean and a tabulation of tag length quantiles against thresholds are output to the console. The output also includes a boxplot and a histogram to guide in the selection of a threshold for filtering on tag length.

If a plot.file is given, the ggplot arising from this function is saved as an "RDS" binary file using saveRDS(); can be reloaded with readRDS(). A file name must be specified for the plot to be saved. If a plot directory (plot.dir) is specified, the ggplot binary is saved to that directory; otherwise to the tempdir().

To avoid issues from inadvertent use of this function in an assignment statement, the function returns the genlight object unaltered.

See Also

gl.filter.taglength

Other matched report: gl.filter.excess.het(), gl.report.allna(), gl.report.callrate(), gl.report.hamming(), gl.report.locmetric(), gl.report.maf(), gl.report.overshoot(), gl.report.pa(), gl.report.rdepth(), gl.report.reproducibility(), gl.report.secondaries()

Examples

Run this code
out <- gl.report.taglength(testset.gl)

Run the code above in your browser using DataLab