Question: What is Trimmomatic -validatePairs, and how to use it?
0
gravatar for jon.brate
10 months ago by
jon.brate200
Norway
jon.brate200 wrote:

Hi,

I use Trimmomatic v0.35 and I notice the option -validatePairs:

Usage:
       PE [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-quiet] [-validatePairs] [-basein <inputBase> | <inputFile1> <inputFile2>] [-baseout <outputBase> | <outputFile1P> <outputFile1U> <outputFile2P> <outputFile2U>] <trimmer1>...
   or:
       SE [-threads <threads>] [-phred33|-phred64] [-trimlog <trimLogFile>] [-quiet] <inputFile> <outputFile> <trimmer1>...

But I can't find a description of this option in the manual. I want to filter away singletons from two paired fastq-files and I tried to run trimmomatic with this option and the two paired files as input, but it didn't work.

Thanks, Jon

trimmomatic • 824 views
ADD COMMENTlink modified 10 months ago by h.mon24k • written 10 months ago by jon.brate200

Hi, Please change the post to a question. It is not a job.

ADD REPLYlink written 10 months ago by Medhat8.2k

Yes, it's certainly not a job! Thanks! :-)

ADD REPLYlink written 10 months ago by jon.brate200

Describe how "it didn't work. Were there errors? The output is not what you expected?

Do your files contain singletons from the start? This only occurs when they are processed incorrectly. Otherwise, Trimmomatic will output properly paired reads.

ADD REPLYlink written 10 months ago by h.mon24k

My questions is really how to use trimmomatic with this option? I can't find any mention of it in the manual. I tried to launch trimmomatic with -validatePairs input1.fq input2.fq paired1out.fq single1out.fq paired2out.fq single2out.fq but nothing happened. Only the usage menu showed.

ADD REPLYlink written 10 months ago by jon.brate200

And if you use the same command without -validatePairs, does it work as expected?

ADD REPLYlink written 10 months ago by h.mon24k

Yes, I can do the trimming and everything and it spits out the two correct paired files and the two single files. But in this case I wondered whether I could use trimmomatic just for filtering out singletons, without doing any trimming or filtering.

ADD REPLYlink written 10 months ago by jon.brate200
1

Probably not. You can use repair.sh from the BBTools package for this.

ADD REPLYlink written 10 months ago by h.mon24k

Ok, I'll check it out. Thanks for the advice :)

ADD REPLYlink written 10 months ago by jon.brate200
2
gravatar for h.mon
10 months ago by
h.mon24k
Brazil
h.mon24k wrote:

My guess is you are using an incorrect Trimmomatic command, and the issue is not related to -validatePairs. I can use it:

TrimmomaticPE -phred33 -validatePairs 1.fastq 2.fastq  \
    ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36

results in:

TrimmomaticPE: Started with arguments:
 -phred33 -validatePairs 1.fastq 2.fastq ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:12
Multiple cores found: Using 2 threads
WARNING: Pair validation failed at record: 0
         Forward read: 1/1
         Reverse read: 4/2
Input Read Pairs: 3 Both Surviving: 3 (100.00%) Forward Only Surviving: 0 (0.00%) Reverse Only Surviving: 0 (0.00%) Dropped: 0 (0.00%)
TrimmomaticPE: Completed successfully

TrimmomaticPE -phred33 1.fastq 2.fastq \
    ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36

results in:

TrimmomaticPE: Started with arguments:
 -phred33 1.fastq 2.fastq ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:12
Multiple cores found: Using 2 threads
Input Read Pairs: 3 Both Surviving: 3 (100.00%) Forward Only Surviving: 0 (0.00%) Reverse Only Surviving: 0 (0.00%) Dropped: 0 (0.00%)
TrimmomaticPE: Completed successfully
ADD COMMENTlink written 10 months ago by h.mon24k

Ok, so -validatePairs seems to only print out a warning if there are singletons in any of the files? Did both commands give the same output?

ADD REPLYlink written 10 months ago by jon.brate200
1

Yes, identical output: indeed Trimmomatic only tests for "pairedness", but does not correct improperly paired files.

ADD REPLYlink written 10 months ago by h.mon24k
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: 791 users visited in the last hour