]> git.donarmstrong.com Git - samtools.git/blobdiff - bam_plcmd.c
* put version number in bam.h
[samtools.git] / bam_plcmd.c
index 2c333e8c668cb1a48464637d2e56e2e3984d7269..bba62cbcdcabe52cbdba71ab71a6b2e5681aa032 100644 (file)
@@ -701,7 +701,8 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
                bh->l_smpl = s.l;
                bh->sname = malloc(s.l);
                memcpy(bh->sname, s.s, s.l);
-               bh->l_txt = 0;
+               bh->txt = malloc(strlen(BAM_VERSION) + 64);
+               bh->l_txt = 1 + sprintf(bh->txt, "##samtoolsVersion=%s\n", BAM_VERSION);
                free(s.s);
                bcf_hdr_sync(bh);
                bcf_hdr_write(bp, bh);