diff --git a/tests/test_nontree_fb_diploid.py b/tests/test_nontree_fb_diploid.py index 48f5dd7..a76285c 100644 --- a/tests/test_nontree_fb_diploid.py +++ b/tests/test_nontree_fb_diploid.py @@ -26,7 +26,9 @@ def verify( ): G_vs = core.convert_haplotypes_to_phased_genotypes(H_vs) - F_vs, c_vs, ll_vs = fbd.forwards_ls_dip(n, m, G_vs, query, e_vs, r, norm=True) + F_vs, c_vs, ll_vs = fbd.forwards_ls_dip( + n, m, G_vs, query, e_vs, r, norm=True + ) B_vs = fbd.backwards_ls_dip(n, m, G_vs, query, e_vs, c_vs, r) self.assertAllClose(np.sum(F_vs * B_vs, (1, 2)), np.ones(m)) @@ -62,7 +64,9 @@ def verify( n, m, G_vs, query, e_vs, r ) if ll_tmp != -np.inf: - B_tmp = fbd.backward_ls_dip_starting_point(n, m, G_vs, query, e_vs, r) + B_tmp = fbd.backward_ls_dip_starting_point( + n, m, G_vs, query, e_vs, r + ) self.assertAllClose( np.log10(np.sum(F_tmp * B_tmp, (1, 2))), ll_tmp * np.ones(m) ) diff --git a/tests/test_nontree_vit_diploid.py b/tests/test_nontree_vit_diploid.py index 2473713..205f3a8 100644 --- a/tests/test_nontree_vit_diploid.py +++ b/tests/test_nontree_vit_diploid.py @@ -19,7 +19,9 @@ def verify(self, ts, scale_mutation_rate, include_ancestors): ): G_vs = core.convert_haplotypes_to_phased_genotypes(H_vs) - V_vs, P_vs, ll_vs = vd.forwards_viterbi_dip_low_mem(n, m, G_vs, query, e_vs, r) + V_vs, P_vs, ll_vs = vd.forwards_viterbi_dip_low_mem( + n, m, G_vs, query, e_vs, r + ) path_vs = vd.backwards_viterbi_dip(m, V_vs, P_vs) phased_path_vs = vd.get_phased_path(n, path_vs) path_ll_vs = vd.path_ll_dip(n, m, G_vs, phased_path_vs, query, e_vs, r) @@ -57,7 +59,9 @@ def verify(self, ts, scale_mutation_rate, include_ancestors): ) path_tmp = vd.backwards_viterbi_dip(m, V_tmp[m - 1, :, :], P_tmp) phased_path_tmp = vd.get_phased_path(n, path_tmp) - path_ll_tmp = vd.path_ll_dip(n, m, G_vs, phased_path_tmp, query, e_vs, r) + path_ll_tmp = vd.path_ll_dip( + n, m, G_vs, phased_path_tmp, query, e_vs, r + ) self.assertAllClose(ll_tmp, path_ll_tmp) self.assertAllClose(ll_vs, ll_tmp) @@ -66,7 +70,9 @@ def verify(self, ts, scale_mutation_rate, include_ancestors): ) path_tmp = vd.backwards_viterbi_dip(m, V_tmp, P_tmp) phased_path_tmp = vd.get_phased_path(n, path_tmp) - path_ll_tmp = vd.path_ll_dip(n, m, G_vs, phased_path_tmp, query, e_vs, r) + path_ll_tmp = vd.path_ll_dip( + n, m, G_vs, phased_path_tmp, query, e_vs, r + ) self.assertAllClose(ll_tmp, path_ll_tmp) self.assertAllClose(ll_vs, ll_tmp) @@ -75,7 +81,9 @@ def verify(self, ts, scale_mutation_rate, include_ancestors): ) path_tmp = vd.backwards_viterbi_dip(m, V_tmp[m - 1, :, :], P_tmp) phased_path_tmp = vd.get_phased_path(n, path_tmp) - path_ll_tmp = vd.path_ll_dip(n, m, G_vs, phased_path_tmp, query, e_vs, r) + path_ll_tmp = vd.path_ll_dip( + n, m, G_vs, phased_path_tmp, query, e_vs, r + ) self.assertAllClose(ll_tmp, path_ll_tmp) self.assertAllClose(ll_vs, ll_tmp)