methylBase-class: An S4 class for methylation events sampled in multiple...

Description Slots Details Subsetting Accessors Coercion Examples

Description

This class is designed to contain methylation information such as coverage, number of methylated bases, etc.. The methylation events contained in the class must be sampled in multiple experiments (ex: only CpG bases covered in multiple experiments are stored in the object of this class). The class extends data.frame and creates an object that holds methylation information and genomic location. The object belonging to this class is produced by unite function.

Slots

sample.ids:

character vector for ids of samples in the object

assembly:

name of the genome assembly

context:

context of methylation. Ex: CpG,CpH,CHH, etc

treatment:

treatment vector denoting which samples are test and control

coverage.index:

vector denoting which columns in the data correspons to coverage values

numCs.index:

vector denoting which columns in the data correspons to number of methylatedCs values

numTs.index:

vector denoting which columns in the data correspons to number of unmethylated Cs values

destranded:

logical value. If TRUE object is destranded, if FALSE it is not.

resolution:

resolution of methylation information, allowed values: 'base' or 'region'

Details

methylBase 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. 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[ .

Accessors

The following functions provides access to data slots of methylDiff: getData,getAssembly, getContext

Coercion

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

Examples

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

fortunatobianconi/methylkit documentation built on May 16, 2019, 1:51 p.m.