Trimmomatic "no such file or directory" error with reverse input
1
0
Entering edit mode
2.8 years ago
emilyc ▴ 30

I have run trimmomatic before and I did not experience this issue previously.

My script is:

for i in D465_S13 D466_S14 D467_S15 D468_S16 D469_S17 D470_S18 D471_S19 D472_S20

do

    java -jar /home/emily/Trimmomatic-0.38/trimmomatic-0.38.jar PE -phred33 -trimlog home/emily/pipe/$i/Trim/trim_log /home/emily/pipe/$i/"$i"_L001_R1_001.fastq.gz home/emily/pipe/$i/"$i"_L001_R2_001.fastq.gz home/emily/pipe/$i/Trim/"$i" _output_for_paired.fq.gz home/emily/pipe/$i/Trim/"$i"_output_for_unpaired.fq.gz home/emily/pipe/$i/Trim/"$i"_output_rev_paired.fq.gz home/emily/pipe/$i/Trim/"$i"_output_rev_unpaired.fq.gz ILLUMINACLIP:/home/emily/Trimmomatic-0.38/adapters/NexteraPE-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36
done

For each sample I am running, i, I get:

Exception in thread "main" java.io.FileNotFoundException: home/emily/pipe/D472_S20/D472_S20_L001_R2_001.fastq.gz (No such file or directory)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at org.usadellab.trimmomatic.fastq.FastqParser.parse(FastqParser.java:135)
    at org.usadellab.trimmomatic.TrimmomaticPE.process(TrimmomaticPE.java:268)
    at org.usadellab.trimmomatic.TrimmomaticPE.run(TrimmomaticPE.java:555)
    at org.usadellab.trimmomatic.Trimmomatic.main(Trimmomatic.java:80)

However the these files DO exist, e.g.

locate D472_S20_L001_R2_001.fastq.gz
/home/emily/pipe/D472_S20/D472_S20_L001_R2_001.fastq.gz

Any help is appreciated. For some reason it is always the input for the reverse file (R2), on each sample I run (S13-S20).

trimmomatic trimming • 2.2k views
ADD COMMENT
5
Entering edit mode
2.8 years ago

You are missing a / at the start of your input files. It must be /home/... and not home/../

fin swimmer

ADD COMMENT
0
Entering edit mode

Oh my GOD. Thank you. I was staring at this for hours - I guess that is the first day back from holidays for you. I'm so happy it was just a silly and simple error.

All the best!

ADD REPLY

Login before adding your answer.

Traffic: 2815 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6