Skip to content

Commit

Permalink
Don't bail on symbolic ALTs
Browse files Browse the repository at this point in the history
which can be veru long, just trim the maximum number of annotation
lines in the buffer.
  • Loading branch information
pd3 committed Aug 26, 2021
1 parent cc737e8 commit bb1e6b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vcfannotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2921,6 +2921,7 @@ static void buffer_annot_lines(args_t *args, bcf1_t *line, int start_pos, int en

while ( !bcf_sr_regions_overlap(args->tgts, bcf_seqname(args->hdr,line), start_pos,end_pos) )
{
if ( args->nalines + 1 == 0xffff ) break; // likely a symbolic allele, don't let the buffer overflow
args->nalines++;
hts_expand0(annot_line_t,args->nalines,args->malines,args->alines);
annot_line_t *tmp = &args->alines[args->nalines-1];
Expand Down

0 comments on commit bb1e6b8

Please sign in to comment.