Issues with binarise_files()
Mr-Pepe opened this issue · 3 comments
I don't use R regularly, so I might be missing something crucial here.
When I use binarise_files, the .process_bismark_file function can't open the file that is passed to it. I guess it's because it only get's the file name, but not the absolute path to it. Adjusting my working directory to the path where the Bismark files are helps to find the files, but then it skips all files as already processed. That's plausible looking at the code of .process_bismark_file:
cell <- sub(".gz","", filename)
outfile <- sprintf("%s", cell)
if (file.exists(paste0(outfile, ".gz"))) {
cat(sprintf("Sample %s already processed, skipping...\n", cell))
Removing the .gz ending and then adding it again just checks for the input file's existence.
What am I missing in order to use the binarise_files function?
Hi,
Thanks for pointing this out. Indeed there is a bug in the code, mostly due to these functions being added at later stages for ease of use and not being properly testes. I apologise for that.
I have updated the package, where now the default setting is to provide again only the indir
and the function will create a binarise
folder within the indir
to store the binarised files.
These changes will not be available on the stable version of Bioconductor, however you can obtain the latest version of Melissa from Github:
devtools::install_github("andreaskapou/Melissa")
Hope this helps.
Best,
Andreas
Assuming this is resolved and closing issue.
Thanks a lot, I'll have a look at it.