gl.filter.excess.het: Filters excessively-heterozygous loci from a genlight object...

View source: R/gl.filter.excess.het.r

gl.filter.excess.hetR Documentation

Filters excessively-heterozygous loci from a genlight object [deprecated]

Description

Deprecated. Use gl.filter.hwe(direction = 'excess', min.hobs = 0.5, test.type = 'ChiSquare', mult.comp.adj = TRUE, mult.comp.adj.method = 'fdr', cc.val = 0) instead (cc.val = 0.5 for Yates = TRUE); see gl.filter.hwe.

This wrapper reproduces the workflow of Robledo-Ruiz et al. (2023) for removing loci with a significant excess of heterozygotes (candidate sex-linked or paralogous loci) by calling gl.filter.hwe with the equivalent settings, and will be removed in a future release.

Usage

gl.filter.excess.het(
  x,
  Yates = FALSE,
  mono.rm = FALSE,
  recalc = FALSE,
  verbose = NULL
)

Arguments

x

A genlight object containing the SNP genotypes [required].

Yates

Whether to use Yates's continuity correction [default FALSE].

mono.rm

Remove monomorphic loci after filtering [default FALSE].

recalc

Recalculate the locus metadata statistics after 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 NULL, adopting the global verbosity set by gl.set.verbosity(), or 2 if no global is set].

Details

The published workflow is reproduced via gl.filter.hwe(direction = 'excess', min.hobs = 0.5, ...): only loci with observed heterozygosity of at least 0.5 are tested, and the false-discovery-rate adjustment is confined to that screened set, as in the original. Differences from the original implementation: the chi-square test is performed by HardyWeinberg::HWChisq (p-values can differ marginally from the original hand-rolled test), and the per-population genotype counts are computed on the correct individuals (the original subset individuals with a recycled per-population index).

Value

The genlight object with excessively-heterozygous loci removed, returned invisibly.

Author(s)

Author(s): Jesus Castrejon-Figueroa, Diana A Robledo-Ruiz. Custodian: Ching Ching Lau – Post to https://groups.google.com/d/forum/dartr

References

  • Robledo-Ruiz, D. A., Austin, L., Amos, J. N., Castrejon-Figueroa, J., Harley, D. K., Magrath, M. J., Sunnucks, P. & Pavlova, A. (2023). Easy-to-use R functions to separate reduced-representation genomic datasets into sex-linked and autosomal loci, and conduct sex assignment. Molecular Ecology Resources.

See Also

gl.filter.hwe, gl.report.hwe

Other matched filter: gl.filter.allna(), gl.filter.callrate(), gl.filter.contamination(), gl.filter.factorloadings(), gl.filter.hamming(), gl.filter.heterozygosity(), gl.filter.hwe(), gl.filter.ld(), gl.filter.locmetric(), gl.filter.maf(), gl.filter.monomorphs(), gl.filter.overshoot(), gl.filter.pa(), gl.filter.rdepth(), gl.filter.replicates(), gl.filter.replicates.KING(), gl.filter.reproducibility(), gl.filter.secondaries(), gl.filter.taglength()

Examples


if (isTRUE(getOption("dartR_fbm"))) LBP <- gl.gen2fbm(LBP)
filtered.gl <- gl.filter.excess.het(x = LBP, Yates = TRUE)


dartR.base documentation built on Nov. 18, 2026, 9:06 a.m.