gl.hwe.pop: Filter function to facilitate analysing of dart data
Description
Filter function to facilitate analysing of dart data
Usage
gl.hwe.pop(gi, pvalue = 0.05, plot = TRUE)
Arguments
gi
a genlight or genind object(genlight is internally converted to genind)
pvalue
the p-value for the HWE test.
plot
a switch if a barplot is wanted.
Value
This functions performs a HWE test for every population (rows) and loci (columns) and returns a true false matrix. True is reported if the p-value of an HWE-test for a particular loci and population was below the specified threshold (pvalue, default=0.05). The thinking behind this approach is that loci that are not in HWE in several populations have most likely to be treated (e.g. filtered if loci under selection are of interest). If plot=TRUE a barplot on the on the loci and the sum of deviation over all population is returned. Loci that deviate in the majority of populations can be identified via colSums on the resulting matrix.