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.
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???
3 answers
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
Oops. Didn't see that. Agreed: sampe with just one read shouldn't work anyway.
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?
Log in to answer this question.
Did you do both the forward and reverse strands?
I believe this is correct. You're not using bwa correctly. Read the documentation about how to align paired data.