I need to slice my bam file to look at the reads in a small region using IGV. I used samtools version 0.1.18 to do that but I am having problem indexing the .bam file, here is what I did
samtools view myfile.bam chr2:20,100,000-20,200,000 > outfile.bam
samtools index outfile.bam
I am getting the following error message
[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
Segmentation fault (core dumped)
Any ideas?
samtools view myfile.bam chr2:20,100,000-20,200,000 > outfile.bam
samtools index outfile.bam
I am getting the following error message
[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
Segmentation fault (core dumped)
Any ideas?
Comment