VariantInfo-class | R Documentation |
VariantInfo
S4 class for storing information about variants
This class extends the class GRanges
without
adding any extra slots. The main difference is that VariantInfo
objects always have a metadata column “MAF” that contains
minor allele frequencies (MAFs). A special
summary
method allows for computing statistics about
MAFs and types of variants.
Objects of this class should only be created and manipulated by the constructors and accessors described below, as only these methods ensure the integrity of the created objects. Direct modification of object slots is strongly discouraged!
signature(x="missing")
:
creates an empty VariantInfo
object
signature(x="GRanges")
:
coerces a GRanges
object to class
VariantInfo
by adding a “MAF” metadata column that
is initialized with NA
values.
Furthermore, see the help page of readVariantInfo
.
signature(object="VariantInfo")
:
returns a numeric vector with the minor allele frequencies (MAFs).
signature(object="VariantInfo")
:
returns a string with the number of variants and metadata columns
(if any); if the optional argument details
is set to
TRUE
, this method computes and prints a summary about the
MAFs and variant types (if available); this variant returns a
list with summarized values.
All other methods, including sub-setting, are inherited from the
GRanges
class.
Ulrich Bodenhofer
https://github.com/UBod/podkat
GRanges
, readVariantInfo
,
genotypeMatrix
, readGenotypeMatrix
vcfFile <- system.file("examples/example1.vcf.gz", package="podkat")
## read variant info directly from VCF file
vInfo <- readVariantInfo(vcfFile, omitZeroMAF=FALSE)
vInfo
summary(vInfo)
## read full genotype from VCF file
geno <- readGenotypeMatrix(vcfFile)
## display summary of variant info stored in genotype matrix
summary(variantInfo(geno))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.