Learn R Programming

methylKit (version 0.99.2)

methylDiffDB-class: 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.

Arguments

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

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

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.

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab