Learn R Programming

dartR (version 1.0)

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(gl, method = "loc", threshold = 0.95)

Arguments

gl

-- 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]

Value

The reduced genlight or genind object, plus a summary

Examples

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

Run the code above in your browser using DataLab