From ce14f3df8a5356e711949efb243d2e78b8e38e5e Mon Sep 17 00:00:00 2001 From: Heng Li Date: Mon, 9 Aug 2010 17:05:07 +0000 Subject: [PATCH] do not print refname if file is converted from VCF --- bcftools/bcf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bcftools/bcf.c b/bcftools/bcf.c index fdc13b8..2cb9876 100644 --- a/bcftools/bcf.c +++ b/bcftools/bcf.c @@ -208,7 +208,9 @@ void bcf_fmt_core(const bcf_hdr_t *h, bcf1_t *b, kstring_t *s) { int i, j, x; s->l = 0; - kputs(h->ns[b->tid], s); kputc('\t', s); + if (h->n_ref) kputs(h->ns[b->tid], s); + else kputw(b->tid, s); + kputc('\t', s); kputw(b->pos + 1, s); kputc('\t', s); fmt_str(b->str, s); kputc('\t', s); fmt_str(b->ref, s); kputc('\t', s); -- 2.39.5