Learn R Programming

vcfR (version 1.1.0)

is.het: Query genotypes for heterozygotes

Description

Query a matrix of genotypes for heterozygotes

Usage

is.het(x, na_is_false = TRUE)

Arguments

x

a matrix of genotypes

na_is_false

should missing data be returned as NA (FALSE) or FALSE (TRUE)

Details

This function was designed to identify heterozygous positions in a matrix of genotypes. The matrix of genotypes can be created with extract.gt. Because the goal was to identify heterozygotes it may be reasonable to ignore missing values by setting na_is_false to TRUE so that the resulting matrix will consist of only TRUE and FALSE. In order to preserve missing data as missing na_is_false can be set to FALSE where if at least one allele is missing NA is returned.

See Also

extract.gt

Examples

Run this code
# NOT RUN {
data(vcfR_test)
gt <- extract.gt(vcfR_test)
hets <- is.het(gt)


# }

Run the code above in your browser using DataLab