MikkelSchubert / paleomix

Pipelines and tools for the processing of ancient and modern HTS data.
https://paleomix.readthedocs.io/en/stable/
MIT License
43 stars 19 forks source link

Passing path to reference sequence containing spaces #1

Closed simonohanlon101 closed 10 years ago

simonohanlon101 commented 10 years ago

Looks like at present you cannot pass a path to the reference sequence which contains spaces when using Bowtie2. The path is split on the string and subsequent parts of the path are treated as extra arguments.

I have tried many combinations of escaping and none work e.g.

Path: "/DATA/Reference\ genome/myref.fasta"
Path: "/DATA/Reference\\ genome/myref.fasta"
Path: "/DATA/Reference' 'genome/myref.fasta"
Path: /DATA/Reference\\ genome/myref.fasta

Is there a way to include a space in the path to the reference sequence?

MikkelSchubert commented 10 years ago

Thanks for the report. The problem is that the bowtie2 wrapper script unpacks the arguments before calling bowtie2-align, which means that while the pipeline passes "/DATA/Reference genome/myref.fasta" as a single argument, the bowtie2 wrapper script passes that to bowtie2-align as "/DATA/Reference" and "genome/myref.fasta". You can somewhat work around this by adding extra quotes to the path, but that will break other parts of the wrapper script which will then include these extra quotes when manipulating the path.

Because of that, I would suggest that you create a symbolic link to the "/DATA/Reference genome" folder (calling it something that does not include a space), place it in your project folder, and use that in the makefile. Other than that, the best I can do is to have the pipeline script warn about this problem when using Bowtie2.

Cheers, Mikkel

simonohanlon101 commented 10 years ago

Hi Mikkel, Thanks, I think that sounds like a great and sensible work around. Better not to break other parts of the pipeline!