methylBaseDB-class: An S4 class for storing methylation events sampled in...

methylBaseDB-classR Documentation

An S4 class for storing methylation events sampled in multiple experiments as flat file database

Description

This class is designed to contain methylation information such as coverage, number of methylated bases, etc... The class creates an object that holds methylation information and genomic location as flat file database. The object belonging to this class is produced by unite function.

Slots

dbpath:

path to flat file database(s)

num.records:

number of records (lines) in the object

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 correspond to coverage values

numCs.index:

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

numTs.index:

vector denoting which columns in the data correspond 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'

dbtype:

string for type of the flat file database, ex: tabix

Details

methylBaseDB class has the same functionality as methylBase class, but the data is saved in a flat database file and therefore allocates less space in memory.

Subsetting

In the following code snippets, x is a methylBaseDB. Subsetting by x[i,] will produce a new methylBase 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

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

Examples

data(methylKit)
methylBaseDB.obj <- unite(methylRawList.obj,save.db=TRUE,dbdir="methylDB")
library(GenomicRanges)
my.gr=as(methylBaseDB.obj,"GRanges")


# remove Database again
rm(methylBaseDB.obj)
unlink("methylDB",recursive=TRUE)



al2na/methylKit documentation built on Nov. 30, 2024, 5:44 p.m.