@@ -455,6 +455,7 @@ def compute_next_probability(self, site_id, p_next, is_match, node):
455455 def process_site (self , site , haplotype_state , s ):
456456 # FIXME see nodes in the C code for why we have two calls to
457457 # compress
458+ # https://github.com/tskit-dev/tskit/issues/2803
458459 self .compress ()
459460 self .output .store_site (
460461 site .id ,
@@ -928,7 +929,7 @@ def verify(self, ts):
928929 np .flip (H , axis = 0 ),
929930 np .flip (s , axis = 1 ),
930931 r_flip ,
931- mutation_rate = np .flip (mu ),
932+ p_mutation = np .flip (mu ),
932933 scale_mutation_based_on_n_alleles = False ,
933934 )
934935
@@ -952,7 +953,7 @@ def verify(self, ts):
952953 H ,
953954 s ,
954955 r ,
955- mutation_rate = mu ,
956+ p_mutation = mu ,
956957 scale_mutation_based_on_n_alleles = scale_mutation ,
957958 )
958959 # Note, need to remove the first sample from the ts, and ensure
@@ -977,14 +978,14 @@ class TestForwardBackwardTree(FBAlgorithmBase):
977978 def verify (self , ts ):
978979 for n , H , s , r , mu in self .example_parameters_haplotypes (ts ):
979980 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
981982 )
982983 B = ls .backwards (
983984 H ,
984985 s ,
985986 c ,
986987 r ,
987- mutation_rate = mu ,
988+ p_mutation = mu ,
988989 scale_mutation_based_on_n_alleles = False ,
989990 )
990991
@@ -1017,7 +1018,7 @@ class TestTreeViterbiHap(VitAlgorithmBase):
10171018 def verify (self , ts ):
10181019 for n , H , s , r , mu in self .example_parameters_haplotypes (ts ):
10191020 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
10211022 )
10221023 ts_check = ts .simplify (range (1 , n + 1 ), filter_sites = False )
10231024 cm = ls_viterbi_tree (s [0 , :], ts_check , r , mu )
@@ -1032,7 +1033,7 @@ def verify(self, ts):
10321033 s ,
10331034 path_tree ,
10341035 r ,
1035- mutation_rate = mu ,
1036+ p_mutation = mu ,
10361037 scale_mutation_based_on_n_alleles = False ,
10371038 )
10381039 self .assertAllClose (ll , ll_check )
@@ -1055,7 +1056,7 @@ def check_viterbi(ts, h, recombination=None, mutation=None):
10551056 G ,
10561057 h .reshape (1 , m ),
10571058 recombination ,
1058- mutation_rate = mutation ,
1059+ p_mutation = mutation ,
10591060 scale_mutation_based_on_n_alleles = False ,
10601061 )
10611062 assert np .isscalar (ll )
@@ -1073,7 +1074,7 @@ def check_viterbi(ts, h, recombination=None, mutation=None):
10731074 h .reshape (1 , m ),
10741075 path_tree ,
10751076 recombination ,
1076- mutation_rate = mutation ,
1077+ p_mutation = mutation ,
10771078 scale_mutation_based_on_n_alleles = False ,
10781079 )
10791080 nt .assert_allclose (ll_check , ll )
@@ -1109,7 +1110,7 @@ def check_forward_matrix(ts, h, recombination=None, mutation=None):
11091110 G ,
11101111 h .reshape (1 , m ),
11111112 recombination ,
1112- mutation_rate = mutation ,
1113+ p_mutation = mutation ,
11131114 scale_mutation_based_on_n_alleles = False ,
11141115 )
11151116 assert F .shape == (m , n )
@@ -1154,7 +1155,7 @@ def check_backward_matrix(ts, h, forward_cm, recombination=None, mutation=None):
11541155 h .reshape (1 , m ),
11551156 forward_cm .normalisation_factor ,
11561157 recombination ,
1157- mutation_rate = mutation ,
1158+ p_mutation = mutation ,
11581159 scale_mutation_based_on_n_alleles = False ,
11591160 )
11601161
0 commit comments