Skip to content

Commit

Permalink
dont make distance negative
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Jun 30, 2023
1 parent eb1136e commit 0ad787e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion intact/intact.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ def find_candidate_positions(e, q_start, q_end):
closest_start_a = q_start_a if not has_start_codon else find_closest(aminoacids, q_start_a, start_direction, 'M')
closest_end_a = q_end_a if not has_stop_codon else find_closest(aminoacids, q_end_a, end_direction, '*')
got_aminoacids = aminoacids[closest_start_a:closest_end_a + 1]
dist = -1 * jaro_similarity(got_aminoacids, expected_aminoacids)
dist = 1 - jaro_similarity(got_aminoacids, expected_aminoacids)
closest_start = min(n, (closest_start_a * 3) + frame)
closest_end = min(n + 1, (closest_end_a * 3) + 3 + frame)
yield CandidateORF(closest_start, closest_end, "forward",
Expand Down

0 comments on commit 0ad787e

Please sign in to comment.