Bwa Alignment Failed
3
0
Entering edit mode
10.9 years ago
Tonyzeng ▴ 310

When I use new version BWA 0.7.5a to align my 78bp pair-end reads with reference genome under Linux, Index the genome and generate alignments in thesuffix array coordinate, everything went well... However, when I apply generating alignments in the SAM format, it showed unexpected end of file. Then I upload my pair-end reads to Galaxy platform and apply the BWA for Illumina alignment tool. it showed

The alignment failed. Error generating alignments. [bwa_sai2sam_pe_core] convert to sequence coordinate... [infer_isize] fail to infer insert size: too few good pairs

I used the commands in Linux as follows and believe Galaxy should use the same too...

Bwa index -a bwtsw ref.fa

Bwa aln ref.fa read.fq.gz > Read.sai

Bwa sampe ref.fa read.sai read.fa.gz > aln.sam

I do not figure out what is the problem is? My forward reads are very good after QC ( no duplicates, no overrepresent sequence and no Kmer sequence) and my reverse reads are ok ( no dupdlicates, no overrepresent sequence but has some Kmer sequences).

Is that possible that my reverse reads are bad for BWA alignment and following steps???

bwa • 9.6k views
ADD COMMENT
1
Entering edit mode

Did you do both the forward and reverse strands?

bwa aln ref.fa fwd_read.fq.gz > fwd_read.sai

bwa aln ref.fa rev_read.fq.gz > rev_read.sai

bwa sampe ref.fa fwd_read.sai rev_read.sai fwd_read.fq.gz rev_read.fq.gz> aln.sam
ADD REPLY
0
Entering edit mode

I believe this is correct. You're not using bwa correctly. Read the documentation about how to align paired data.

ADD REPLY
0
Entering edit mode
10.9 years ago
Tonyzeng ▴ 310

I did both strands. However, I found that when I do generating alignments in the SAM format with two strands separately, it works. So next step is merge two SAM formats of both forward and reverse reads.. Am I right?

ADD COMMENT
0
Entering edit mode

Can you post the exact commands you are running? It's hard to figure out what's going on otherwise. In your example in the question, you only gave one read to sampe. That's not right.

ADD REPLY
0
Entering edit mode
10.9 years ago
Andreas ★ 2.5k

The error message means that BWA failed to guess the insert size of your paired-end reads. That can happen if the order of reads is different between your two fastq files.

ADD COMMENT
0
Entering edit mode

The OP is running sampe with only one read, which doesn't make sense. I think the error stems from that, but maybe they're doing something different from what they posted. They said they ran (erroneously):

Bwa sampe ref.fa read.sai read.fa.gz > aln.sam
ADD REPLY
0
Entering edit mode

Oops. Didn't see that. Agreed: sampe with just one read shouldn't work anyway.

ADD REPLY
0
Entering edit mode
10.9 years ago

I agree with Andreas; mispaired reads is the most likely cause of our problem.

So start by looking at your data. You have separate read 1 and read 2 .sams? So look at the first ten lines or so. Did they map? Are the reads really paired right? Is the insertion distance between them sane?

ADD COMMENT

Login before adding your answer.

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