Trimmomatic unknown trimmer
1
0
Entering edit mode
3.2 years ago
Xiaoyun ▴ 10

Hi all,

I am really struggling with Trimmomatic these days and getting confused. I'm trying to run trimmomatic:

java -jar trimmomatic-0.39.jar PE -threads 2 -phred33 \ ly1_1.fq ly1_2.fq \ ly1_paired_1.trimmed.fq ly1_unpaired_1.trimmed.fq ly1_paired_2.trimmed.fq ly1_unpaired_2.trimmed.fq HEADCROP:9

This is my error:

        TrimmomaticPE: Started with arguments:`
-threads 2 -phred64  ly1_1.fq ly1_2.fq  ly1_paired_1.trimmed.fq ly1_unpaired_1.trimmed.fq ly1_paired_2.trimmed.fq ly1_unpaired_2.trimmed.fq HEADCROP:9
Exception in thread "main" java.io.FileNotFoundException:  ly1_1.fq (No such file or directory)`
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at org.usadellab.trimmomatic.fastq.FastqParser.parse(FastqParser.java:135)
        at org.usadellab.trimmomatic.TrimmomaticPE.process(TrimmomaticPE.java:265)
        at org.usadellab.trimmomatic.TrimmomaticPE.run(TrimmomaticPE.java:555)
        at org.usadellab.trimmomatic.Trimmomatic.main(Trimmomatic.java:80)

Any help would be appreciated.

Trimmomatic • 3.3k views
ADD COMMENT
1
Entering edit mode
3.2 years ago

The error is that trimmomatic cannot find your input file.

see the last part of the second line of the error message:

  ly1_1.fq (No such file or directory)`
ADD COMMENT
0
Entering edit mode

Thank you so much!

ADD REPLY
0
Entering edit mode

But it exactly exists in my mobile HDD.

ADD REPLY
0
Entering edit mode

Are the reads files located within your working directory? Try providing the full paths to the reads files.

ADD REPLY
0
Entering edit mode

I have fixed that. But when I input the command:

[root@localhost TOSHIBA EXT]# java -jar /home/yun/Downloads/Trimmomatic-0.39/trimmomatic-0.39.jar PE -threads 2 -phred33 ly1_1.fq ly1_2.fq \ly1_paired_1.trim.fq.gz ly1_unpaired_1.trim.fq.gz ly1_paired_2.trim.fq.gz ly1_unpaired_2.trim.fq,gz \ HEADCROP:9 

This is another error:

 TrimmomaticPE: Started with arguments:
 -threads 2 -phred33 ly1_1.fq ly1_2.fq ly1_paired_1.trim.fq.gz ly1_unpaired_1.trim.fq.gz ly1_paired_2.trim.fq.gz ly1_unpaired_2.trim.fq,gz  HEADCROP:9
Exception in thread "main" java.lang.RuntimeException: Unknown trimmer:  HEADCROP
    at org.usadellab.trimmomatic.trim.TrimmerFactory.makeTrimmer(TrimmerFactory.java:73)
    at org.usadellab.trimmomatic.Trimmomatic.createTrimmers(Trimmomatic.java:59)
    at org.usadellab.trimmomatic.TrimmomaticPE.run(TrimmomaticPE.java:552)
    at org.usadellab.trimmomatic.Trimmomatic.main(Trimmomatic.java:80)
ADD REPLY
0
Entering edit mode

Not sure what your issue is then. I installed trimmomatic via conda and ran the following, which worked:

trimmomatic PE in.R1.fq.gz  in.R2.fq.gz  out.paired.R1.fq.gz out.unpaired.R1.fq.gz out.paired.R2.fq.gz out.unpaired.R2.fq.gz HEADCROP:9

I also tried a simplified version, which worked:

trimmomatic PE in.R1.fq.gz  in.R2.fq.gz  -baseout sampleFiltered.fq.gz HEADCROP:9
ADD REPLY
0
Entering edit mode

Thanks a lot! I think I have done it well.

java -jar /home/yun/Downloads/Trimmomatic-0.39/trimmomatic-0.39.jar PE ly1_1.fq ly1_2.fq -baseout sampleFiltered.fq.gz HEADCROP:9

I think maybe there is something wrong in output file name.

ADD REPLY
0
Entering edit mode

I'm wondering if it is anything to do with the \ charactors you have in there. That is I wonder if my using \ you are forcing it to include the following space in the name of the trimmer. So it is looking for " HEADCROP" rather than "HEADCROP"

ADD REPLY

Login before adding your answer.

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