gl.report.rdepth {dartR.base} | R Documentation |
Reports summary of Read Depth for each locus
Description
SNP datasets generated by DArT report AvgCountRef and AvgCountSnp as counts of sequence tags for the reference and alternate alleles respectively. These can be used to back calculate Read Depth. Fragment presence/absence datasets as provided by DArT (SilicoDArT) provide Average Read Depth and Standard Deviation of Read Depth as standard columns in their report. This function reports the read depth by locus for each of several quantiles.
Usage
gl.report.rdepth(
x,
plot.display = TRUE,
plot.theme = theme_dartR(),
plot.colors = NULL,
plot.dir = NULL,
plot.file = NULL,
verbose = NULL
)
Arguments
x |
Name of the genlight object containing the SNP or presence/absence (SilicoDArT) data [required]. |
plot.display |
Specify if plot is to be produced [default TRUE]. |
plot.theme |
User specified theme [default theme_dartR()]. |
plot.colors |
Vector with two color names for the borders and fill [default c("#2171B5", "#6BAED6")]. |
plot.dir |
Directory to save the plot RDS files [default as specified by the global working directory or tempdir()] |
plot.file |
Filename (minus extension) for the RDS plot file [Required for plot save] |
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]. |
Details
The function displays a table of minimum, maximum, mean and quantiles for
read depth against possible thresholds that might subsequently be specified
in gl.filter.rdepth
. If plot.display=TRUE, display also includes a
boxplot and a histogram to guide in the selection of a threshold for
filtering on read depth.
Plot colours can be set with gl.select.colors().
If plot.file is specified, plots are saved to the directory specified by the user, or the global
default working directory set by gl.set.wd() or to the tempdir().
For examples of themes, see
Value
An unaltered genlight object
Author(s)
Custodian: Arthur Georges – Post to https://groups.google.com/d/forum/dartr
See Also
Other matched report:
gl.report.callrate()
,
gl.report.hamming()
,
gl.report.locmetric()
,
gl.report.maf()
,
gl.report.overshoot()
,
gl.report.pa()
,
gl.report.reproducibility()
,
gl.report.secondaries()
,
gl.report.taglength()
Examples
# SNP data
df <- gl.report.rdepth(testset.gl)
df <- gl.report.rdepth(testset.gs)