Fix in output of missing haploid genotypes
authorPetr Danecek <pd3@sanger.ac.uk>
Wed, 18 Jul 2012 12:06:57 +0000 (13:06 +0100)
committerPetr Danecek <pd3@sanger.ac.uk>
Wed, 18 Jul 2012 12:06:57 +0000 (13:06 +0100)
bcftools/bcf.c
bcftools/prob1.c

index c705998..24728db 100644 (file)
@@ -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);
                 }
index 0af5955..e3d6b5e 100644 (file)
@@ -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;
         }