Skip to content

Commit

Permalink
fix stratify
Browse files Browse the repository at this point in the history
standardizing when a variant is considered within a region failed to
also update the stratify commands which caused variants with end
positions on includebed boundaries to be missed.
  • Loading branch information
ACEnglish committed Jul 31, 2024
1 parent 251cf6b commit 3b55a8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions truvari/stratify.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ def count_entries(vcf, chroms, regions, within):
chrom, coords = row
start, end = coords
end += 1
tree[chrom].addi(start, end)
tree[chrom].addi(start, end + 1)
counts_idx[(chrom, start, end)] = idx
for _, location in truvari.region_filter(vcf, tree, within, True):
key = (location[0], location[1].begin, location[1].end)
key = (location[0], location[1].begin, location[1].end - 1)
counts[counts_idx[key]] += 1
return counts

Expand Down

0 comments on commit 3b55a8e

Please sign in to comment.