]> git.donarmstrong.com Git - samtools.git/blobdiff - bam_index.c
* samtools-0.1.4-16 (r360)
[samtools.git] / bam_index.c
index 4a41f5264a67148c75f1f9be6d7e6880e5b848a6..347189d63e397d4d433cc42783aea3a07545e9e2 100644 (file)
@@ -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);