FelixKrueger / TrimGalore

A wrapper around Cutadapt and FastQC to consistently apply adapter and quality trimming to FastQ files, with extra functionality for RRBS data
GNU General Public License v3.0
462 stars 150 forks source link

FastQC args error with GNU parallel #2

Closed biobenkj closed 7 years ago

biobenkj commented 7 years ago

Hi Felix,

For reasons I can't quite figure out, when I run TrimGalore! with GNU parallel it will give me an inappropriate number of input files error when I include the --fastqc_args option specifying an alternate output directory location.

I have 28 file pairs and have made sure that they do indeed pair correctly. If I remove the --fastqc_args option, it will operate normally.

Here is the command:

parallel trim_galore --illumina --paired --fastqc --fastqc_args "-o /path/to/my/folder" {} {=s/_1/_2/=} ::: *_1.fastq.gz

Thanks for your time!

FelixKrueger commented 7 years ago

Hi Ben,

I have to admit that I don't know an answer to why it doesn't work but I am guessing that it somehow has to do with the pattern recognition of GNU parallel (which I am not at all familiar with). Taken on its own, the command: trim_galore --illumina --paired --fastqc --fastqc_args "-o /path/to/my/folder" seems to work as intended in my hands.

I just realised that the original message I got from Github showed this command:

parallel trim_galore --illumina --paired --fastqc --fastqc_args "/path/to/my/folder" {} {=s/_1/_2/=} ::: *_1.fastq.gz

In this command, the -o was missing, so maybe that was the reason? Or does the folder name contain a pattern match as well?

biobenkj commented 7 years ago

Hi Felix,

Thanks for your reply! It may very well be based on parallel's way of handling things. The original command that I attached was edited because I forgot the -o option before the path. Interestingly, it does work fine in the absence of the -o (just gave it a shot - though FastQC will break since it goes to look for a folder that doesn't contain any files to run on). I keep trying to think of why it is doing this, but can't come up with anything reasonable. Feel free to close the issue and can edit if I come to any sort of conclusion. Thanks!

FelixKrueger commented 7 years ago

That sounds like a plan, maybe a GNU parallel developer would like to chip in? Cheers, Felix