Needing help for Trimmomatic v0.36 in triming adapters: Exception in thread "main" java.lang.Runtime

1,298 views
Skip to first unread message

顾龙江

unread,
Sep 11, 2016, 9:18:03 PM9/11/16
to trinityrnaseq-users
Hello, everyone:

I am newcomer to Chip-seq analysis. Recently, I downloaded several sra files from SRA database (See appended file SRR548156.test.fastq), after processed with fastq-dump software, I applied Trimmomatic v0.36 to trim adapters using following command lines:

find -L /results/gulj/Data/head/SRR -name "*.fastq" | \
    sed 's/\.fastq//g' | xargs -n 1 -P 1 -I PREFIX sh -c '
    echo PREFIX                    ## /results/gulj/Data/head/SRR/SRR548157
    name=`dirname PREFIX`          ## /results/gulj/Data/head/SRR
    sample=`basename PREFIX`       ## SRR548157

    java -jar /results/gulj/biosoft/Trimmomatic-0.36/trimmomatic-0.36.jar SE \
            -threads 2 -phred33 \
            PREFIX.fastq PREFIX.trimmed.fastq \
            ILLUMINACLIP:/results/gulj/biosoft/Trimmomatic-0.36/adapters/TruSeq2-SE.fa:2:30:10 \
            LEADING:3 \
            TRAILING:3 \
            SLIDINGWINDOW:4:15 \
            MINLEN:36 \
            TOPHRED64
'

But i got errors like below:

/results/gulj/Data/head/SRR/SRR548157
TrimmomaticSE: Started with arguments:
 -threads 2 -phred33 /results/gulj/Data/head/SRR/SRR548157.fastq /results/gulj/Data/head/SRR/SRR548157.trimmed.fastq ILLUMINACLIP:/results/gulj/biosoft/Trimmomatic-0.36/adapters/TruSeq2-SE.fa:2:30:10
Using Long Clipping Sequence: 'AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAG'
Using Long Clipping Sequence: 'AGATCGGAAGAGCTCGTATGCCGTCTTCTGCTTG'
Using Long Clipping Sequence: 'AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT'
ILLUMINACLIP: Using 0 prefix pairs, 3 forward/reverse sequences, 0 forward only sequences, 0 reverse only sequences
Exception in thread "main" java.lang.RuntimeException: Unknown trimmer:
        at org.usadellab.trimmomatic.trim.TrimmerFactory.makeTrimmer(TrimmerFactory.java:70)
        at org.usadellab.trimmomatic.Trimmomatic.createTrimmers(Trimmomatic.java:59)
        at org.usadellab.trimmomatic.TrimmomaticSE.run(TrimmomaticSE.java:303)
        at org.usadellab.trimmomatic.Trimmomatic.main(Trimmomatic.java:85)
sh: LEADING:3: not found

Could anyone give some suggestions about this error? many thanks!

I have two additional questions:
1. How to determine if it is needed to trim adapters for reads downloaded from SRA database?
2. How to determine MINLEN parameter in trimmomatic v0.36, when read length varies with sequencing plantforms.

Many thanks, ^_^
Longjiang Gu

SRR548156.test.fastq

Mark Chapman

unread,
Sep 12, 2016, 3:33:26 AM9/12/16
to 顾龙江, trinityrnaseq-users
Hi Longjiang,
Have you tried specifying filenames instead of just 'PREFIX'? This might be a simple fix. Otherwise this is probably a Q for the trimmomatic people not the trinity people

In answer to your Qs:
1. I would presume there's adapter contamination in anything you download from SRA and run trimmomatic just in case. It;s a minor step and can be very important.
2. You would have to either use a value that makes sense for the shortest reads or run each file separately. I don't think you need to do it separately though. I suppose if you have 30b reads in one file and 300b reads in another then maybe think about this. But you use 36 above and this seems sensible for all read lengths.

Cheers, Mark

--
You received this message because you are subscribed to the Google Groups "trinityrnaseq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trinityrnaseq-users+unsub...@googlegroups.com.
To post to this group, send email to trinityrnaseq-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trinityrnaseq-users.
For more options, visit https://groups.google.com/d/optout.



--
Dr. Mark A. Chapman
+44 (0)2380 594396
------------------------------------
Centre for Biological Sciences
University of Southampton
Life Sciences Building 85
Highfield Campus
Southampton
SO17 1BJ

顾龙江

unread,
Sep 12, 2016, 3:53:56 AM9/12/16
to trinityrnaseq-users, longj...@gmail.com
Hi Mark,

I followed your advice and specified filenames instead of using 'PREFIX', and it worked. Many thanks for your instant help!
Could you please explained more about the MINLEN parameter? I will run each sra files seperately, however,  I am still confused about how to determine MINLEN for each sra file, because different sra files might have different read length.

Thanks again for your help.
Longjiang Gu


在 2016年9月12日星期一 UTC+8下午3:33:26,Mark Chapman写道:
To post to this group, send email to trinityrn...@googlegroups.com.

Mark Chapman

unread,
Sep 12, 2016, 6:51:00 AM9/12/16
to 顾龙江, trinityrnaseq-users
Hi Longjiang,
There's no correct answer to this, you just pick something logical. 36 is often used but you can go higher if the reads are very good quality and longer. But you dont need to pick an 'optimal' value. Just whatever is sensible. 
Cheers, Mark

To unsubscribe from this group and stop receiving emails from it, send an email to trinityrnaseq-users+unsubscribe...@googlegroups.com.
To post to this group, send email to trinityrn...@googlegroups.com.
Visit this group at https://groups.google.com/group/trinityrnaseq-users.
For more options, visit https://groups.google.com/d/optout.



--
Dr. Mark A. Chapman
------------------------------------
Centre for Biological Sciences
University of Southampton
Life Sciences Building 85
Highfield Campus
Southampton
SO17 1BJ

--
You received this message because you are subscribed to the Google Groups "trinityrnaseq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trinityrnaseq-users+unsub...@googlegroups.com.
To post to this group, send email to trinityrnaseq-users@googlegroups.com.

顾龙江

unread,
Sep 12, 2016, 8:52:28 AM9/12/16
to trinityrnaseq-users, longj...@gmail.com
Hi Mark,
thank you very much for your suggestion!
longjiang

在 2016年9月12日星期一 UTC+8下午6:51:00,Mark Chapman写道:
To unsubscribe from this group and stop receiving emails from it, send an email to trinityrnaseq-users+unsub...@googlegroups.com.
To post to this group, send email to trinityrn...@googlegroups.com.
Visit this group at https://groups.google.com/group/trinityrnaseq-users.
For more options, visit https://groups.google.com/d/optout.



--
Dr. Mark A. Chapman
------------------------------------
Centre for Biological Sciences
University of Southampton
Life Sciences Building 85
Highfield Campus
Southampton
SO17 1BJ

--
You received this message because you are subscribed to the Google Groups "trinityrnaseq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trinityrnaseq-users+unsub...@googlegroups.com.
To post to this group, send email to trinityrn...@googlegroups.com.
Visit this group at https://groups.google.com/group/trinityrnaseq-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages