gl.filter.replicates: Remove replicated individuals

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

gl.filter.replicatesR Documentation

Remove replicated individuals

Description

Remove replicated individuals

Usage

gl.filter.replicates(
  x,
  replicates.report,
  loc_threshold = 100,
  perc_geno = 0.95,
  recalc = FALSE,
  mono.rm = FALSE,
  verbose = NULL
)

Arguments

x

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

replicates.report

Output of function gl.report.replicates [required].

loc_threshold

Minimum number of loci required to assess that two individuals are replicates [default 100].

perc_geno

Minimum percentage of genotypes in which two individuals should be the same [default 0.95].

recalc

If TRUE, recalculate the locus metadata statistics [default FALSE].

mono.rm

If TRUE, remove monomorphic and all NA loci [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].

Details

Remove replicated individuals using as input the report from function gl.report.replicates. The user can choose new thresholds for the minimum number of loci required to asses that two individuals are replicates (loc_threshold) and the minimum percentage of genotypes in which two individuals should be the same (perc_geno) from those thresholds use in gl.report.replicates. Note that thresholds can only be tightened relative to those used in gl.report.replicates – the report table contains only the pairs that passed the original thresholds. For each retained pair the member with the higher missing-data rate is removed; ties remove the alphabetically later individual.

Value

A reduced dartR genlight object, returned invisibly

Author(s)

Author(s): Luis Mijangos. 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.pa(), gl.filter.rdepth(), gl.filter.replicates.KING(), gl.filter.reproducibility(), gl.filter.secondaries(), gl.filter.taglength()

Examples


t1 <- platypus.gl[1:50,]
res_rep <- gl.report.replicates(t1, loc_threshold = 500, 
perc_geno = 0.85)
t2 <- gl.filter.replicates(t1, replicates.report = res_rep, perc_geno = 0.85)


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