Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcf_set_variant_type does not correct set type BND for reverse strand breakends #1455

Closed
mp15 opened this issue Jun 16, 2022 · 0 comments · Fixed by #1456
Closed

bcf_set_variant_type does not correct set type BND for reverse strand breakends #1455

mp15 opened this issue Jun 16, 2022 · 0 comments · Fixed by #1456

Comments

@mp15
Copy link
Member

mp15 commented Jun 16, 2022

htslib/vcf.c

Lines 4182 to 4199 in 58d9f60

const char *r = ref, *a = alt;
while (*r && *a && toupper_c(*r)==toupper_c(*a) ) { r++; a++; } // unfortunately, matching REF,ALT case is not guaranteed
if ( *a && !*r )
{
if ( *a==']' || *a=='[' ) { var->type = VCF_BND; return; }
while ( *a ) a++;
var->n = (a-alt)-(r-ref); var->type = VCF_INDEL; return;
}
else if ( *r && !*a )
{
while ( *r ) r++;
var->n = (a-alt)-(r-ref); var->type = VCF_INDEL; return;
}
else if ( !*r && !*a )
{
var->n = 0; var->type = VCF_REF; return;
}

A forward strand breakend like:
REF N
ALT N]16:33625444]
will be correctly detected as VCF_BND.

A reverse strand breakend like:
REF N
ALT [16:33531168[N
will be incorrectly detected as VCF_INDEL.

This is because it should be working right to left for the reverse strand INDEL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant