Skip to content

Fix for compressed FASTQ output names with spaces#525

Open
jeffreybarrick wants to merge 1 commit into
BenLangmead:masterfrom
barricklab:compressed-output-paths-with-spaces
Open

Fix for compressed FASTQ output names with spaces#525
jeffreybarrick wants to merge 1 commit into
BenLangmead:masterfrom
barricklab:compressed-output-paths-with-spaces

Conversation

@jeffreybarrick

Copy link
Copy Markdown

Problem: Paths with spaces work fine with options like --un and most bowtie2 input/output options, but currently they fail with --un-gz and similar options that request compressed FASTQ file output. This is blocking me from safely using these output formats in a pipeline that is otherwise compatible with paths that include spaces.

Example of a failing command:

 bowtie2 -p 12 \
   -x "output path with spaces/index with spaces" \
   -U "R1 with spaces.fastq.gz" \
   -U "R2 with spaces.fastq.gz" \
   --al-gz "output path with spaces/unpairedal with spaces.fastq.gz" \
   --un-gz "output path with spaces/unpairedun with spaces.fastq.gz" \
   -S "output path with spaces/sam with spaces.sam"

Errors from failing command:

gzip: can't stat: path (path): No such file or directory
gzip: can't stat: with (with): No such file or directory
gzip: can't stat: spaces/unpairedal (spaces/unpairedal): No such file or directory
gzip: can't stat: with (with): No such file or directory
gzip: can't stat: spaces.fastq.gz (spaces.fastq.gz): No such file or directory
gzip: can't stat: path (path): No such file or directory
gzip: can't stat: with (with): No such file or directory
gzip: can't stat: spaces/unpairedun (spaces/unpairedun): No such file or directory
gzip: can't stat: with (with): No such file or directory
gzip: can't stat: spaces.fastq.gz (spaces.fastq.gz): No such file or directory

This pull request fixes how the Perl script bowtie2 handles these filenames, adding quotes when output is piped to compression programs. I've tested that the uncompressed and compressed options work with unpaired and paired input FASTQs with the updated code.

…put of reads in compressed formats (Ex: --un-gz "path with spaces.fastq.gz")
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

Successfully merging this pull request may close these issues.

1 participant