Skip to content

Commit a2cf60d

Browse files
committed
r1270: bugfix - @hd not at the top
resolves #442
1 parent cd0517a commit a2cf60d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

bwa.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ void bwa_print_sam_hdr(const bntseq_t *bns, const char *hdr_line)
422422
p += 4;
423423
}
424424
}
425+
if (n_HD == 0) err_printf("@HD\tVN:1.5\tSO:unsorted\tGO:query\n");
425426
if (n_SQ == 0) {
426427
for (i = 0; i < bns->n_seqs; ++i) {
427428
err_printf("@SQ\tSN:%s\tLN:%d", bns->anns[i].name, bns->anns[i].len);
@@ -430,9 +431,6 @@ void bwa_print_sam_hdr(const bntseq_t *bns, const char *hdr_line)
430431
}
431432
} else if (n_SQ != bns->n_seqs && bwa_verbose >= 2)
432433
fprintf(stderr, "[W::%s] %d @SQ lines provided with -H; %d sequences in the index. Continue anyway.\n", __func__, n_SQ, bns->n_seqs);
433-
if (n_HD == 0) {
434-
err_printf("@HD\tVN:1.5\tSO:unsorted\tGO:query\n");
435-
}
436434
if (hdr_line) err_printf("%s\n", hdr_line);
437435
if (bwa_pg) err_printf("%s\n", bwa_pg);
438436
}

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "utils.h"
3131

3232
#ifndef PACKAGE_VERSION
33-
#define PACKAGE_VERSION "0.7.18-r1243-dirty"
33+
#define PACKAGE_VERSION "0.7.18-r1270-dirty"
3434
#endif
3535

3636
int bwa_fa2pac(int argc, char *argv[]);

0 commit comments

Comments
 (0)