Error While Running Samse (Bwa)
2
2
Entering edit mode
13.5 years ago

Hi,

I am trying to align short sequences of chromosomeX w.r.t the reference gnome using bwa.

After successfully running aln function when I ran samse as:

./bwa samse ../SURA/chrX_bwa/chrX.fa ../SURA/chrX_bwa/chrX.sai ../SURA/chrX_bwa/chrX_1.fq > ../SURA/chrX_bwa/chrX.sam

it gave the following error:

[bam_header_read] invalid BAM binary header (this is not a BAM file). [bwa_read_seq] the maximum barcode length is 15.

On the basis of suggestions found on google, I even replaced '>' with '-f' but in vain.

Any idea how to correct it?

bwa next-gen sequencing • 4.5k views
ADD COMMENT
1
Entering edit mode

can you please post your prior index and aln commands? this could be an issue with the parameters given to bwa

ADD REPLY
1
Entering edit mode
13.5 years ago
Mitch Bekritsky ★ 1.3k

First guess...you say that you're aligning from chrX to the reference genome (I'm assuming hg19?) You're running your samse command against chrX only. You need to use the path to the reference genome you used for mapping.
This is because that path will contain all the BWA output files for the Burrows-Wheeler transform, which SAMSE uses to convert from .sai to .sam. Also, I'm not completely certain, but I think if you use a reference genome file with different sequences than your mapping, BWA will throw an error when it checks the headers from the alignment and sees that the sequences do not match.

The short of it is your BWA command may need to look something like this:

./bwa samse ../path/to/alignment/genome.fa ../SURA/chrX_bwa/chrX.sai ../SURA/chrX_bwa/chrX_1.fq > ../SURA/chrX_bwa/chrX.sam

If that doesn't work, or if I've made a bad assumption, let me know and I'll see if I can still help.

Doctoroots is right, knowing the command you used to perform bwa aln here would be very useful.

ADD COMMENT
0
Entering edit mode
13.5 years ago
Marvin ▴ 900

Did you run "bwa aln" on a BAM file, not a FastQ file? In that case, "bwa samse" wants to see that same BAM file. I think it tried to interpret ../SURA/chrX_bwa/chrX_1.fq as that BAM file and failed, naturally.

ADD COMMENT

Login before adding your answer.

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