Learn R Programming

dartR (version 1.1.11)

gl.filter.secondaries: Filter loci that represent secondary SNPs in a genlight {adegenet} 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 loci after ordering the genlight object on based on repeatability, avgPIC in that order (method="best") or at random (method="random")

Usage

gl.filter.secondaries(x, method = "random", v = 2)

Arguments

x

-- name of the genlight object containing the SNP data [required]

method

-- method of selecting SNP locus to retain, best or random [random]

v

-- verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2]

Value

The reduced genlight, plus a summary

Examples

Run this code
# NOT RUN {
result <- gl.report.secondaries(testset.gl)
result2 <- gl.filter.secondaries(testset.gl)
# }

Run the code above in your browser using DataLab