[med-svn] [htslib] 03/05: vcf: Update rlen on BCF output, this is important in BCF indexing, rlen is used as it is. Todo: also END should be checked with symbolic alleles

Charles Plessy plessy at moszumanska.debian.org
Fri Nov 22 05:01:09 UTC 2013


This is an automated email from the git hooks/post-receive script.

plessy pushed a commit to branch debian/unstable
in repository htslib.

commit 18a5382e23c3c8e27f152a4cdf7306d2339ea730
Author: Petr Danecek <pd3 at sanger.ac.uk>
Date:   Wed Nov 20 15:47:50 2013 +0000

    vcf: Update rlen on BCF output, this is important in BCF indexing, rlen is used as it is. Todo: also END should be checked with symbolic alleles
---
 vcf.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/vcf.c b/vcf.c
index 680448a..3ec380a 100644
--- a/vcf.c
+++ b/vcf.c
@@ -656,6 +656,7 @@ static inline void bcf1_sync_alleles(bcf1_t *line, kstring_t *str)
     int i;
     for (i=0; i<line->n_allele; i++)
         bcf_enc_vchar(str, strlen(line->d.allele[i]), line->d.allele[i]);
+    line->rlen = line->n_allele ? strlen(line->d.allele[0]) : 0;     // beware: this neglects SV's END tag
 }
 static inline void bcf1_sync_filter(bcf1_t *line, kstring_t *str)
 {
@@ -727,7 +728,10 @@ static int bcf1_sync(bcf1_t *line)
         if ( line->d.shared_dirty & BCF1_DIRTY_ALS ) 
             bcf1_sync_alleles(line, &tmp);
         else
+        {
+            line->rlen = line->n_allele ? strlen(line->d.allele[0]) : 0;     // beware: this neglects SV's END tag
             kputsn_(ptr_ori, size, &tmp);
+        }
         ptr_ori += size;
 
         // FILTER: typed vector of integers

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/htslib.git



More information about the debian-med-commit mailing list