SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trimmomatic problem Romz34 Bioinformatics 1 06-10-2014 01:34 AM
filtering - find-if commands frz Bioinformatics 3 01-23-2014 02:15 PM
Problem with trimmomatic amango Bioinformatics 9 12-29-2013 08:43 AM
Acknowledge/Cite Seqanswers posts and/or community. fjrossello General 0 01-22-2013 05:23 AM
BowTie 1 Commands ? Arupsss Bioinformatics 0 06-21-2012 08:54 AM

Reply
 
Thread Tools
Old 07-18-2014, 09:36 AM   #1
gwilymh
Member
 
Location: Milwaukee

Join Date: Dec 2011
Posts: 72
Default 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 at 10:08 AM.
gwilymh is offline   Reply With Quote
Old 07-18-2014, 12:14 PM   #2
blakeoft
Member
 
Location: Connecticut

Join Date: Oct 2013
Posts: 79
Default

Code:
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"
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 at 12:29 PM.
blakeoft is offline   Reply With Quote
Old 07-18-2014, 08:13 PM   #3
gwilymh
Member
 
Location: Milwaukee

Join Date: Dec 2011
Posts: 72
Default

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
gwilymh is offline   Reply With Quote
Old 07-19-2014, 01:17 AM   #4
tonybolger
Senior Member
 
Location: berlin

Join Date: Feb 2010
Posts: 156
Default

Quote:
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.
tonybolger is offline   Reply With Quote
Old 04-22-2017, 05:28 AM   #5
dineshsanka
Junior Member
 
Location: Chennai

Join Date: Apr 2017
Posts: 4
Default 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 Images
File Type: png Screen Shot 2017-04-22 at 6.55.58 PM.png (48.5 KB, 1 views)
dineshsanka is offline   Reply With Quote
Old 04-22-2017, 09:20 AM   #6
mastal
Senior Member
 
Location: uk

Join Date: Mar 2009
Posts: 657
Default

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.
mastal is offline   Reply With Quote
Old 04-22-2017, 09:40 AM   #7
dineshsanka
Junior Member
 
Location: Chennai

Join Date: Apr 2017
Posts: 4
Default

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 Images
File Type: png Screen Shot 2017-04-22 at 11.08.15 PM.png (46.2 KB, 2 views)
dineshsanka is offline   Reply With Quote
Old 04-22-2017, 11:15 AM   #8
mastal
Senior Member
 
Location: uk

Join Date: Mar 2009
Posts: 657
Default

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.
mastal is offline   Reply With Quote
Old 04-22-2017, 11:33 AM   #9
dineshsanka
Junior Member
 
Location: Chennai

Join Date: Apr 2017
Posts: 4
Default 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 Images
File Type: png Screen Shot 2017-04-23 at 12.59.58 AM.png (45.0 KB, 0 views)
dineshsanka is offline   Reply With Quote
Old 04-22-2017, 12:42 PM   #10
mastal
Senior Member
 
Location: uk

Join Date: Mar 2009
Posts: 657
Default

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 at 12:51 PM.
mastal is offline   Reply With Quote
Old 04-23-2017, 11:44 PM   #11
dineshsanka
Junior Member
 
Location: Chennai

Join Date: Apr 2017
Posts: 4
Default 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 Images
File Type: png Screen Shot 2017-04-24 at 1.10.07 PM.png (68.1 KB, 2 views)
dineshsanka is offline   Reply With Quote
Reply

Tags
cluster, java, linux, trimmomatic

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 12:33 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO