Skip to content

Commit

Permalink
off-by-one error
Browse files Browse the repository at this point in the history
in stratify. Messed with truvari refine
  • Loading branch information
ACEnglish committed Aug 29, 2024
1 parent a39ce0a commit ffa0e81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions truvari/stratify.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ def count_entries(vcf, chroms, regions, within):
for idx, row in enumerate(zip(chroms, regions)):
chrom, coords = row
start, end = coords
end += 1
tree[chrom].addi(start, end + 1)
counts_idx[(chrom, start, end)] = idx
for _, location in truvari.region_filter(vcf, tree, within, True):
for _, location in truvari.region_filter(vcf, tree, inside=within, with_region=True):
key = (location[0], location[1].begin, location[1].end - 1)
counts[counts_idx[key]] += 1
return counts
Expand Down

0 comments on commit ffa0e81

Please sign in to comment.