From: Petr Danecek Date: Wed, 18 Jul 2012 12:06:57 +0000 (+0100) Subject: Fix in output of missing haploid genotypes X-Git-Url: https://git.donarmstrong.com/?p=samtools.git;a=commitdiff_plain;h=da45f88bac09817fcd87916d3e104f0e4bc53874 Fix in output of missing haploid genotypes --- diff --git a/bcftools/bcf.c b/bcftools/bcf.c index c705998..24728db 100644 --- a/bcftools/bcf.c +++ b/bcftools/bcf.c @@ -269,7 +269,7 @@ void bcf_fmt_core(const bcf_hdr_t *h, bcf1_t *b, kstring_t *s) if ( ploidy==1 ) { if ( y>>7&1 ) - kputsn(".", 3, s); + kputc('.', s); else kputc('0' + (y>>3&7), s); } diff --git a/bcftools/prob1.c b/bcftools/prob1.c index 0af5955..e3d6b5e 100644 --- a/bcftools/prob1.c +++ b/bcftools/prob1.c @@ -401,7 +401,7 @@ int call_multiallelic_gt(bcf1_t *b, bcf_p1aux_t *ma, double threshold) lk = -log(1-lk/lk_sum)/0.2302585; if ( idp>=0 && ((uint16_t*)b->gi[idp].data)[isample]==0 ) { - ((uint8_t*)b->gi[old_n_gi].data)[isample] = als | 1<<7; + ((uint8_t*)b->gi[old_n_gi].data)[isample] = 1<<7; ((uint8_t*)b->gi[old_n_gi+1].data)[isample] = 0; continue; }