VariantInfo-class: Class 'VariantInfo'

Description Details Constructors Accessors Methods Author(s) References See Also Examples

Description

S4 class for storing information about variants

Details

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!

Constructors

variantInfo

signature(x="missing"): creates an empty VariantInfo object

variantInfo

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.

Accessors

MAF

signature(object="VariantInfo"): returns a numeric vector with the minor allele frequencies (MAFs).

Methods

summary

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.

Author(s)

Ulrich Bodenhofer bodenhofer@bioinf.jku.at

References

http://www.bioinf.jku.at/software/podkat

See Also

GRanges, readVariantInfo, genotypeMatrix, readGenotypeMatrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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))

podkat documentation built on Nov. 8, 2020, 6:55 p.m.