reload-RnBDiffMeth-methods: reload-methods

Description Usage Arguments Value Author(s) Examples

Description

reload disk dumped tables. Useful if the table files are manually copied or if the object is loaded again.

Usage

1
2
3
4
5
6
## S4 method for signature 'RnBDiffMeth'
reload(
  object,
  save.file,
  disk.path = tempfile(pattern = "diffmeth_", tmpdir = getOption("fftempdir"))
)

Arguments

object

RnBDiffMeth object

save.file

location of the ff data saved to disk (i.e. save in save.RData and save.ffData)

disk.path

path on the disk for DMTs. can be new or be the same as in the original object

Value

the updated RnBDiffMeth object

Author(s)

Fabian Mueller

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(RnBeads.hg19)
data(small.example.object)
logger.start(fname=NA)
#compute differential methylation
pcols <- c("Sample_Group","Treatment")
tdir <- tempfile(pattern="working")
dm <- rnb.execute.computeDiffMeth(rnb.set.example,pcols,disk.dump=TRUE,disk.dump.dir=tdir)
#get temporary file names
fn.save.tabs <- tempfile(pattern="saveTables")
fn.save.obj  <- tempfile(pattern="saveObject")
#save the object and the tables to disk
save(dm,file=fn.save.obj)
save.tables(dm,fn.save.tabs)
#delete the object from the workspace
destroy(dm)
rm(dm)
#reload the object and tables
load(fn.save.obj)
dm.new <- reload(dm,fn.save.tabs)

RnBeads documentation built on March 3, 2021, 2 a.m.