vcfR (version 1.8.0)

query.gt: Query the gt slot

Description

Query the 'gt' slot of objects of class vcfR

Usage

is.polymorphic(x, na.omit = FALSE)

is.biallelic(x)

Arguments

x

an object of class vcfR

na.omit

logical to omit missing data

Details

The function is_polymorphic returns a vector of logicals indicating whether a variant is polymorphic. Only variable sites are reported in vcf files. However, once someone manipulates a vcfR object, a site may become invariant. For example, if a sample is removed it may result in a site becoming invariant. This function queries the sites in a vcfR object and returns a vector of logicals (TRUE/FALSE) to indicate if they are actually variable.

The function is_bialleleic returns a vector of logicals indicating whether a variant is biallelic. Some analyses or downstream analyses only work with biallelic loci. This function can help manage this.

See Also

extract.gt