extract.gt(x, element = "GT", mask = FALSE, as.numeric = FALSE,
return.alleles = FALSE, allele.sep = "/", extract = TRUE)extract.haps(x, mask = FALSE, gt.split = "|", verbose = TRUE)
extract.indels(x, return.indels = FALSE)
extract.info(x, element, as.numeric = FALSE, mask = FALSE)
Note that when 'as.numeric' is set to 'TRUE' but the data are not actually numeric, unexpected results will likely occur.
The function extract.haps uses extract.gt to isolate genotypes. It then uses the information in the REF and ALT columns as well as an allele delimiter (gt_split) to split genotypes into their allelic state. Ploidy is determined by the first non-NA genotype in the first sample.
The function extract.indels is used to remove indels from SNPs. The function queries the 'REF' and 'ALT' columns of the 'fix' slot to see if any alleles are greater than one character in length. When the parameter return_indels is FALSE only SNPs will be returned. When the parameter return_indels is TRUE only indels will be returned.
The function extract.info is used to isolate elements from the INFO column of vcf data.
is.polymorphic