Skip to content

Species-overlap reconciliation mislabels duplications at gene-tree polytomies #117

Open

Description

@alpae

Problem

LevelHOGProcessor.infer_reconciliation computes the species overlap of an internal node as the intersection of the species sets of all children (_infer_subhog.py:546). For a multifurcation (A1, A2, B1) the intersection over the three children is empty, so the node is labelled a speciation, although A appears in two children.

FastTree produces polytomies when sequences are identical or nearly so, i.e. exactly in recent duplications, so these get merged into one HOG where they should be paralogs.

Test (strict xfail on PR #112)

  • tests/test_level_processor.py::test_reconciliation_polytomy_with_duplicated_species

Proposed fix

For nodes with more than two children, compute the overlap over pairs of children (duplication if any pair shares species; sos = max over pairs, or the union of the pairwise intersections divided by the union of all species), or resolve polytomies before reconciliation. This changes inferred HOGs, so regenerate the golden snapshots and review the diff.

Activity

  1. added
    bugSomething isn't working
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions