getAnnotation: Accessing annotation for Illumina methylation objects

View source: R/IlluminaMethylationAnnotation-class.R

getAnnotationR Documentation

Accessing annotation for Illumina methylation objects

Description

These functions access provided annotation for various Illumina methylation objects.

Usage

getAnnotation(object, what = "everything", lociNames = NULL,
              orderByLocation = FALSE, dropNonMapping = FALSE)

getLocations(object, mergeManifest = FALSE,
             orderByLocation = FALSE, lociNames = NULL)

getAnnotationObject(object)

getSnpInfo(object, snpAnno = NULL)
addSnpInfo(object, snpAnno = NULL)

dropLociWithSnps(object, snps = c("CpG", "SBE"), maf = 0, snpAnno = NULL)

getProbeType(object, withColor = FALSE)

getIslandStatus(object, islandAnno = NULL)

Arguments

object

A minfi object.

what

Which annotation objects should be returned?

lociNames

Restrict the return values to these loci.

orderByLocation

Should the return object be ordered according to genomic location.

dropNonMapping

Should loci that do not have a genomic location associated with it (by being marked as unmapped or multi) be dropped from the return object.

mergeManifest

Should the manifest be merged into the return object?

snpAnno

The snp annotation you want to use; NULL signifies picking the default.

withColor

Should the return object have the type I probe color labelled?

snps

The type of SNPs used.

maf

Minor allelle fraction.

islandAnno

Like snpAnno, but for islands.

Details

getAnnotation returns requested annotation as a DataFrame, with each row corresponding to a methylation loci. If object is of class IlluminaHumanAnnotation no specific ordering of the return object is imposed. If, on the other hand, the class of object imposes some natural order on the return object (ie. if the object is of class [Genomic](Methyl|Ratio)Set), this order is kept in the return object. Note that RGChannelSet does not impose a specific ordering on the methylation loci.

getAnnotationObject returns the annotation object, as opposed to the annotation the object contains. This is useful for printing and examining the contents of the object.

getLocations is a convenience function which returns Locations as a GRanges and which furthermore drops unmapped loci. A user should not need to call this function, instead mapToGenome should be used to get genomic coordinates and granges to return those coordinates.

getSnpInfo is a conevnience function which gets a SNP DataFrame containing information on which probes contains SNPs where. addSnpInfo adds this information to the rowRanges or granges of the object. dropLociWithSnps is a convenience function for removing loci with SNPs based on their MAF.

To see which options are available for what, simply print the annotation object, possibly using getAnnotationObject.

Value

For getAnnotation, a DataFrame with the requested information.

For getAnnotationObject, a IlluminaMethylationAnnotation object.

For getLocations, a GRanges with the locations.

For getProbeType and getIslandStatus, a character vector with the requested information.

For getSnpInfo, a DataFrame with the requested information. For addSnpInfo, an object of the same class as object but with the SNP information added to the metadata columns of the granges of the object.

For dropLociWithSnps an object of the same kind as the input, possibly with fewer loci.

Author(s)

Kasper Daniel Hansenkhansen@jhsph.edu

See Also

IlluminaMethylationAnnotation for the basic class, mapToGenome for a better alternative (for users) to getLocations.

Examples

if(require(minfiData)) {
  table(getIslandStatus(MsetEx))
  getAnnotation(MsetEx, what = "Manifest")
}

hansenlab/minfi documentation built on May 3, 2024, 3:49 p.m.