X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=bam_index.c;h=347189d63e397d4d433cc42783aea3a07545e9e2;hb=3ddb3942053df00fdae714e77cbc2f5618db617e;hp=4a41f5264a67148c75f1f9be6d7e6880e5b848a6;hpb=34c418836df8a03e0eb5243b9240f55abab5bd08;p=samtools.git diff --git a/bam_index.c b/bam_index.c index 4a41f52..347189d 100644 --- a/bam_index.c +++ b/bam_index.c @@ -155,7 +155,8 @@ bam_index_t *bam_index_core(bamFile fp) last_tid = c->tid; last_bin = 0xffffffffu; } else if (last_coor > c->pos) { - fprintf(stderr, "[bam_index_core] the alignment is not sorted. Abort!\n"); + fprintf(stderr, "[bam_index_core] the alignment is not sorted (%s): %u > %u in %d-th chr\n", + bam1_qname(b), last_coor, c->pos, c->tid+1); exit(1); } if (b->core.tid >= 0 && b->core.bin < 4681) insert_offset2(&idx->index2[b->core.tid], b, last_off);