autodetectGenotypes-methods | R Documentation |
This method attempts to auto-detect genotypes (i.e.
homozygote reference, heterozygote, and homozygote alternate)
in a VCF
object, and sets or creates a TVTBparam
object accordingly, in the metadata
slot.
## S4 method for signature 'VCF'
autodetectGenotypes(vcf)
vcf |
|
VCF
object including a new or updated TVTBparam
object
in metadata(vcf)[["TVTBparam"]]
.
A warning
message is issued if genotypes cannot be fully defined.
Kevin Rue-Albrecht
# Example data ----
# VCF file
vcfFile <- system.file("extdata", "moderate.vcf", package = "TVTB")
# TVTB parameters
tparam <- TVTBparam()
# Pre-process variants
vcf <- VariantAnnotation::readVcf(vcfFile, param = tparam) # warning expected
vcf <- VariantAnnotation::expand(vcf, row.names = TRUE)
# Example usage ----
vcf <- autodetectGenotypes(vcf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.