View source: R/gl.recalc.metrics.r
gl.recalc.metrics | R Documentation |
When individuals,or populations, are deleted from a genlight object, the locus metrics no longer apply. For example, the Call Rate may be different considering the subset of individuals, compared with the full set. This script recalculates those affected locus metrics, namely, avgPIC, CallRate, freqHets, freqHomRef, freqHomSnp, OneRatioRef, OneRatioSnp, PICRef and PICSnp. Metrics that remain unaltered are RepAvg and TrimmedSeq as they are unaffected by the removal of individuals.
gl.recalc.metrics(x, mono.rm = FALSE, verbose = NULL)
x |
Name of the genlight object containing SNP genotypes [required]. |
mono.rm |
If TRUE, removes monomorphic loci [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 or as specified using gl.set.verbosity]. |
The script optionally removes resultant monomorphic loci or loci with all values missing and deletes them (using gl.filter.monomorphs.r).
The script returns a genlight object with the recalculated locus metadata.
A genlight object with the recalculated locus metadata.
Custodian: Luis Mijangos (Post to https://groups.google.com/d/forum/dartr)
gl.filter.monomorphs
gl <- gl.recalc.metrics(testset.gl, verbose=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.