From ccf971ad7816989e36527cb70adf04a16745d9ce Mon Sep 17 00:00:00 2001 From: Shing Zhan Date: Wed, 20 Sep 2023 12:47:13 +0100 Subject: [PATCH] Clarify doc --- python/tests/beagle.py | 5 +++-- python/tests/beagle_numba.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/python/tests/beagle.py b/python/tests/beagle.py index d2fd8d2c3e..e60f4ca198 100644 --- a/python/tests/beagle.py +++ b/python/tests/beagle.py @@ -48,7 +48,8 @@ def convert_to_genetic_map_position(pos): """ Convert genomic site positions (bp) to genetic map positions (cM). - In BEAGLE 4.1, when a genetic map is not specified, it is assumed that 1 Mbp = 1cM. + In BEAGLE 4.1, when a genetic map is not specified, it is assumed + that the recombination rate is constant (1 cM / 1 Mb). This trivial function is meant for documentation. @@ -57,7 +58,7 @@ def convert_to_genetic_map_position(pos): :rtype: numpy.ndarray """ assert 0 < np.min(pos), "Site positions are not 1-based or invalid." - return pos / 1e6 + return pos / 1e6 # Convert to Mb def get_weights(genotyped_pos, ungenotyped_pos): diff --git a/python/tests/beagle_numba.py b/python/tests/beagle_numba.py index 7e1264ba50..a8b01e9868 100644 --- a/python/tests/beagle_numba.py +++ b/python/tests/beagle_numba.py @@ -14,7 +14,8 @@ def convert_to_genetic_map_position(pos): """ Convert genomic site positions (bp) to genetic map positions (cM). - In BEAGLE 4.1, when a genetic map is not specified, it is assumed that 1 Mbp = 1cM. + In BEAGLE 4.1, when a genetic map is not specified, it is assumed + that the recombination rate is constant (1 cM / 1 Mb). This trivial function is meant for documentation. @@ -22,7 +23,7 @@ def convert_to_genetic_map_position(pos): :return: Genetic map positions. :rtype: numpy.ndarray """ - return pos / 1e6 + return pos / 1e6 # Convert to Mb @njit