Question: bwa error: paired reads have different names
0
gravatar for vjmorley
3.6 years ago by
vjmorley30
United States
vjmorley30 wrote:

I'm getting an error when I try to pair my reads using bwa (version 0.7.10-r789). Here's my pipeline:

Trim for quality using fastx fastq_quality_trimmer

>fastq_quality_trimmer -t 20 -l 30 -Q33 -i for.fastq -o for_trimmed.fastq

>fastq_quality_trimmer -t 20 -l 30 -Q33 -i rev.fastq -o rev_trimmed.fastq

Align forward and reverse reads to reference

>bwa index ref.fa
>bwa aln ref.fa for_trimmed.fastq  > for.sai
>bwa aln ref.fa rev_trimmed.fastq  > rev.sai

Pair reads, for which I get the error in the following output:

>bwa sampe for.sai rev.sai for_trimmed.fastq  rev_trimmed.fastq > sample.sam

[bwa_sai2sam_pe_core] convert to sequence coordinate...
[infer_isize] fail to infer insert size: too few good pairs
[bwa_sai2sam_pe_core] time elapses: 0.14 sec
[bwa_sai2sam_pe_core] changing coordinates of 0 alignments.
[bwa_sai2sam_pe_core] align unmapped mate...
[bwa_sai2sam_pe_core] time elapses: 0.00 sec
[bwa_sai2sam_pe_core] refine gapped alignments... 0.07 sec
[bwa_sai2sam_pe_core] print alignments... [bwa_sai2sam_pe_core] paired reads have different names: "HWI-D00306:565:C6NPTANXX:8:1101:9745:2553", "HWI-D00306:565:C6NPTANXX:8:1101:9672:2717"

Any suggestions on how to fix this problem or remove the offending reads?

alignment software error • 4.1k views
ADD COMMENTlink modified 3.6 years ago by Daniel Swan13k • written 3.6 years ago by vjmorley30
3
gravatar for Daniel Swan
3.6 years ago by
Daniel Swan13k
Aberdeen, UK
Daniel Swan13k wrote:

Because you're trimming your reads independently you're ensuring that their order is out of sync, bwa relies on your files being synchronised in terms of read names.  Use a trimmer that can maintain the order of your fastq files by throwing out both pairs of reads if one of them fails a quality check.

Cutadapt can do paired-end aware quality and adaptor trimming.

https://cutadapt.readthedocs.org/en/stable/guide.html#trimming-paired-end-reads

ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by Daniel Swan13k
1

Thanks! I used cutadapt to trim the paired reads, and that solved the problem. I really appreciate the help!

ADD REPLYlink written 3.6 years ago by vjmorley30

As Daniel suggested that you should retrim the fastq reads using a trimmer that maintains the order of reads in the two fastq files. Trimmomatic is another paired-end aware trimmer. Alternatively, you can remove orphan reads as described here: A: Combining The Paired Reads From Illumina Run

ADD REPLYlink written 3.6 years ago by Ashutosh Pandey11k
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: 790 users visited in the last hour