X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bamtk.c;h=a9d852d49060732f9f543e936c267ab3f9f3fe5d;hb=17d530d96c290e6e3956c034117dce8f39480edd;hp=a4863530b4e4989cb6f887317b0d6f022f7aa5f5;hpb=35f8bc04b365e9fdb2556aa7a1cfc9badfbc5e0f;p=samtools.git diff --git a/bamtk.c b/bamtk.c index a486353..a9d852d 100644 --- a/bamtk.c +++ b/bamtk.c @@ -3,7 +3,7 @@ #include "bam.h" #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "0.1.2-15" +#define PACKAGE_VERSION "0.1.2-22" #endif int bam_taf2baf(int argc, char *argv[]); @@ -56,7 +56,12 @@ int bam_view(int argc, char *argv[]) bam_header_write(fpout, header); } if (is_header || is_headeronly) { - int i; + int i, c; + c = header->text[header->l_text-1]; + header->text[header->l_text-1] = 0; + printf("%s", header->text); + if (c) putchar(c); + header->text[header->l_text-1] = c; for (i = 0; i < header->n_targets; ++i) printf("@SQ\tSN:%s\tLN:%d\n", header->target_name[i], header->target_len[i]); if (is_headeronly) {