Skip to content

Commit

Permalink
region iter tweak
Browse files Browse the repository at this point in the history
extra safety
  • Loading branch information
ACEnglish committed Feb 3, 2025
1 parent b6c904d commit 384a934
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion truvari/region_vcf_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ def region_filter_stream(vcf, tree, inside=True, with_region=False):
ret_type = (lambda x, y, z: (x, (y, z))
) if with_region else (lambda x, y, z: x)
for chrom in chroms:
cur_tree = deque(sorted(tree[chrom]))
try:
cur_tree = deque(sorted(tree[chrom]))
cur_intv = cur_tree.popleft()
except (IndexError, KeyError):
# region-less chromosome
Expand Down

0 comments on commit 384a934

Please sign in to comment.