trimmomatic for quality trimming
2
1
Entering edit mode
6.0 years ago

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 • 3.3k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
3
Entering edit mode
6.0 years ago

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 COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

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