Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ACEnglish committed Jan 7, 2024
1 parent 81a7d3e commit 33fefab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 0 additions & 2 deletions truvari/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
:meth:`chunker`
:meth:`cmd_exe`
:meth:`consolidate_phab_vcfs`
:meth:`coord_distance`
:meth:`count_entries`
:meth:`file_zipper`
:meth:`help_unknown_cmd`
Expand Down Expand Up @@ -102,7 +101,6 @@
)

from truvari.comparisons import (
coord_distance,
create_pos_haplotype,
entry_boundaries,
entry_distance,
Expand Down
7 changes: 1 addition & 6 deletions truvari/comparisons.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,9 @@ def entry_distance(entryA, entryB):
"""
astart, aend = entry_boundaries(entryA)
bstart, bend = entry_boundaries(entryB)
return coord_distance(astart, aend, bstart, bend)

def coord_distance(astart, aend, bstart, bend):
"""
Return start and end distances
"""
return astart - bstart, aend - bend


def entry_gt_comp(entryA, entryB, sampleA=None, sampleB=None):
"""
Compare the genotypes of two entries
Expand Down
4 changes: 2 additions & 2 deletions truvari/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def build_match(self, base, comp, matid=None, skip_gt=False, short_circuit=False
ret.comp_gt_count = sum(1 for _ in ret.comp_gt if _ == 1)
ret.gt_match = abs(ret.base_gt_count - ret.comp_gt_count)

ret.ovlpct = truvari.reciprocal_overlap(bstart, bend, cstart, cend)
ret.ovlpct = truvari.entry_reciprocal_overlap(base, comp)
if ret.ovlpct < self.params.pctovl:
logging.debug("%s and %s overlap percent is too low (%.3f)",
str(base), str(comp), ret.ovlpct)
Expand All @@ -243,7 +243,7 @@ def build_match(self, base, comp, matid=None, skip_gt=False, short_circuit=False
else:
ret.seqsim = 0

ret.st_dist, ret.ed_dist = truvari.coord_distance(bstart, bend, cstart, cend)
ret.st_dist, ret.ed_dist = bstart - cstart, bend - cend
ret.calc_score()

return ret
Expand Down

0 comments on commit 33fefab

Please sign in to comment.