Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Trimmomatic: will not acknowledge commands

    I am trying to use the program Trimmomatic to removed adapter sequences from an Illumina paired-end read over a computer cluster. While I can get the program to open, it will either not acknowledge the commands I enter or will return an error message. I have tried all kinds of permutations of the input commands without success. Examples of input code and error messages are below

    Code:
    java -classpath /filepath/Trimmomatic-0.32/trimmomatic-0.32.jar org.usadellab.trimmomatic.TrimmomaticPE \
    -phred33 -trimlog /Results/log.txt \
    ~/filepath/data_R1.fq ~/filepath/data_R2.fq \
    ILLUMINACLIP:/filepath/src/Trimmomatic-0.32/adapters/TruSeq3-PE-2.fa:2:30:10:3:"true"
    Results: (the o/s seems to find and execute the software, but is not feeding in the command; I get the same result if I use the java -jar <path to trimmomatic jar> option for executing Trimmomatic)
    TrimmomaticPE [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-basein <inputBase> | <inputFile1> <inputFile2>] [-baseout <outputBase> | <outputFile1P> <outputFile1U> <outputFile2P> <outputFile2U>] <trimmer1>...


    Code: (If I add in the command PE immediately before all other commands, the program executes and can find the fasta file containing the adapter sequences, but then searches for and cannot fund a file called 'PE')
    java -classpath /filepath/trimmomatic-0.32.jar org.usadellab.trimmomatic.TrimmomaticPE \
    PE -phred33 -trimlog /Results/log.txt \
    ~/refs/lec12/data_R1.fq ~/refs/lec12/data_R2.fq \
    ILLUMINACLIP:/filepath/Trimmomatic-0.32/adapters/TruSeq3-PE-2.fa:2:30:10:3:"true"
    Results: (Programs rus and finds the fasta file of adapter sequences, but then fails to execute. Why is it looking for a PE file?)
    TrimmomaticPE: Started with arguments: PE -phred33 -trimlog /Results/log.txt /filepath/data_R1.fq /filepath/data_R2.fq ILLUMINACLIP:/filepath/Trimmomatic-0.32/adapters/TruSeq3-PE-2.fa:2:30:10:3:true
    Multiple cores found: Using 12 threads
    Using PrefixPair: 'TACACTCTTTCCCTACACGACGCTCTTCCGATCT' and 'GTGACTGGAGTTCAGACGTGTGCTCTTCCGATCT'
    Using Long Clipping Sequence: 'AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC'
    Using Long Clipping Sequence: 'TACACTCTTTCCCTACACGACGCTCTTCCGATCT'
    Using Long Clipping Sequence: 'GTGACTGGAGTTCAGACGTGTGCTCTTCCGATCT'
    Using Long Clipping Sequence: 'AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTA'
    ILLUMINACLIP: Using 1 prefix pairs, 4 forward/reverse sequences, 0 forward only sequences, 0 reverse only sequences
    Exception in thread "main" java.io.FileNotFoundException: PE (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:146)
    at org.usadellab.trimmomatic.fastq.FastqParser.parse(FastqParser.java:127)
    at org.usadellab.trimmomatic.TrimmomaticPE.process(TrimmomaticPE.java:251)
    at org.usadellab.trimmomatic.TrimmomaticPE.run(TrimmomaticPE.java:498)
    at org.usadellab.trimmomatic.TrimmomaticPE.main(TrimmomaticPE.java:506)
    Last edited by gwilymh; 07-18-2014, 10:08 AM.

  • #2
    Code:
    java -classpath /filepath/trimmomatic-0.32.jar org.usadellab.trimmomatic.TrimmomaticPE \
    [B]PE[/B] -phred33 -trimlog /Results/log.txt \
    ~/refs/lec12/data_R1.fq ~/refs/lec12/data_R2.fq \
    ILLUMINACLIP:/filepath/Trimmomatic-0.32/adapters/TruSeq3-PE-2.fa:2:30:10:3:"true"
    That PE that's floating around on the second line doesn't need to be there. I think you only put it there when you do the "java -jar" version of running trimmomatic. Can you tell me what happens when you run:

    Code:
    java -classpath /filepath/trimmomatic-0.32.jar org.usadellab.trimmomatic.TrimmomaticPE \
    -phred33 -trimlog /Results/log.txt \
    ~/refs/lec12/data_R1.fq ~/refs/lec12/data_R2.fq \
    ILLUMINACLIP:/filepath/Trimmomatic-0.32/adapters/TruSeq3-PE-2.fa:2:30:10:3:"true"
    I'm also not sure about the "true" part at the very end of the code. The documentation doesn't seem to mention any boolean arguments for the ILLUMINACLIP option.

    Edit: I misread your original post, so most of what I said will seem stupid. However, I still don't see the "true" tidbit in the documentation. Can you try taking that out?

    Edit2: I just found the manual. It doesn't give an example of using the keepBothReads option for ILLUMINACLIP, but it just says specify 'true'. That is, in single quotes. Try changing that around by using single quotes or no quotes instead of double quotes.

    Edit3: One last thing! I looked at my scripts and realized that I have output files specified, but you don't. Try adding those too. Sorry for all of the suggestions. Let me know if you get any other errors or if some of my suggestions work. Try

    Code:
    java -classpath /filepath/trimmomatic-0.32.jar org.usadellab.trimmomatic.TrimmomaticPE \
    -phred33 -trimlog /Results/log.txt \
    ~/refs/lec12/data_R1.fq ~/refs/lec12/data_R2.fq \
    ~/refs/lec12/data_R1_paired.fq ~/refs/lec12/data_R1_unpaired.fq ~/refs/lec12/data_R2_paired.fq ~/refs/lec12/data_R2_unpaired.fq \
    ILLUMINACLIP:/filepath/Trimmomatic-0.32/adapters/TruSeq3-PE-2.fa:2:30:10:3:true
    and maybe try it with single quotes around true.
    Last edited by blakeoft; 07-18-2014, 12:29 PM.

    Comment


    • #3
      Thank you blakeoft. I dropped the PE flag and added individual file names for each output file and the program executed properly.

      NB: I also tried using the -baseout <outputBase> flag rather than a list of four files, and the program would open but not execute any commands

      Comment


      • #4
        Originally posted by gwilymh View Post
        Thank you blakeoft. I dropped the PE flag and added individual file names for each output file and the program executed properly.

        NB: I also tried using the -baseout <outputBase> flag rather than a list of four files, and the program would open but not execute any commands
        Glad you have already solved it with blakeoft's help.

        As you see for PE mode, 6 files need to be given before the list of trimming steps (unless you use -basein/-baseout which replace 2 / 4 files respectively).

        Tony.

        Comment


        • #5
          Help me with trimmometic

          Hi there,
          I am a beginner with respect to WGS analysis. Excuse me for any mistake.

          here is the command i have used

          java -jar /Users/apple/Downloads/Trimmomatic-0.36/trimmomatic-0.36.jar PE -phred33 -trimlog /Users/apple/Downloads/Trimmomatic-0.36/SL.trimlog -basein /Users/apple/Downloads/Trimmomatic-0.36/SL_R1.fastq /Users/apple/Downloads/Trimmomatic-0.36/SL_R2.fastq -baseout /Users/apple/Downloads/Trimmomatic-0.36/SL_R1_trimmed_1P.fastq /Users/apple/Downloads/Trimmomatic-0.36/SL_R1_trimmed_1U.fastq /Users/apple/Downloads/Trimmomatic-0.36/SL_R1_trimmed_2P.fastq /Users/apple/Downloads/Trimmomatic-0.36/SL_R1_trimmed_2U.fastq /Users/apple/Downloads/Trimmomatic-0.36/adapters/TruSeq2-SE.fa LEADING:30 TRAILING:25 SLINGWINDOW:20 MINLENGTH:100

          I m getting error like this unable to determine input files

          Please help me.

          Dinesh
          Attached Files

          Comment


          • #6
            Don't use -basein and -baseout if you give the full names of the input and output files.

            You have a typo in the rest of the command, it should be SLIDINGWINDOW not SLINGWINDOW.

            You should probably not put your input and output in the same directory as the trimmomatic program files.

            Comment


            • #7
              Hi there,
              Thanks a lot. I am still getting error even after changing the output directory, correcting the typo in command and removing base in and base out.

              java -jar /Users/apple/Downloads/Trimmomatic-0.36/trimmomatic-0.36.jar PE -phred33 -trimlog /Users/apple/Downloads/Trimmomatic-0.36/SL.trimlog /Users/apple/Downloads/Trimmomatic-0.36/SL_R1.fastq /Users/apple/Downloads/SL_R2.fastq /Users/apple/Downloads/SL_R1_trimmed_1P.fastq /Users/apple/Downloads/SL_R1_trimmed_1U.fastq /Users/apple/Downloads/SL_R1_trimmed_2P.fastq /Users/apple/Downloads/Trimmomatic-0.36/adapters/NexteraPE-PE.fa LEADING:30 TRAILING:25 SLIDINGWINDOW:20 MINLENGTH:100

              Regards,
              Dinesh
              Attached Files

              Comment


              • #8
                More syntax errors.

                It appears that you only have names for 3 of the 4 output files, you are missing a name for the 2U output file. The command that uses the adapter fasta sequences is ILLUMINACLIP,
                see the trimmomatic web page for the parameters to use with it.

                Comment


                • #9
                  Unknown trimmer

                  Hi there,
                  Thanks for your reply.
                  java -jar /Users/apple/Downloads/Trimmomatic-0.36/trimmomatic-0.36.jar PE -phred33 -trimlog /Users/apple/Downloads/Trimmomatic-0.36/SL.trimlog /Users/apple/Downloads/Trimmomatic-0.36/SL_R1.fastq /Users/apple/Downloads/SL_R2.fastq /Users/apple/Downloads/SL_R1_trimmed_1P.fastq /Users/apple/Downloads/SL_R1_trimmed_1U.fastq /Users/apple/Downloads/SL_R1_trimmed_2P.fastq ILLUMINACLIP: /Users/apple/Downloads/Trimmomatic-0.36/adapters/TruSeq3-PE.fa2:30:10 LEADING:30 TRAILING:25 SLIDINGWINDOW:20 MINLENGTH:100

                  I tried with all the adaptor sequences
                  NexteraPE-PE.fa
                  TruSeq2-PE.fa
                  TruSeq2-SE.fa
                  TruSeq3-PE-2.fa
                  TruSeq3-PE.fa
                  TruSeq3-SE.fa

                  I am getting Exception in thread "main" java.lang.RuntimeException: Unknown trimmer: /Users/apple/Downloads/Trimmomatic-0.36/adapters/TruSeq3-PE.fa2
                  Attached Files

                  Comment


                  • #10
                    The error message suggests that there is still something not quite right with the syntax.

                    It looks like you have not added a name for the 2U output file.

                    I don't think there is anything wrong with the adapter files, but you need to use the one that has the right adapters for your data. You need to find out which library prep kit was used to generate the data.

                    You are also missing a colon between the name of the adapter fasta file and the trimming parameters 2:30:10 - that is probably what the error message is complaining about.
                    Last edited by mastal; 04-22-2017, 12:51 PM.

                    Comment


                    • #11
                      Looks Job done

                      Hi there,
                      I followed your suggestions. Looks like job is done. Thanks
                      The command used
                      java -jar /Users/apple/Downloads/Trimmomatic-0.36/trimmomatic-0.36.jar PE -phred33 -trimlog /Users/apple/Downloads/Trimmomatic-0.36/SL.trimlog /Users/apple/Downloads/Trimmomatic-0.36/SL_R1.fastq /Users/apple/Downloads/Trimmomatic-0.36/SL_R2.fastq /Users/apple/Downloads/SL_R1_trimmed_1P.fastq /Users/apple/Downloads/SL_R1_trimmed_1U.fastq /Users/apple/Downloads/SL_R1_trimmed_2P.fastq /Users/apple/Downloads/SL_R1_trimmed_2U.fastq ILLUMINACLIP:/Users/apple/Downloads/Trimmomatic-0.36/adapters/TruSeq2-PE.fa:2:30:10 LEADING:30 TRAILING:25 SLIDINGWINDOW:4:20 MINLEN:100
                      Attached Files

                      Comment

                      Latest Articles

                      Collapse

                      • seqadmin
                        Strategies for Sequencing Challenging Samples
                        by seqadmin


                        Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                        03-22-2024, 06:39 AM
                      • seqadmin
                        Techniques and Challenges in Conservation Genomics
                        by seqadmin



                        The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                        Avian Conservation
                        Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                        03-08-2024, 10:41 AM

                      ad_right_rmr

                      Collapse

                      News

                      Collapse

                      Topics Statistics Last Post
                      Started by seqadmin, Yesterday, 06:37 PM
                      0 responses
                      10 views
                      0 likes
                      Last Post seqadmin  
                      Started by seqadmin, Yesterday, 06:07 PM
                      0 responses
                      9 views
                      0 likes
                      Last Post seqadmin  
                      Started by seqadmin, 03-22-2024, 10:03 AM
                      0 responses
                      51 views
                      0 likes
                      Last Post seqadmin  
                      Started by seqadmin, 03-21-2024, 07:32 AM
                      0 responses
                      67 views
                      0 likes
                      Last Post seqadmin  
                      Working...
                      X