From: Heng Li Date: Thu, 24 Feb 2011 14:35:06 +0000 (+0000) Subject: * automatically fix errors in GL X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c8e59c53055a63e697e98a5942a2d811eb4db5b9;p=samtools.git * automatically fix errors in GL * output unrecognized FORMAT as "." --- diff --git a/bcftools/bcf.c b/bcftools/bcf.c index b749847..88ba1ba 100644 --- a/bcftools/bcf.c +++ b/bcftools/bcf.c @@ -259,7 +259,7 @@ void bcf_fmt_core(const bcf_hdr_t *h, bcf1_t *b, kstring_t *s) if (k > 0) kputc(',', s); ksprintf(s, "%.2f", d[k]); } - } + } else kputc('.', s); // custom fields } } } diff --git a/bcftools/vcf.c b/bcftools/vcf.c index 6d3abaa..d8cb1e6 100644 --- a/bcftools/vcf.c +++ b/bcftools/vcf.c @@ -224,7 +224,7 @@ int vcf_read(bcf_t *bp, bcf_hdr_t *h, bcf1_t *b) y = b->n_alleles * (b->n_alleles + 1) / 2; for (j = 0; j < y; ++j) { x = strtod(q, &q); - data[(k-9) * y + j] = x; + data[(k-9) * y + j] = x > 0? -x/10. : x; ++q; } }