BAM index file generated by GATK
After running through recalibrartion of a BAM file, GATK (BaseRecalibrator and PrintReads), a BAM file and its index file are generated. When I try to use samtools idxstats to have a statistics on the mapped results, all the information are 0 as below.
chr1 249250621 0 0
chr2 243199373 0 0
chr3 198022430 0 0
chr4 191154276 0 0
chr5 180915260 0 0
When I try to index the recalibrarted BAM using latest samtools and then samtools idxstats gives the correct statistics from the BAM file.
How does GATK generates BAM index (*.bam.bai) file? Are you using samtools to create BAM index? I guess many users are having similar issues when trying to get BAM file statistics. Thanks.