methylDiff-class: An S4 class that holds differential methylation information

Description Slots Details Subsetting Coercion Accessors Examples

Description

This class is designed to hold statistics and locations for differentially methylated regions/bases. It extends data.frame class. calculateDiffMeth function returns an object with methylDiff class.

Slots

sample.ids

ids/names of samples in a vector

assembly

a name of genome assembly, such as :hg18,mm9, etc

context

numeric vector identifying which samples are which group

treatment

numeric vector identifying which samples are which group

destranded

logical denoting if methylation inormation is destranded or not

resolution

string either 'base' or 'region' defining the resolution of methylation information

.Data

data.frame holding the locations and statistics

Details

methylDiff class extends data.frame class therefore providing novice and experienced R users with a data structure that is well known and ubiquitous in many R packages.

Subsetting

In the following code snippets, x is a methylDiff object. Subsetting by x[i,] will produce a new object if subsetting is done on rows. Column subsetting is not directly allowed to prevent errors in the downstream analysis. see ?methylKit[ .

Coercion

methylDiff object can be coerced to GRanges object via as function.

Accessors

The following functions provides access to data slots of methylDiffDB: - getData: get the data slot from the methylKit objects, - getAssembly: get assembly of the genome, - getContext: get the context of methylation

Examples

1
2
3
data(methylKit)
library(GenomicRanges)
my.gr=as(methylDiff.obj,"GRanges")

methylKit documentation built on Jan. 30, 2021, 2 a.m.