This is a test version of Biostars. For the public version, visit https://www.biostars.org.
why do i get this gnu parallel warning (Trimmomatic/Bowtie2)

I am trying to use Trimmomatic and Bowtie2 on a sample (metagenomic) to do some quality filtering and contaminant screening, the sample has been stitched. when I try to run the parallel command on my stitched read I receive this funny warning:

Input is read from the terminal. You either know what you are doing (in which case: YOU ARE AWESOME!) or you forgot ::: or :::: or to pipe data into parallel. If so consider going through the tutorial: man parallel_tutorial. Press CTRL+D to exit

Here is what I am working with:

parallel -j 1 --link 'kneaddata -i {} -o kneaddata_out/ -db /home/shared/bowtiedb/GRCh38_PhiX --trimmomatic /usr/local/prg/Trimmomatic-0.36/ -t 4 --trimmomatic-options "SLIDINGWINDOW:4:20 MINLEN:50" \ --bowtie2-options "--very-sensitive --dovetail" --remove-intermediate-output' \ ::: stitched_reads/*.assembled.fastq

Is this normal? is there anything I am doing wrong or is it still working and just showing this warning message? I am new to bioinformatics and using a script to help me run the analysis, I did not make this code myself and have no experience using GNU parallel.

bowtie2 trimmomatic gnu metagenomics parallel

what is link doing here? and probably, due to escaping input \ ::: there is an error, if I understand correct. It would to understand better, if you could post more details.

Try following and check the output:

$ parallel --dry-run  -j 1 'kneaddata -i {} -o kneaddata_out -db /home/shared/bowtiedb/GRCh38_PhiX --trimmomatic /usr/local/prg/Trimmomatic-0.36 -t 4 --trimmomatic-options "SLIDINGWINDOW:4:20 MINLEN:50"  --bowtie2-options "--very-sensitive --dovetail" --remove-intermediate-output'  ::: stitched_reads/*.assembled.fastq

If every thing looks okay from dummy run, remove '--dry-run'. Check your thread options as well. You are giving 1 thread to parallel and 4 threads to the program. It seems you are using multiple \ in code. Are you running in multiple lines or in a single line?

In addition to what cpad0112 said, you don't really need GNU parallel for this since -j 1 means you are only using one process.

find stiched_reads -name "*.assembled.fastq" -exec kneaddata -i {} -o kneaddata_out -db /home/shared/bowtiedb/GRCh38_PhiX --trimmomatic /usr/local/prg/Trimmomatic-0.36 -t 4 --trimmomatic-options "SLIDINGWINDOW:4:20 MINLEN:50"  --bowtie2-options "--very-sensitive --dovetail" --remove-intermediate-output ';'

1 answer

You are using the \ incorrectly and that generates an incorrect invocation for the command.

Example:

parallel echo {} ::: A B C

prints:

A
B
C

if I write:

parallel echo {} \ ::: A B C

then it prints:

parallel: Warning: Input is read from the terminal. You are either an expert
parallel: Warning: (in which case: YOU ARE AWESOME!) or maybe you forgot
parallel: Warning: ::: or :::: or -a or to pipe data into parallel. If so
parallel: Warning: consider going through the tutorial: man parallel_tutorial
parallel: Warning: Press CTRL-D to exit.

In the latter case, the continuation character makes the command look like the colons are part of the command.

parallel echo {}::: A B C

It needs a space to separate the colons from the command.

Almost correct. parallel echo {} \ ::: A B C is the same as parallel echo {} ' :::' A B C, and it is just as bad - just ever so slightly different.

Interesting, indeed not quite the same. Though I admit I find it quite hard to explain why this works (two spaces on each side of \):

parallel echo {}  \  ::: A B C

but this does not (one space on each side of the \)

parallel echo {}  \ ::: A B C

I thought I grokked Unix :-(

parallel echo {}  \  ::: A B C

is the same as:

parallel echo {}  ' ' ::: A B C

Log in to answer this question.