why do i get this gnu parallel warning (Trimmomatic/Bowtie2)
1
1
Entering edit mode
3.1 years ago
jobie1 ▴ 30

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 • 2.7k views
ADD COMMENT
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

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 ';'
ADD REPLY
3
Entering edit mode
3.1 years ago

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.

ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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 :-(

ADD REPLY
0
Entering edit mode
parallel echo {}  \  ::: A B C

is the same as:

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

Login before adding your answer.

Traffic: 2290 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6