Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] megadepth fails with paths containing spaces #7

Open
AlexBlais74 opened this issue Nov 7, 2023 · 1 comment
Open

[BUG] megadepth fails with paths containing spaces #7

AlexBlais74 opened this issue Nov 7, 2023 · 1 comment

Comments

@AlexBlais74
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant