Skip to content

Commit 1d4f241

Browse files
committed
Pass use_threshold
1 parent edf6367 commit 1d4f241

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

python/tests/beagle_numba.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ def run_interpolation_beagle(
623623
ne=1e6,
624624
error_rate=1e-4,
625625
genetic_map=None,
626+
use_threshold=False,
626627
):
627628
"""
628629
Perform a simplified version of the procedure of interpolation-style imputation
@@ -644,6 +645,7 @@ def run_interpolation_beagle(
644645
:param int ne: Effective population size (default = 1e6).
645646
:param float error_rate: Allele error rate (default = 1e-4).
646647
:param GeneticMap genetic_map: Genetic map (default = None).
648+
:param bool use_threshold: Set trivial probabilities to 0 if True (default = False).
647649
:return: Imputed alleles and their probabilities.
648650
:rtype: tuple(numpy.ndarray, numpy.ndarray)
649651
"""
@@ -694,7 +696,7 @@ def run_interpolation_beagle(
694696
pos_untyped=pos_untyped,
695697
cm_typed=cm_typed,
696698
cm_untyped=cm_untyped,
697-
use_threshold=False,
699+
use_threshold=use_threshold,
698700
return_weights=False,
699701
)
700702
imputed_alleles, max_allele_probs = get_map_alleles(imputed_allele_probs)
@@ -710,6 +712,7 @@ def run_tsimpute(
710712
error_rate=1e-4,
711713
precision=10,
712714
genetic_map=None,
715+
use_threshold=False,
713716
):
714717
"""
715718
Perform interpolation-style imputation, except that the forward and backward
@@ -744,6 +747,7 @@ def run_tsimpute(
744747
:param float error_rate: Allelic error rate (default = 1e-4).
745748
:param int precision: Precision for running LS HMM (default = 10).
746749
:param GeneticMap genetic_map: Genetic map (default = None).
750+
:param bool use_threshold: Set trivial probabilities to 0 if True (default = False).
747751
:return: Imputed alleles and their probabilities.
748752
:rtype: tuple(numpy.ndarray, numpy.ndarray)
749753
"""
@@ -792,7 +796,7 @@ def run_tsimpute(
792796
pos_untyped=pos_untyped,
793797
cm_typed=cm_typed,
794798
cm_untyped=cm_untyped,
795-
use_threshold=False,
799+
use_threshold=use_threshold,
796800
return_weights=False,
797801
)
798802
imputed_alleles, max_allele_probs = get_map_alleles(imputed_allele_probs)

0 commit comments

Comments
 (0)