Skip to content

Commit

Permalink
Fix inequality and show values in asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Jan 14, 2024
1 parent 45813f1 commit cd324d6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/tests/beagle_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ def convert_to_genetic_map_positions(pos, genetic_map=None):
fb = genetic_map.gen_pos[
left_idx[i]
] # Genetic map position at right of marker i.
assert pos[i] > a, "Query position not greater than left-bound position."
assert b > a, "Physical positions not in ascending order."
assert fb > fa, "Genetic map positions not in ascending order."
assert pos[i] >= a, f"Query position not >= left-bound position: {pos[i]}, {a}."
# TODO: Assert when instantiating GeneticMap.
assert b > a, f"Physical positions not in ascending order: {b}, {a}."
assert fb > fa, f"Genetic map positions not in ascending order: {fb}, {fa}."
est_gen_pos[i] = fa + (pos[i] - a) / (b - a) * (fb - fa)
return est_gen_pos

Expand Down

0 comments on commit cd324d6

Please sign in to comment.