Problem on indexing of sorted BAM file
0
0
Entering edit mode
6.5 years ago
Gaurab2017 • 0

Hi,

I have a problem with indexing the sorted BAM file in bwa alignment. I gave the command like this

samtools index ~/Desktop/Ruelliasorted.sorted.BAM

and says that

EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[bam_index_core] Invalid BAM header.[bam_index_build2] fail to index the BAM file.

I need help to figure it out. Anybody out there? Thanks in advance

bwa • 3.0k views
ADD COMMENT
1
Entering edit mode

your file Ruelliasorted.sorted.BAM is broken. you can test this with:

gunzip -t ~/Desktop/Ruelliasorted.sorted.BAM && echo OK
ADD REPLY
0
Entering edit mode

Thanks Pierre So, do I have to re-sort it or anything else?

ADD REPLY
1
Entering edit mode

There was something wrong with the way you have generated your bam. I don't know your workflow. Re-generate your bam.

ADD REPLY
1
Entering edit mode

[bam_header_read] invalid BAM binary header (this is not a BAM file).

As the log said you have to check wether your file is realy a bam file. How did you generate it? As you tagged this post with bwa: The output of bwa is sam and not bam. For converting you can use

samtools view -b alignment.sam > alignment.bam

fin swimmer

ADD REPLY

Login before adding your answer.

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