Trimmomatic 0.36 not acknowledging commands in MacOS terminal in SE mode
1
0
Entering edit mode
6.1 years ago
msimmer92 ▴ 300

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
Usage: 
       PE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog 
<trimLogFile>] [-quiet] [-validatePairs] [-basein <inputBase> | 
<inputFile1> <inputFile2>] [-baseout <outputBase> | <outputFile1P> 
<outputFile1U> <outputFile2P> <outputFile2U>] <trimmer1>...
   or: 
       SE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog 
<trimLogFile>] [-quiet] <inputFile> <outputFile> <trimmer1>...
   or: 
       -version

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

    #!/bin/bash
    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.

software-error RNA-Seq • 3.4k views
ADD COMMENT
3
Entering edit mode
6.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.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1820 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