Question: Bwa Alignment Failed
0
gravatar for Tonyzeng
6.1 years ago by
Tonyzeng300
Tonyzeng300 wrote:

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 • 7.0k views
ADD COMMENTlink modified 6.1 years ago by swbarnes26.7k • written 6.1 years ago by Tonyzeng300
1

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 REPLYlink modified 6.1 years ago • written 6.1 years ago by sheenams50

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

ADD REPLYlink written 6.1 years ago by matted7.1k
0
gravatar for Tonyzeng
6.1 years ago by
Tonyzeng300
Tonyzeng300 wrote:

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 COMMENTlink written 6.1 years ago by Tonyzeng300

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 REPLYlink written 6.1 years ago by matted7.1k
0
gravatar for Andreas
6.1 years ago by
Andreas2.4k
Singapore
Andreas2.4k wrote:

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 COMMENTlink written 6.1 years ago by Andreas2.4k

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 REPLYlink written 6.1 years ago by matted7.1k

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

ADD REPLYlink written 6.1 years ago by Andreas2.4k
0
gravatar for swbarnes2
6.1 years ago by
swbarnes26.7k
United States
swbarnes26.7k wrote:

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 COMMENTlink written 6.1 years ago by swbarnes26.7k
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: 2418 users visited in the last hour