What is Trimmomatic -validatePairs, and how to use it?
1
1
Entering edit mode
3.1 years ago
jon.brate ▴ 250

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

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

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

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

ADD REPLY
0
Entering edit mode

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

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
3
Entering edit mode
3.1 years ago
h.mon 33k

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

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

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

ADD REPLY

Login before adding your answer.

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