1. Modified vcf_parse to update rlen only when an END INFO tag is seen -

Issue: https://github.com/broadinstitute/gamgee/issues/191
1. Modified vcf_parse to update rlen only when an END INFO tag is seen -the END tag is NOT encoded into v->shared.s
2. Modified vcf_write to add END INFO tag if required

Good question.  The END tag is *not* required.  So a record can have a
symbolic alt allele but no END (this would happen when e.g. the end isn't
known because it's such a complex event).


On Wed, Sep 10, 2014 at 3:20 PM, kgururaj <notifications@github.com> wrote:

> In vcf.c:
>
> > @@ -1993,6 +2002,12 @@ int vcf_format(const bcf_hdr_t *h, const bcf1_t *v, kstring_t *s)
> >  {
> >      int i;
> >      bcf_unpack((bcf1_t*)v, BCF_UN_ALL);
> > +    //2 alleles, first is REF and 2nd is NON_REF and rlen > 1, update END tag in INFO
> > +    if(v->n_allele == 2 &&  v->rlen > 1 && (strcmp(v->d.allele[1], "<NON_REF>") == 0))
>
> @eitanbanks <https://github.com/eitanbanks> question about the second
> condition: "if there is more than 1 alt allele and 1 of them is symbolic
> (but not or ), then an END signifies a block."
> If there is more than 1 alt allele and one of them is symbolic, is it
> required to have an END INFO field? Another way of framing the question is,
> can there be a symbolic alt allele for a single location VCF record? I am
> assuming yes, but just want to confirm.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/broadinstitute/htslib/pull/5/files#r17382533>.
>