-
Notifications
You must be signed in to change notification settings - Fork 101
Description
Most calculations take some time and resources.
Usually, I resort to caching using writeRDS. But caching S4 seems to be a bit difficult and they need to implement the writeRDS S4 method.
methylKit support reading directly from tabix files which is great, the reading is very quick with random access instead of all in memory.
This makes an ideal caching tool.
There is only one problem. the tabix files have pre-specified name, sometimes random name, sometimes with additional random prefix that cannot be removed. They don't follow the pattern in the manual and thus are hard to predict.
This makes it hard to follow the following pattern of saving calculations:
if(file.exists(path){
return(readMethylDB(path))
} else {
# expensive operation
}
Having some dbpath which would override whatever logic from dbdir and preffix would be quite helpful.