Learn R Programming

methylKit (version 0.99.2)

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

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.

Arguments

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'

Subsetting

In the following code snippets, x is a methylBase. 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 methylBase: getData,getAssembly, getContext

Coercion

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

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.

Examples

Run this code
# NOT RUN {
data(methylKit)
library(GenomicRanges)
my.gr=as(methylBase.obj,"GRanges")

# }

Run the code above in your browser using DataLab