This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Problem with Trimmomatic Multiple Paired-End sequencing.

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

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

Ok, better now?

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

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

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.

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

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.

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.

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.

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.

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.

0 answers

No answers yet.

Log in to answer this question.