Skip to content

Commit

Permalink
pylint and test files
Browse files Browse the repository at this point in the history
  • Loading branch information
ACEnglish committed Feb 4, 2024
1 parent d5b282a commit b1f2e01
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions repo_utils/test_files/beds/boundary_cpx.bed
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
reference 10 20
reference 110 120
reference2 10 20
Binary file added repo_utils/test_files/variants/boundary_cpx.vcf.gz
Binary file not shown.
Binary file not shown.
7 changes: 3 additions & 4 deletions truvari/region_vcf_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def region_filter(vcf, tree, inside=True):
cur_tree = deque(sorted(cur_tree))
try:
cur_intv = cur_tree.popleft()
except IndexError as e:
except IndexError:
# region-less chromosome
continue

Expand All @@ -182,12 +182,12 @@ def region_filter(vcf, tree, inside=True):
if start > cur_intv.end - 1:
try:
cur_intv = cur_tree.popleft()
except IndexError as e:
except IndexError:
if not inside:
yield entry
continue
# next chromosome
break
break

# well before
if end < cur_intv.begin:
Expand All @@ -199,4 +199,3 @@ def region_filter(vcf, tree, inside=True):
is_within = truvari.coords_within(start, end, cur_intv.begin, cur_intv.end - 1, end_within)
if is_within == inside:
yield entry

0 comments on commit b1f2e01

Please sign in to comment.