# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab