Filters loci that show significant departure from Hardy-Weinberg Equilibrium
Calculates the probabilities of agreement with H-W equilibrium based on observed frequencies of reference homozygotes, heterozygotes and alternate homozygotes.
Uses the exact calculations contained in function prob.hwe() as developed by Wigginton, JE, Cutler, DJ, and Abecasis, GR.
gl.filter.hwe(x, alpha = 0.05, basis = "any", bon = TRUE, verbose = NULL)
x |
– a genlight object containing the SNP genotypes [Required] |
alpha |
– level of significance (per locus) [Default 0.05] |
basis |
– basis for filtering out loci (any, HWE departure in any one population) [default basis="any"] |
bon |
– apply bonferroni correction to significance levels for filtering [default TRUE] |
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] |
Input is a genlight adegenet object containing SNP genotypes (0 homozygous for reference SNP, 1 heterozygous, 2 homozygous for alternate SNP).
Loci are filtered if they show HWE departure in any one population. Note that power to detect departures from HWE is affected by sample size and that effective filtering may require substantial sample sizes (n > 20).
a genlight object with the loci departing significantly from HWE removed
Arthur Georges (Post to https://groups.google.com/d/forum/dartr)
result <- gl.filter.hwe(testset.gl, 0.05, bon=TRUE, verbose=3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.