VariantInfo-class {podkat} | R Documentation

## Class `VariantInfo`

### 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

    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))

[Package podkat version 1.18.0 Index]