gl.filter.secondaries: Filters loci that represent secondary SNPs in a genlight...

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

gl.filter.secondariesR Documentation

Filters loci that represent secondary SNPs in a genlight object

Description

SNP datasets generated by DArT include fragments with more than one SNP and record them separately with the same CloneID (=AlleleID). These multiple SNP loci within a fragment (secondaries) are likely to be linked, and so you may wish to remove secondaries.

This script filters out all but the first sequence tag with the same CloneID after ordering the genlight object on based on repeatability, avgPIC in that order (method='best') or at random (method='random').

The filter has not been implemented for tag presence/absence data.

Usage

gl.filter.secondaries(x, method = "random", verbose = NULL)

Arguments

x

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

method

Method of selecting SNP locus to retain, 'best' or 'random' [default 'random'].

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 genlight object, with the secondary SNP loci removed.

Author(s)

Custodian: Arthur Georges – Post to https://groups.google.com/d/forum/dartr

See Also

Other filter functions: gl.filter.allna(), gl.filter.callrate(), gl.filter.heterozygosity(), gl.filter.hwe(), gl.filter.ld(), gl.filter.locmetric(), gl.filter.maf(), gl.filter.monomorphs(), gl.filter.overshoot(), gl.filter.parent.offspring(), gl.filter.pa(), gl.filter.rdepth(), gl.filter.reproducibility(), gl.filter.sexlinked(), gl.filter.taglength()

Examples

gl.report.secondaries(testset.gl)
result <- gl.filter.secondaries(testset.gl)

green-striped-gecko/dartR documentation built on Jan. 31, 2024, 10:14 a.m.