@@ -623,6 +623,7 @@ def run_interpolation_beagle(
623
623
ne = 1e6 ,
624
624
error_rate = 1e-4 ,
625
625
genetic_map = None ,
626
+ use_threshold = False ,
626
627
):
627
628
"""
628
629
Perform a simplified version of the procedure of interpolation-style imputation
@@ -644,6 +645,7 @@ def run_interpolation_beagle(
644
645
:param int ne: Effective population size (default = 1e6).
645
646
:param float error_rate: Allele error rate (default = 1e-4).
646
647
:param GeneticMap genetic_map: Genetic map (default = None).
648
+ :param bool use_threshold: Set trivial probabilities to 0 if True (default = False).
647
649
:return: Imputed alleles and their probabilities.
648
650
:rtype: tuple(numpy.ndarray, numpy.ndarray)
649
651
"""
@@ -694,7 +696,7 @@ def run_interpolation_beagle(
694
696
pos_untyped = pos_untyped ,
695
697
cm_typed = cm_typed ,
696
698
cm_untyped = cm_untyped ,
697
- use_threshold = False ,
699
+ use_threshold = use_threshold ,
698
700
return_weights = False ,
699
701
)
700
702
imputed_alleles , max_allele_probs = get_map_alleles (imputed_allele_probs )
@@ -710,6 +712,7 @@ def run_tsimpute(
710
712
error_rate = 1e-4 ,
711
713
precision = 10 ,
712
714
genetic_map = None ,
715
+ use_threshold = False ,
713
716
):
714
717
"""
715
718
Perform interpolation-style imputation, except that the forward and backward
@@ -744,6 +747,7 @@ def run_tsimpute(
744
747
:param float error_rate: Allelic error rate (default = 1e-4).
745
748
:param int precision: Precision for running LS HMM (default = 10).
746
749
:param GeneticMap genetic_map: Genetic map (default = None).
750
+ :param bool use_threshold: Set trivial probabilities to 0 if True (default = False).
747
751
:return: Imputed alleles and their probabilities.
748
752
:rtype: tuple(numpy.ndarray, numpy.ndarray)
749
753
"""
@@ -792,7 +796,7 @@ def run_tsimpute(
792
796
pos_untyped = pos_untyped ,
793
797
cm_typed = cm_typed ,
794
798
cm_untyped = cm_untyped ,
795
- use_threshold = False ,
799
+ use_threshold = use_threshold ,
796
800
return_weights = False ,
797
801
)
798
802
imputed_alleles , max_allele_probs = get_map_alleles (imputed_allele_probs )
0 commit comments