Question: trimmomatic for quality trimming
1
gravatar for blooming.daisy333
2.2 years ago by
blooming.daisy33390 wrote:

I am using trimmomatic for quality trimming of Paired reads. however, i am unable to get equal numbrer of reads in paired read files. Can anyone please help me out to resolve this issue. the command I am using is as follows:

java -jar trimmomatic-0.36.jar -phred33 PE /path/to/dir/SRR9590_1.fastq /path/to/dir/SRR9590_2.fastq SRR9590_1P.fq SRR9590_1U.fq SRR9590_2P.fq SRR9590_2U.fq ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36
sequencing • 1.5k views
ADD COMMENTlink modified 2.2 years ago • written 2.2 years ago by blooming.daisy33390

I suggest you give bbduk.sh from BBMap suite a try.

ADD REPLYlink written 2.2 years ago by genomax85k

How many reads do you have in each file ? SRR9590_1P.fq and SRR9590_2P.fq should have the same number of reads. How many reads are dropped ? can you show us trimmomatic output ?

ADD REPLYlink written 2.2 years ago by Carlo Yague5.0k

I am newbie to NGS analysis. I am consistently getting the same error. the number of reads in 1P file is 362080 while in 2P is 361087 in current session. Sometimes I even get the different number (I mean not this one)

ADD REPLYlink written 2.2 years ago by blooming.daisy33390

here is the output for new trial:

TrimmomaticPE: Started with arguments:

 /data/sata4/memona/SRR959590_1.fastq /data/sata4/memona/SRR959590_2.fastq SRR959590_g_1P.fq SRR959590_g_1U.fq SRR959590_g_2P.fq SRR959590_g_2U.fq ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36
java.io.FileNotFoundException: /data/sata4/memona/Trimmomatic-0.36/TruSeq3-PE.fa (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:146)
        at org.usadellab.trimmomatic.fasta.FastaParser.parse(FastaParser.java:54)
        at org.usadellab.trimmomatic.trim.IlluminaClippingTrimmer.loadSequences(IlluminaClippingTrimmer.java:110)
        at org.usadellab.trimmomatic.trim.IlluminaClippingTrimmer.makeIlluminaClippingTrimmer(IlluminaClippingTrimmer.java:71)
        at org.usadellab.trimmomatic.trim.TrimmerFactory.makeTrimmer(TrimmerFactory.java:32)
        at org.usadellab.trimmomatic.Trimmomatic.createTrimmers(Trimmomatic.java:59)
        at org.usadellab.trimmomatic.TrimmomaticPE.run(TrimmomaticPE.java:536)
        at org.usadellab.trimmomatic.Trimmomatic.main(Trimmomatic.java:80)
Quality encoding detected as phred33
Exception in thread "main" java.lang.RuntimeException: Sequence and quality length don't match: 'AGGAGCTGGGAAGCAAAGGAGGTCAGACAAGAAAGGAGCAGATAGGGACTGAAGGGTACCAGGAAATGGGGCGAAAAGGTGGACTGAGTACGATGGAC' vs '@?=DDBDD?DHHFBFHJAC3ADHCHGIAF>B3CGEC;DHIIAG����**�:��ZY8�`�
                    u��Wi��%^|\�/V�Œ���@'
        at org.usadellab.trimmomatic.fastq.FastqRecord.<init>(FastqRecord.java:25)
        at org.usadellab.trimmomatic.fastq.FastqParser.parseOne(FastqParser.java:89)
        at org.usadellab.trimmomatic.fastq.FastqParser.next(FastqParser.java:179)
        at org.usadellab.trimmomatic.TrimmomaticPE.processSingleThreaded(TrimmomaticPE.java:63)
        at org.usadellab.trimmomatic.TrimmomaticPE.process(TrimmomaticPE.java:311)
        at org.usadellab.trimmomatic.TrimmomaticPE.run(TrimmomaticPE.java:539)
        at org.usadellab.trimmomatic.Trimmomatic.main(Trimmomatic.java:80)

the number of reads in 1P file is 362080 while in 2P is 361087 in current session. Sometimes I even get the different number. kindly help me to sort out this issue. thanks

ADD REPLYlink modified 2.2 years ago by genomax85k • written 2.2 years ago by blooming.daisy33390
3
gravatar for finswimmer
2.2 years ago by
finswimmer13k
Germany
finswimmer13k wrote:

Hello,

first let's check if there are the same number of line in both fastq files. So what's the output of wc -l /path/to/dir/SRR9590_1.fastq and wc -l /path/to/dir/SRR9590_2.fastq?

If it's the same number we can go on. In your output above you have this message:

java.io.FileNotFoundException: /data/sata4/memona/Trimmomatic-0.36/TruSeq3-PE.fa

Check if this file realy doesn't exist. If there is a similar named file adopt your command line to this. I have found some threads where the authors guess that the error thread "main" java.lang.RuntimeException: Sequence and quality length don't match: arise due to the missing adaptor file.

fin swimmer

ADD COMMENTlink modified 2.2 years ago • written 2.2 years ago by finswimmer13k
1

Yes this is probably the cause of your issue.

The error means that the reference file for adapter trimming is missing or not at the expected location. Locate this file (TruSeq3-PE.fa) then replace ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 by ILLUMINACLIP:correct/path/to/TruSeq3-PE.fa:2:30:10.

ADD REPLYlink written 2.2 years ago by Carlo Yague5.0k

thank you so much . it has worked correctly. Now i am getting ewual number of reads. thanks again

ADD REPLYlink written 2.2 years ago by blooming.daisy33390
Please log in to add an answer.

Help
Access

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