Learn R Programming

dartR.base (version 1.0.5)

gl.filter.heterozygosity: Filters individuals with average heterozygosity greater than a specified upper threshold or less than a specified lower threshold @family matched filter

Description

Calculates the observed heterozygosity for each individual in a genlight object and filters individuals based on specified threshold values. Use gl.report.heterozygosity to determine the appropriate thresholds.

Usage

gl.filter.heterozygosity(x, t.upper = 0.7, t.lower = 0, verbose = NULL)

Value

The filtered genlight object.

Arguments

x

A genlight object containing the SNP genotypes [required].

t.upper

Filter individuals > the threshold [default 0.7].

t.lower

Filter individuals < the threshold [default 0].

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

Author

Custodian: Luis Mijangos -- Post to https://groups.google.com/d/forum/dartr

Examples

Run this code
 result <- gl.filter.heterozygosity(testset.gl,t.upper=0.06,verbose=3)
 tmp <- gl.report.heterozygosity(result,method='ind')
 

Run the code above in your browser using DataLab