From 5ed693a1232d205eabe44f6f2b6b448024fa259a Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Mon, 19 Oct 2026 14:53:57 +0200 Subject: [PATCH] Assert the computed D-E weight in the Fig. 2a test Fig. 2a of the edgeHOG paper shows weight 2 for D-E in the propagated graph of species 3 (A Y C D1 E1 D2 E2), and 3 at the root. Each of the three extant adjacencies D1-E1, E1-D2 and D2-E2 supports D-E, so the computed weights of 3 and 4 are correct and the figure simplifies this. Turn the xfail test into a regular test of the computed weights. Fixes #39 --- tests/test_paper_figure2.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_paper_figure2.py b/tests/test_paper_figure2.py index 1f725e1..4cdfae8 100644 --- a/tests/test_paper_figure2.py +++ b/tests/test_paper_figure2.py @@ -145,13 +145,13 @@ def test_fig2a_root_bottom_up_graph_edges(fig2): # Fig. 2a shows weight 2 for D-E in the S3 propagated graph (and hence 3 at the -# root). The code counts each of the three extant adjacencies D1-E1, E1-D2 and -# D2-E2 (weight 3, and 4 at the root). +# root). Each of the three extant adjacencies D1-E1, E1-D2 and D2-E2 supports +# D-E, so the weight is 3 in S3 and 4 at the root; the figure simplifies this +# (see #39). -@pytest.mark.xfail(strict=True, reason="Fig. 2a: D-E weight from the S3 tandem duplicates is 3 in the code, 2 in the figure") def test_fig2a_tandem_duplicate_weights(fig2): - assert weighted_edges(fig2["S3"].transitive_synteny)[frozenset("DE")] == 2 - assert weighted_edges(fig2["Root"].bottom_up_synteny)[frozenset("DE")] == 3 + assert weighted_edges(fig2["S3"].transitive_synteny)[frozenset("DE")] == 3 + assert weighted_edges(fig2["Root"].bottom_up_synteny)[frozenset("DE")] == 4 # ---------------------------------------------------------------------------