Skip to content

Commit

Permalink
Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Jan 14, 2024
1 parent 2ca9c8f commit 6ff4b98
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/tests/beagle_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ def convert_to_genetic_map_positions(pos, genetic_map=None):
for i in range(len(pos)):
a = genetic_map.base_pos[
left_idx[i] - 1
] # Physical position at left of marker i
b = genetic_map.base_pos[left_idx[i]] # Physical position at right of marker i
] # Physical position at left of marker i.
b = genetic_map.base_pos[left_idx[i]] # Physical position at right of marker i.
fa = genetic_map.gen_pos[
left_idx[i] - 1
] # Genetic map position at left of marker i
] # Genetic map position at left of marker i.
fb = genetic_map.gen_pos[
left_idx[i]
] # Genetic map position at right of marker i
] # Genetic map position at right of marker i.
est_gen_pos[i] = fa + (pos[i] - a) / (b - a) * (fa - fb)
return est_gen_pos

Expand All @@ -90,7 +90,7 @@ def get_weights(genotyped_pos, ungenotyped_pos, genotyped_cm, ungenotyped_cm):
:return: Weights and marker interval start indices.
:rtype: tuple(numpy.ndarray, numpy.ndarray)
"""
MIN_CM_DIST = 1e-7 # See `ImpData.java` in BEAGLE 4.1 source code
MIN_CM_DIST = 1e-7 # See `ImpData.java` in BEAGLE 4.1 source code.
m = len(genotyped_pos)
x = len(ungenotyped_pos)
# Calculate weights for ungenotyped markers.
Expand Down

0 comments on commit 6ff4b98

Please sign in to comment.