This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Trimmomatic- PE reads number not identical

Hi,

I am trying to run trimmomatic-0.35 on my PE reads data (~500 files). Interestingly, some of the paired output files have different lengths. Can somebody please explain why is this happening or what am I doing wrong?

Here's the code (run on linux environment):

while read first second
do
trimmomatic PE -threads 10 -phred33 "$first" "$second" ""$first""_paired"" ""$first""_unpaired"" ""$second""_paired"" ""$second""_unpaired"" ILLUMINACLIP:/usr/local/extras/Genomics/apps/trimmomatic/current/adapters/TruSeq3-SE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:10:20 MINLEN:90
done < R12

R12 (tab-delimited file) has forward reads in the first column and reverse reads in the second column (in match 1:1)

Thanks,

Different length and read number*

software error trimmomatic data filtering bash

*correction

while read first second ; do trimmomatic PE -threads 10 -phred33 "$first" "$second" ""$first""_paired"" ""$first""_unpaired"" ""$second""_paired"" ""$second""_unpaired"" ILLUMINACLIP:/usr/local/extras/Genomics/apps/trimmomatic/current/adapters/TruSeq3-SE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:10:20 MINLEN:90 ; done < R12

Are you going by "length" as in "file size"? This may not be a good criteria to compare here.

As the reads are getting trimmed it is not unexpected to find them to be of differing length (post-trimming). Does a pair of files for a sample have an identical number of reads for R1/R2 files (post-trimming) is what you should be checking. If the answer is yes then this means that the two read files are still in sync.

Hi, I had checked for the number of reads and the read length through fastqc. For most of the PE files it seemed to be messed up. Though it worked for some of the files.

This has nothing to do with the length of the files or of the trimmed reads, but is there a reason why you are using the file for single-read adapters (TruSeq3-SE.fa) if you have PE data?

The adapters used in the sequencing were SE-adapters.

Then how do you have PE data? I assume that if you are using a TruSeq adapters file, that you have Illumina data.

If you get trimmomatic to produce log files (using the -trimlog parameter) then you may be able to work out how it is trimming the reads for those output files where you are getting different numbers of forward and reverse paired reads.

The company which did the sequencing provided both PE and SE reads- and used SE adapters for both. Unfortunately, this is the process in which I did not have a lot of say. :(

For the reads that are PE you should follow the PE protocol with trimmomatic and use the PE adapters file. For the SE reads use the SE protocol and SE adapters file.

Thanks! This seem to work.

I ran some of the "problem" files separately. It seems to be working alright when run separately. But messes up when run in the loop.

Hello Pragy30!

We believe that this post does not fit the main topic of this site.

Answered

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

0 answers

No answers yet.

Log in to answer this question.