@@ -455,6 +455,7 @@ def compute_next_probability(self, site_id, p_next, is_match, node):
455
455
def process_site (self , site , haplotype_state , s ):
456
456
# FIXME see nodes in the C code for why we have two calls to
457
457
# compress
458
+ # https://github.com/tskit-dev/tskit/issues/2803
458
459
self .compress ()
459
460
self .output .store_site (
460
461
site .id ,
@@ -928,7 +929,7 @@ def verify(self, ts):
928
929
np .flip (H , axis = 0 ),
929
930
np .flip (s , axis = 1 ),
930
931
r_flip ,
931
- mutation_rate = np .flip (mu ),
932
+ p_mutation = np .flip (mu ),
932
933
scale_mutation_based_on_n_alleles = False ,
933
934
)
934
935
@@ -952,7 +953,7 @@ def verify(self, ts):
952
953
H ,
953
954
s ,
954
955
r ,
955
- mutation_rate = mu ,
956
+ p_mutation = mu ,
956
957
scale_mutation_based_on_n_alleles = scale_mutation ,
957
958
)
958
959
# Note, need to remove the first sample from the ts, and ensure
@@ -977,14 +978,14 @@ class TestForwardBackwardTree(FBAlgorithmBase):
977
978
def verify (self , ts ):
978
979
for n , H , s , r , mu in self .example_parameters_haplotypes (ts ):
979
980
F , c , ll = ls .forwards (
980
- H , s , r , mutation_rate = mu , scale_mutation_based_on_n_alleles = False
981
+ H , s , r , p_mutation = mu , scale_mutation_based_on_n_alleles = False
981
982
)
982
983
B = ls .backwards (
983
984
H ,
984
985
s ,
985
986
c ,
986
987
r ,
987
- mutation_rate = mu ,
988
+ p_mutation = mu ,
988
989
scale_mutation_based_on_n_alleles = False ,
989
990
)
990
991
@@ -1017,7 +1018,7 @@ class TestTreeViterbiHap(VitAlgorithmBase):
1017
1018
def verify (self , ts ):
1018
1019
for n , H , s , r , mu in self .example_parameters_haplotypes (ts ):
1019
1020
path , ll = ls .viterbi (
1020
- H , s , r , mutation_rate = mu , scale_mutation_based_on_n_alleles = False
1021
+ H , s , r , p_mutation = mu , scale_mutation_based_on_n_alleles = False
1021
1022
)
1022
1023
ts_check = ts .simplify (range (1 , n + 1 ), filter_sites = False )
1023
1024
cm = ls_viterbi_tree (s [0 , :], ts_check , r , mu )
@@ -1032,7 +1033,7 @@ def verify(self, ts):
1032
1033
s ,
1033
1034
path_tree ,
1034
1035
r ,
1035
- mutation_rate = mu ,
1036
+ p_mutation = mu ,
1036
1037
scale_mutation_based_on_n_alleles = False ,
1037
1038
)
1038
1039
self .assertAllClose (ll , ll_check )
@@ -1055,7 +1056,7 @@ def check_viterbi(ts, h, recombination=None, mutation=None):
1055
1056
G ,
1056
1057
h .reshape (1 , m ),
1057
1058
recombination ,
1058
- mutation_rate = mutation ,
1059
+ p_mutation = mutation ,
1059
1060
scale_mutation_based_on_n_alleles = False ,
1060
1061
)
1061
1062
assert np .isscalar (ll )
@@ -1073,7 +1074,7 @@ def check_viterbi(ts, h, recombination=None, mutation=None):
1073
1074
h .reshape (1 , m ),
1074
1075
path_tree ,
1075
1076
recombination ,
1076
- mutation_rate = mutation ,
1077
+ p_mutation = mutation ,
1077
1078
scale_mutation_based_on_n_alleles = False ,
1078
1079
)
1079
1080
nt .assert_allclose (ll_check , ll )
@@ -1109,7 +1110,7 @@ def check_forward_matrix(ts, h, recombination=None, mutation=None):
1109
1110
G ,
1110
1111
h .reshape (1 , m ),
1111
1112
recombination ,
1112
- mutation_rate = mutation ,
1113
+ p_mutation = mutation ,
1113
1114
scale_mutation_based_on_n_alleles = False ,
1114
1115
)
1115
1116
assert F .shape == (m , n )
@@ -1154,7 +1155,7 @@ def check_backward_matrix(ts, h, forward_cm, recombination=None, mutation=None):
1154
1155
h .reshape (1 , m ),
1155
1156
forward_cm .normalisation_factor ,
1156
1157
recombination ,
1157
- mutation_rate = mutation ,
1158
+ p_mutation = mutation ,
1158
1159
scale_mutation_based_on_n_alleles = False ,
1159
1160
)
1160
1161
0 commit comments