MethInfo-class: MethInfo objects

Description Details Constructor Accessor methods Combining MethInfo objects Author(s) Examples

Description

A MethInfo object is an object that contains basic information about a set of methylation loci. Currently the only attributes are the type or context of the methylation loci, but more attributes might be added in the future as the need arises.

Details

Typically MethInfo objects are not used directly but are part of higher level objects. Those higher level objects will generally provide a methinfo accessor for getting/setting their MethInfo component.

Constructor

MethInfo(methtype): Creates a MethInfo object.

Accessor methods

In the code snippets below, x is a MethInfo object.

methtype(x), methtype(x) <- value: Get/set the methylation type of x. value must be a character vector: "CG" (i.e., CpG), "CHG", "CHH", "CNN" or some combination of these, e.g., c("CG", "CHG") (NA_character_ is also allowed, but not recommended).

Combining MethInfo objects

There is no c method for MethInfo objects. Rather, a merge method is provided.

In the code snippet below, x and y are MethInfo objects.

merge(x, y): Merge x and y into a single MethInfo object where the methylation type is the union of methtype(x) and methtype(y). If the methtype of any object is missing (NA_character_) then the merged methtype is also missing (NA_character).

Author(s)

Peter Hickey

Examples

1
2
3
4
5
x <- MethInfo("CG")
y <- MethInfo(c("CHG", "CG"))
y # NB: Pretty-prints methylation type as "CG/CHG"
methtype(y) # NB: Returns the methylation type as a character vector
merge(x, y)

PeteHaitch/MethylationTuples documentation built on May 8, 2019, 1:30 a.m.