Problem with Trimmomatic Multiple Paired-End sequencing.
0
0
Entering edit mode
22 months ago
john • 0

I'm trying to run trimmomatic for multiple paired-end data for 20 samples (sample names 101 to 120), but for whatever reason it fails analyzing the last sample (number 20) and the reason is that it is looking for sample 220 instead of 120. Any idea why that may be? Here's my code:

for file in ../../fqgz_trim/P26318_*/02-FASTQ/*/*.fastq.gz; do trimmomatic PE -threads 1 -trimlog $file_trim.log -basein $file -phred33 -baseout ${file/%fastq.gz/fq.gz} ILLUMINACLIP:NexteraPE-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:100 CROP:100 done

and the error:

ILLUMINACLIP: Using 1 prefix pairs, 4 forward/reverse sequences, 0 forward only sequences, 0 reverse only sequences
Exception in thread "main" java.io.FileNotFoundException: ../../fqgz_trim/P26318_120/02-FASTQ/220914_A01901_0037_BHMFW3DSX3/P26318_220_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)

Images:

Error

Here's how it should look:

This is what it should look like

Trimmomatic • 1.8k views
ADD COMMENT
0
Entering edit mode

We cannot read data from images. Please include a plain text format .

ADD REPLY
0
Entering edit mode

Ok, better now?

ADD REPLY
0
Entering edit mode

Not yet. You have not provided the command that you are using to run this job. That is where the problem must be.

ADD REPLY
0
Entering edit mode

I did put it there, but it disappeared for whatever reason. It's up again. Thank you.

ADD REPLY
0
Entering edit mode

Add an echo command after do in loop. This will simply print the command lines to the screen. That will allow you to check what is happening with your loop.

ADD REPLY
0
Entering edit mode

So you suggest I rerun the code adding echo command and then review?

ADD REPLY
0
Entering edit mode

Verify that the loop is behaving as you expect it to in terms of generating correct command lines. When you add echo the jobs will not run. This will simply print all the command lines to screen as for walks through the files. Make corrections, if needed.

ADD REPLY
0
Entering edit mode

I tried doing that (adding "echo"), but nothing happens thus far. This script (I send it to a cluster environment normally) takes around 10 hours to finish, this time I didn't, rather just put directly into the console. Don't know how long time it will take.

ADD REPLY
0
Entering edit mode

but nothing happens thus far

As I said above nothing is going to happen since the program is not actually being executed.

This is simply for you to check the command lines to see the output of for loop and what you need to fix. Since we don't have access to your data this is something you are going to need to check on your own.

ADD REPLY
0
Entering edit mode

I don't get any output, as I'm entering the code nothing happens. Will the output be stored as a file? If so, can't see that any files has been created.

ADD REPLY
0
Entering edit mode

An echo command simply sends output to screen (assuming you are using it in right spot). It will prevent the command from actually the trimming program. If you are not simply seeing a bunch of command lines being printed to screen then you are doing something incorrect.

ADD REPLY

Login before adding your answer.

Traffic: 1695 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