methylDiffDB-class: An S4 class that holds differential methylation information...

methylDiffDB-classR Documentation

An S4 class that holds differential methylation information as flat file database

Description

This class is designed to hold statistics and locations for differentially methylated regions/bases as flat file database. calculateDiffMeth function returns an object with methylDiffDB class.

Slots

dbpath:

path to flat file database(s)

num.records:

number of records (lines) in the object

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

dbtype:

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

Details

methylDiffDB class has the same functionality as methylDiff 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 methylDiffDB. 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

methylDiffDB object can be coerced to: GRanges object via as function. methylDiff 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

data(methylKit)

methylDiffDB.obj <- calculateDiffMeth(methylBase.obj,save.db=TRUE,dbdir="methylDB")

library(GenomicRanges)
my.gr=as(methylDiffDB.obj,"GRanges")

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


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