Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Irina Pulyakhina
    Member
    • Sep 2010
    • 24

    Trimmomatic error while executing

    Hi everyone,

    I'm trying to run Trimmomatic v0.15. I'm working with Illumina paired end data. With this command:

    java -classpath ./trimmomatic.jar org.usadellab.trimmomatic.TrimmomaticSE initial_test_set1 out_file ILLUMINACLIP:illuminaClipping.fa:2:40:15 MINLEN:36

    (all file for sure exist in the corresponding folders)
    I get the following error:
    =========================
    Exception in thread "main" java.lang.NoClassDefFoundError: org/usadellab/trimmomatic/TrimmomaticSE
    Caused by: java.lang.ClassNotFoundException: org.usadellab.trimmomatic.TrimmomaticSE
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    Could not find the main class: org.usadellab.trimmomatic.TrimmomaticSE. Program will exit.
    =========================

    Does anyone now how to solve it?

    Thanks in advance,
    Irina
  • westerman
    Rick Westerman
    • Jun 2008
    • 1104

    #2
    Probably means that ./trimmomatic.jar does not exist.

    Comment

    • giorgifm
      Member
      • Aug 2011
      • 35

      #3
      Dear Irina,

      first of all, thanks for using Trimmomatic :-)

      Try substituting in your command line ./trimmomatic.jar with trimmomatic-0.15.jar (the jar file name) or the jar name of the version you are using.
      Last edited by giorgifm; 10-07-2011, 06:21 AM.

      Comment

      • ssing
        Member
        • Jan 2009
        • 21

        #4
        I think I found a small hiccup in Trimmomatic (easily fixed by the user, but it might be good to clarify somewhere on the website) -- when providing sequences for the adapters, the file has to be in the directory where Trimmomatic is. It would be nice if this could be flexible and the sequences could be anywhere.

        Great program and excellent documentation -- thanks!

        Comment

        • kga1978
          Senior Member
          • Nov 2010
          • 100

          #5
          Originally posted by ssing View Post
          when providing sequences for the adapters, the file has to be in the directory where Trimmomatic is.
          Not so. You can specify this with the following: ILLUMINACLIP:<path to contaminants.fasta>:X:X:X

          One small mistake I have found though is that "MINLEN" is specified as "MINLENGTH" in the documentation - the latter doesn't work.

          Comment

          • morning latte
            Member
            • Jun 2013
            • 91

            #6
            Trimmomatic error

            Hi,
            I have had no problem running Trimmomatic so far with Illumina HiSeq fastq files provided by sequencing core. However, Trimmomatic started generating output files that contain nothing. The difference from the previous run and this run is that I trimmed some of reads at their 5' ends using HOMER and I assume that HOMER output format (which still looks fastq files for me) causes a problem on Trimmomatic. I tried with -phred33 and -phred64 but nothing worked. Do you have any suggestions? Thanks.

            Comment

            • Hparker
              Member
              • Dec 2014
              • 42

              #7
              I am also having a similar problem with trimmomatic version 0.33:

              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              Exception in thread "main" java.lang.NoClassDefFoundError: org/usadellab/trimmomatic/TrimmomaticPE
              Caused by: java.lang.ClassNotFoundException: org.usadellab.trimmomatic.TrimmomaticPE
              at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
              Could not find the main class: org.usadellab.trimmomatic.TrimmomaticPE. Program will exit.
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

              Is anyone able to help?

              Many thanks.

              Comment

              • GenoMax
                Senior Member
                • Feb 2008
                • 7142

                #8
                Originally posted by Hparker View Post
                I am also having a similar problem with trimmomatic version 0.33:

                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Exception in thread "main" java.lang.NoClassDefFoundError: org/usadellab/trimmomatic/TrimmomaticPE
                Caused by: java.lang.ClassNotFoundException: org.usadellab.trimmomatic.TrimmomaticPE
                at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
                Could not find the main class: org.usadellab.trimmomatic.TrimmomaticPE. Program will exit.
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                Is anyone able to help?

                Many thanks.
                Post the complete command you are using.

                Comment

                • Hparker
                  Member
                  • Dec 2014
                  • 42

                  #9
                  command I am using:

                  $ java -Xmx2G -classpath trimmomatic-0.33.jar org.usadellab.trimmomatic.TrimmomaticPE in291_1_s1_R1.fastq.gz in291_1_s1_R2.fastq.gz in291_1_s1_R1.paired.fastq.gz in291_1_s1_R1.single.fastq.gz in291_1_s1_R2.paired.fastq.gz n291_1_s1_R2.single.fastq.gz LEADING:20 TRAILING:20

                  Comment

                  • GenoMax
                    Senior Member
                    • Feb 2008
                    • 7142

                    #10
                    Originally posted by Hparker View Post
                    command I am using:

                    $ java -Xmx2G -classpath trimmomatic-0.33.jar org.usadellab.trimmomatic.TrimmomaticPE in291_1_s1_R1.fastq.gz in291_1_s1_R2.fastq.gz in291_1_s1_R1.paired.fastq.gz in291_1_s1_R1.single.fastq.gz in291_1_s1_R2.paired.fastq.gz n291_1_s1_R2.single.fastq.gz LEADING:20 TRAILING:20
                    Try this (replace path_to with real path, I assume you have sanger fastq format files).

                    Code:
                    $ java -jar [COLOR="Red"]/path_to/[/COLOR]trimmomatic-0.33.jar PE -phred33 in291_1_s1_R1.fastq.gz in291_1_s1_R2.fastq.gz in291_1_s1_R1.paired.fastq.gz in291_1_s1_R1.single.fastq.gz in291_1_s1_R2.paired.fastq.gz n291_1_s1_R2.single.fastq.gz LEADING:20 TRAILING:20

                    Comment

                    • Hparker
                      Member
                      • Dec 2014
                      • 42

                      #11
                      Using the full path also does not work...

                      Comment

                      • yueluo
                        Member
                        • Aug 2013
                        • 82

                        #12
                        What files/directories do you have in your trimmomatic path? You might be missing some files.

                        Comment

                        • Hparker
                          Member
                          • Dec 2014
                          • 42

                          #13
                          In the path to the trimmomatic I have the following files:

                          fastq files
                          trimmomatic-0.33.jar file
                          adapters folder from trimmomatic zip
                          LICENSE file from trimmomatic zip

                          Comment

                          • hoppo
                            Junior Member
                            • Sep 2011
                            • 2

                            #14
                            When you move into the directory where the trimmomatic jar is located and execute:-

                            java -jar trimmomatic-0.33.jar

                            Do you get any output (or the same error)?

                            Also, the last paramerer is.. n291_1_s1_R2.single.fastq.gz
                            Is this correct? or should it be in291_1_s1_R2.single.fastq.gz
                            Last edited by hoppo; 07-03-2015, 04:33 AM.

                            Comment

                            • Hparker
                              Member
                              • Dec 2014
                              • 42

                              #15
                              I get the info on how to use it:

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

                              I have now changed the in code I use to:

                              java -jar /home/Shared/data/seq/hannah_Zymo_June2015/FASTQ/trimmomatic-0.33.jar PE in291_10_s1_R1.fastq.gz in291_10_s1_R2.fastq.gz in291_10_s1_R1.paired.fastq.gz in291_10_s1_R1.single.fastq.gz in291_10_s1_R2.paired.fastq.gz in291_10_s1_R2.single.fastq.gz LEADING:20 TRAILING:20

                              ..and this seems to be working- I get something like this:

                              Multiple cores found: Using 16 threads
                              Quality encoding detected as phred33
                              Input Read Pairs: 221445 Both Surviving: 221445 (100.00%) Forward Only Surviving: 0 (0.00%) Reverse Only Surviving: 0 (0.00%) Dropped: 0 (0.00%)
                              TrimmomaticPE: Completed successfully

                              I hope this is correct! It only takes a few seconds for it to do the trimming..

                              What is the difference with using -Xmx2G and not specifying this?

                              Comment

                              Latest Articles

                              Collapse

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, 06-09-2026, 11:58 AM
                              0 responses
                              25 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-05-2026, 10:09 AM
                              0 responses
                              31 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-04-2026, 08:59 AM
                              0 responses
                              39 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-02-2026, 12:03 PM
                              0 responses
                              62 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...