Learn R Programming

dartR (version 1.0.5)

gl.filter.callrate: Filter loci or specimens in a genlight {adegenet} object based on call rate

Description

SNP datasets generated by DArT have missing values primarily arising from failure to call a SNP because of a mutation at one or both of the the restriction enzyme recognition sites. This script filters out loci (or specimens) for which the call rate is lower than a specified value. The script will also filter out loci (or specimens) in SilicoDArT (presence/absence) datasets where the call rate is lower than the specified value. In this case, the data are missing owing to low coverage.

Usage

gl.filter.callrate(x, method = "loc", threshold = 0.95, recalc = TRUE,
  v = 2)

Arguments

x

name of the genlight object containing the SNP data, or the genind object containing the SilocoDArT data [required]

method

-- "loc" to specify that loci are to be filtered, "ind" to specify that specimens are to be filtered [default "loc"]

threshold

-- threshold value below which loci will be removed [default 0.95]

recalc

-- Recalculate the locus metadata statistics if any individuals are deleted in the filtering [default TRUE]

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 or genind object, plus a summary

Examples

Run this code
# NOT RUN {
result <- gl.filter.callrate(testset.gl, method="ind", t=0.8)
# }

Run the code above in your browser using DataLab