gl.filter.maf: Filter loci on the basis of minor allele frequency (MAF) in a genlight adegenet object
Description
This script calculates the minor allele frequency for each locus and updates the locus
metadata for FreqHomRef, FreqHomSnp, FreqHets and MAF (if it exists). It then uses
the updated metadata for MAF to filter loci.
Usage
gl.filter.maf(x, threshold = 0.01, v = 2)
Arguments
x
-- name of the genlight object containing the SNP data [required]
threshold
-- threshold MAF -- loci with a MAF less than the threshold will be removed [default 0.01]
v
-- verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2]
Value
The reduced genlight dataset
Details
Note the this filter applies to MAF calculated across all individuals, without regard
to population structure. It is a means of removing overall rare alleles. To apply this to
single populations, use sepPop and lapply.