]> git.donarmstrong.com Git - samtools.git/commitdiff
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 c7059983af944c4724e182c4caa6c8f452750eca..24728dbe1515e7cc1171a8cc08f842bafa167d5e 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 0af5955ebdd0078280654845b2010a4a1d92ad33..e3d6b5eb42fee41bb3b2e8f392b5ae38d1934bc5 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;
         }