View source: R/gl.filter.allna.r
gl.filter.allna | R Documentation |
This script deletes deletes loci or individuals with all calls missing (NA), from a genlight object
A DArT dataset will not have loci for which the calls are scored all as missing (NA) for a particular individual, but such loci can arise rarely when populations or individuals are deleted. Similarly, a DArT dataset will not have individuals for which the calls are scored all as missing (NA) across all loci, but such individuals may sneak in to the dataset when loci are deleted. Retaining individual or loci with all NAs can cause issues for several functions.
Also, on occasion an analysis will require that there are some loci scored in each population. Setting by.pop=TRUE will result in removal of loci when they are all missing in any one population.
Note that loci that are missing for all individuals in a population are
not imputed with method 'frequency' or 'HW'. Consider
using the function gl.filter.allna
with by.pop=TRUE.
gl.filter.allna(x, by.pop = FALSE, recalc = FALSE, verbose = NULL)
x |
Name of the input genlight object [required]. |
by.pop |
If TRUE, loci that are all missing in any one population are deleted [default FALSE] |
recalc |
Recalculate the locus metadata statistics if any individuals are deleted in the filtering [default FALSE]. |
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]. |
A genlight object having removed individuals that are scored NA across all loci, or loci that are scored NA across all individuals.
Author(s): Arthur Georges. Custodian: Arthur Georges – Post to https://groups.google.com/d/forum/dartr
Other filter functions:
gl.filter.callrate()
,
gl.filter.heterozygosity()
,
gl.filter.hwe()
,
gl.filter.ld()
,
gl.filter.locmetric()
,
gl.filter.maf()
,
gl.filter.monomorphs()
,
gl.filter.overshoot()
,
gl.filter.parent.offspring()
,
gl.filter.pa()
,
gl.filter.rdepth()
,
gl.filter.reproducibility()
,
gl.filter.secondaries()
,
gl.filter.sexlinked()
,
gl.filter.taglength()
# SNP data
result <- gl.filter.allna(testset.gl, verbose=3)
# Tag P/A data
result <- gl.filter.allna(testset.gs, verbose=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.