An S4 class for storing raw methylation data as flat file database.
This object stores the raw mehylation data that is read in through read function as flat file database.The raw methylation data is basically percent methylation values and read coverage values per genomic base/region.
path to flat file database
number of records (lines) in the object
string for an identifier of the sample
string for genome assembly, ex: hg18,hg19,mm9
methylation context string, ex: CpG,CpH,CHH, etc.
resolution of methylation information, 'base' or 'region'
string for type of the flat file database, ex: tabix
methylRawDB is created via
read function and has the
same functionality as
but the data is saved in a flat database file and therefore allocates less
space in memory.
In the following code snippets,
x is a
x[i,] will produce a new
methylRaw object if
subsetting is done on
rows. Column subsetting is not directly allowed to prevent errors in the
downstream analysis. see ?methylKit[ .
x will return the
methylRawDB object as new
The following functions provides access to data slots of methylRawDB:
methylRawDB object can be coerced to:
GRanges object via
methylRaw object via
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
# example of a raw methylation data contained as a text file read.table(system.file("extdata", "control1.myCpG.txt", package = "methylKit"), header=TRUE,nrows=5) methylRawDB.obj <- methRead( system.file("extdata", "control1.myCpG.txt", package = "methylKit"), sample.id = "ctrl1", assembly = "hg18", dbtype = "tabix", dbdir = "methylDB") # example of a methylRawDB object methylRawDB.obj str(methylRawDB.obj) library(GenomicRanges) #coercing methylRawDB object to GRanges object my.gr=as(methylRawDB.obj,"GRanges") #coercing methylRawDB object to methylRaw object myRaw=as(methylRawDB.obj,"methylRaw") # remove Database again rm(methylRawDB.obj) unlink("methylDB",recursive=TRUE)