gl.filter.pa: Filters loci that contain private (and fixed alleles) between...

View source: R/gl.filter.pa.r

gl.filter.paR Documentation

Filters loci that contain private (and fixed alleles) between two populations

Description

This script is meant to be used prior to gl.nhybrids to maximise the information content of the SNPs used to identify hybrids (currently newhybrids allows only 200 SNPs). The idea is to use first all loci that have fixed alleles between the potential source populations and then 'fill up' to 200 loci using loci that have private alleles between those populations. The function filters for those loci. If invers is set to TRUE, the complement is returned (all loci that are not fixed and have no private alleles).

Usage

gl.filter.pa(x, pop1, pop2, invers = FALSE, verbose = NULL)

Arguments

x

Name of the genlight object containing the SNP or SilicoDArT data [required].

pop1

Name of the first parental population (in quotes) [required].

pop2

Name of the second parental population (in quotes) [required].

invers

Switch to filter for all loci that have no private alleles and are not fixed [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, unless specified using gl.set.verbosity].

Value

The reduced genlight dataset, containing only loci with fixed differences or private alleles between the two populations (or the complement if invers = TRUE).

Author(s)

Author(s): Bernd Gruber, Ella Kelly (University of Melbourne). Custodian: Luis Mijangos – Post to https://groups.google.com/d/forum/dartr

See Also

Other matched filter: gl.filter.allna(), gl.filter.callrate(), gl.filter.contamination(), gl.filter.excess.het(), 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.rdepth(), gl.filter.replicates(), gl.filter.replicates.KING(), gl.filter.reproducibility(), gl.filter.secondaries(), gl.filter.taglength()

Examples

if (isTRUE(getOption("dartR_fbm"))) testset.gl <- gl.gen2fbm(testset.gl)
result <- gl.filter.pa(testset.gl, pop1 = popNames(testset.gl)[1],
pop2 = popNames(testset.gl)[2], verbose = 3)


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