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

Share:

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,getAssembly, getContext

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.