Question: Trimmomatic output file Issue
gravatar for akh22
20 months ago by
United States
akh2240 wrote:


Using brew installed trimmomatic/0.38 and run a following script;

java -Xms4000M -Xmx12000m -XX:+UseConcMarkSweepGC \
        -XX:NewSize=300M -XX:MaxNewSize=300M \
        -jar /usr/local/Cellar/trimmomatic/0.38/libexec/trimmomatic-0.38.jar \
        PE -threads 24 -trimlog sample1_R1_001.fastq.gz  Sample2_R2_001.fastq.gz\
        ~/Desktop/output_forward_paired.fq.gz ~/Desktop/output_forward_unpaired.fq.gz\
        ~/Desktop/output_reverse_paired.fq.gz ~/Desktop/output_reverse_unpaired.fq.gz\

I get this an error code;

Exception in thread "main" /Volumes/Documents/ahoji/Desktop/output_forward_paired.fq.gz (No such file or directory)
at java.base/ Method)
at java.base/
at java.base/<init>(
at org.usadellab.trimmomatic.fastq.FastqParser.parse(
at org.usadellab.trimmomatic.TrimmomaticPE.process(
at org.usadellab.trimmomatic.Trimmomatic.main(

I though this might be the file permission issue and I changed output directories to different directories but I still get the same error. I'd really appreciate any help on this.

Thanks in advance.

java -version java version "12.0.1" 2019-04-16 Java(TM) SE Runtime
Environment (build 12.0.1+12) Java HotSpot(TM) 64-Bit Server VM (build
12.0.1+12, mixed mode, sharing)

ProductName:    Mac OS X
ProductVersion: 10.14.5
BuildVersion:   18F132
sequencing rna-seq • 866 views
ADD COMMENTlink modified 20 months ago • written 20 months ago by akh2240

What happens if you remove the ~/Desktop/ from all the output files? I believe Trimmomatic outputs the files in the current working directory.

ADD REPLYlink modified 20 months ago • written 20 months ago by lshepard440

As a quick sanity check, can you check that /Volumes/Documents/ahoji/Desktop/ exists?

i.e. ls /Volumes/Documents/ahoji/Desktop/

ADD REPLYlink written 20 months ago by manuel.belmadani1.2k

Thanks for all the suggestions, though Damian's comment fixed it. I completely missed trimlog location and after specifying the location, it run just fine. Luckily, trimmomatic did not run completely to erase fastqs.

ADD REPLYlink written 20 months ago by akh2240

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they work.

ADD REPLYlink written 20 months ago by GenoMax95k
gravatar for Damian Kao
20 months ago by
Damian Kao15k
Damian Kao15k wrote:

It looks like you are not specifying an output file for the -trimlog parameter. So it thinks your output_forward_paired.fq.gz is an input.

I hope you still can still redownload sample1_R1_001.fastq.gz, because it might have been overwritten.

ADD COMMENTlink modified 20 months ago • written 20 months ago by Damian Kao15k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2130 users visited in the last hour