dzhang32 / dasper

Detecting Aberrant Splicing Events from RNA-sequencing data
https://dzhang32.github.io/dasper/
15 stars 3 forks source link

[BUG] megadepth fails with paths containing spaces #7

Open AlexBlais74 opened 1 year ago

AlexBlais74 commented 1 year ago

Hello Thanks for developing dasper. I have an issue with coverage_norm function, where it fails with megadepth. Essentially, the quotes around the path of the input bigwig file are stripped, so space characters in that path are now interpreted as breaks in the command, and it fails.

Although I submit my list of bigwig files using properly formed paths (with quotes), these quotes are stripped from the megadepth command that is run.

There are a few space characters in the path. My working directory is on OneDrive with a path I cannot change. I have no issues with running other R commands at that location, as a matter of fact the said bigwig files are made with GenomicAlignemnts::coverage and saved there with rtracklayer::export.bw.

I should also mention that I took the megadepth command echoed in the error message, I added the quotes that had been stripped, and I ran that in a command prompt window and it ran fine, yielding a temp file with name ending in _coverage.annotation.tsv

So my questions are: -what would be the fix to avoid the stripping of the quotes? Where is the line of code that forms this command? -I don't mind issuing the megadepth commands separately, but how would I go about picking up from there afterwards?

Thanks in advance for your help.

Alex

AlexBlais74 commented 1 year ago

Just to add: I noticed that the code has the option to use rtracklayer as an alternative to megadepth to handle the bigWig files, but I saw no place in the main functions to specify method = "rt" I created my own modified function with "rt" but it takes forever to run. I saw no mention of it in the reference manual.

I have a temporary, though a bit annoying, fix, to enclose my paths in single and double quotes:

ctrl_bw <- c('"path_to   file 3.bw"', '"path   to file 4.bw"')

case_bw <- c('"path_to   file 1.bw"', '"path   to file 2.bw"')

coverage <- coverage_norm(  junctions_scored,
                        my_tx_db,
                        coverage_paths_control = ctrl_bw ,
                        coverage_paths_case = case_bw )

and this ran without error. I just would like to be able to generate these character vectors programmatically, for the sake of efficiency. Alex