]> git.donarmstrong.com Git - samtools.git/commitdiff
bcftools view: always output the header, even when no other arguments are given
authorPetr Danecek <pd3@sanger.ac.uk>
Fri, 1 Mar 2013 13:14:32 +0000 (13:14 +0000)
committerPetr Danecek <pd3@sanger.ac.uk>
Fri, 1 Mar 2013 13:14:32 +0000 (13:14 +0000)
bam_tview.c
bcftools/call1.c

index ede6b0c87f57d17ad25b5933da85cedd881f719b..06d5e3330ce586cbbbd1eb698176130a52c554b6 100644 (file)
@@ -284,9 +284,9 @@ static void error(const char *format, ...)
         fprintf(stderr, "\n");
         fprintf(stderr, "Usage: bamtk tview [options] <aln.bam> [ref.fasta]\n");
         fprintf(stderr, "Options:\n");
+        fprintf(stderr, "   -d display      output as (H)tml or (C)urses or (T)ext \n");
         fprintf(stderr, "   -p chr:pos      go directly to this position\n");
         fprintf(stderr, "   -s STR          display only reads from this sample or group\n");
-        fprintf(stderr, "   -d display      (H)tml or (C)urses or (T)ext \n");
         fprintf(stderr, "\n\n");
     }
     else
index 14a1570a13d6820152359e583c9c69d42d1021dd..5f32c34bf1850b840c5f250c0ad0c690fe1a2f88 100644 (file)
@@ -436,7 +436,7 @@ int bcfview(int argc, char *argv[])
                        vc.sublist = calloc(vc.n_sub, sizeof(int));
                        hout = bcf_hdr_subsam(hin, vc.n_sub, vc.subsam, vc.sublist);
                }
-               if (vc.flag & VC_CALL) write_header(hout);
+               write_header(hout); // always print the header
                vcf_hdr_write(bout, hout);
        }
        if (vc.flag & VC_CALL) {