Segmentation fault (core dumped) with Samtools index sorted.bam
1
0
Entering edit mode
7.2 years ago
deepak643 • 0

I am trying to create an index file for the sorted bam. But I am getting the error "Segmentation fault (core dumped)".

Samtools sort command was successful.

Samtools flagstat command shows up the following:

17882888 + 1 in total (QC-passed reads + QC-failed reads)  
0 + 0 duplicates  
17882888 + 1 mapped (100.00%:100.00%)
0 + 0 paired in sequencing
0 + 0 read1
0 + 0 read2
0 + 0 properly paired (-nan%:-nan%)
0 + 0 with itself and mate mapped
0 + 0 singletons (-nan%:-nan%)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)

...

I do not understand why the index command fails. Is the bam file I am working with is corrupted? How can I make sure of it? Samtools version I am using is "Version: 0.1.18 (r982:295)".

I was wondering if anyone can help me out.

Thank you!

samtools index bam • 3.6k views
ADD COMMENT
0
Entering edit mode
7.2 years ago

Version 0.1.18 is truly ancient, please upgrade. If you still get a segfault with a recent version then something is wrong with you BAM file. I would then samtools view -h original.bam | samtools view -bo new.bam - to generate a new copy of the file and then index that.

ADD COMMENT
0
Entering edit mode

Original.bam in the sense sorted.bam?

ADD REPLY
0
Entering edit mode

Yes, whatever it's called.

ADD REPLY

Login before adding your answer.

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