Trimmomatic 0.36 not acknowledging commands in MacOS terminal in SE mode
Entering edit mode
3.1 years ago
msimmer92 ▴ 270

I have a problem with Trimmomatic 0.36 that can't be solved with all the suggestions that I have found so far, since they are for PE mode (such as Trimmomatic not acknowleding commands over Linux cluster, and here they don't fix the problem). So I am posting a separate question for the single end (SE) mode situation.

Problem: I want to remove the first 5 bases of every read (HEADCROP:5) in my fastq file (filename: Preprocessed_110.fastq.gz) using Trimmomatic. For which I run the following code:

touch trimlog110.txt

trimmomatic SE -trimlog trimlog110.txt Preprocessed_110.fastq.gz 
trimmed_110.fq HEADCROP:5
       PE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog 
<trimLogFile>] [-quiet] [-validatePairs] [-basein <inputBase> | 
<inputFile1> <inputFile2>] [-baseout <outputBase> | <outputFile1P> 
<outputFile1U> <outputFile2P> <outputFile2U>] <trimmer1>...
       SE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog 
<trimLogFile>] [-quiet] <inputFile> <outputFile> <trimmer1>...

If I check the current directory with "ls", I see the fastq.gz file is still there, no output file is generated and the log.txt file is still empty, as if the program did nothing. I tried removing the "SE", as suggested by some people with the "PE" in paired end mode, and the result is the same. I tried removing the trimlog part to keep it simple, with less commands as possible to trace down the error, and nothing changed. Does anyone identify another thing that might be causing the problem? Thank you.

Regarding the computer specifics: I installed Trimmomatic in MacOS High Sierra. I created a script in the /usr/local/bin directory that calls the .jar file and executes the program, so I could just write "trimmomatic" and not the whole java -jar+path; all this was suggested in the Biostar bioinformatics handbook:

MacBook:bin username$ touch trimmomatic
Macbook:bin username$ vi trimmomatic

    java -jar /Users/username/Trimmomatic-0.36/trimmomatic-0.36.jar

Macbook:bin username$ chmod +x trimmomatic

This worked, and if you type trimmomatic in any directory, the program runs. That is why I assume is something in the code typinc that comes afterwards that is making trouble.

RNA-Seq software error Tool • 2.1k views
Entering edit mode

Thank you very much! And thank you for taking the time to make such a nice handbook! :) It really is a game-changer.

Entering edit mode
3.1 years ago

You forgot to pass the incoming parameters to the script, note the $@ after the invocation:

java -jar ~/src/Trimmomatic-0.36/trimmomatic-0.36.jar $@

When in doubt copy paste the instructions exactly as they are in the book:

echo '#!/bin/bash' > ~/bin/trimmomatic
echo 'java -jar ~/src/Trimmomatic-0.36/trimmomatic-0.36.jar $@' >> ~/bin/trimmomatic
chmod +x ~/bin/trimmomatic

Now that being said if you installe trimmomatic with conda as the latest instructions recommend, you would not need to do this above at all. Trimmomatic would already be set up correctly.

Entering edit mode

Thank you very much! And thank you for taking the time to make such a nice handbook! :)


Login before adding your answer.

Traffic: 1367 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6