View source: R/gl.report.maf.r
gl.report.maf | R Documentation |
This script provides summary histograms of MAF for each
population and an overall histogram to assist the decision of
choosing thresholds for the filter function gl.filter.maf
gl.report.maf(
x,
as.pop = NULL,
maf.limit = 0.5,
ind.limit = 5,
plot.display = TRUE,
plot.theme = theme_dartR(),
plot.colors = NULL,
plot.dir = NULL,
plot.file = NULL,
bins = 25,
verbose = NULL
)
x |
Name of the genlight object containing the SNP data [required]. |
as.pop |
Temporarily assign another locus metric as the population for the purposes of deletions [default NULL]. |
maf.limit |
Show histograms MAF range <= maf.limit [default 0.5]. |
ind.limit |
Show histograms only for populations of size greater than ind.limit [default 5]. |
plot.display |
Specify if plot is to be displayed in the graphics window [default TRUE]. |
plot.theme |
User specified theme [default theme_dartR()]. |
plot.colors |
Vector with 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]. |
bins |
Number of bins to display in histograms [default 25]. |
verbose |
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default NULL, unless specified using gl.set.verbosity]. |
The function gl.filter.maf
will filter out the loci with MAF
below a specified threshold.
Function's output
The minimum, maximum, mean and a tabulation of MAF quantiles against thresholds rate are provided. Output also includes a boxplot and a histogram.
This function reports the MAF for each of several quantiles. Quantiles are partitions of a finite set of values into q subsets of (nearly) equal sizes. In this function q = 20. Quantiles are useful measures because they are less susceptible to long-tailed distributions and outliers.
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().
Examples of other themes that can be used can be consulted in
An unaltered genlight object
Custodian: Arthur Georges (Post to https://groups.google.com/d/forum/dartr)
gl.filter.maf
Other matched report:
gl.filter.excess.het()
,
gl.report.allna()
,
gl.report.callrate()
,
gl.report.hamming()
,
gl.report.locmetric()
,
gl.report.overshoot()
,
gl.report.pa()
,
gl.report.rdepth()
,
gl.report.reproducibility()
,
gl.report.secondaries()
,
gl.report.taglength()
gl <- gl.filter.allna(platypus.gl)
gl.report.maf(gl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.