Skip to content

Commit

Permalink
Fix bug and add assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Jan 14, 2024
1 parent a62afde commit 543c29f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/tests/beagle_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +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.
est_gen_pos[i] = fa + (pos[i] - a) / (b - a) * (fa - fb)
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."
est_gen_pos[i] = fa + (pos[i] - a) / (b - a) * (fb - fa)
return est_gen_pos


Expand Down

0 comments on commit 543c29f

Please sign in to comment.