methylBase-class {methylKit} | R Documentation

## 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.

### 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 `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 methylDiffDB: - `getData`: get the data slot from the methylKit objects, - `getAssembly`: get assembly of the genome, - `getContext`: get the context of methylation

### Coercion

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

### Examples

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

[Package methylKit version 1.20.0 Index]