Skip to content

Output orthoXML violates the OrthoXML 0.5 schema #116

Open

Description

@alpae

Problem

FastOMA_HOGs.orthoxml does not validate against the OrthoXML 0.5 schema (tests/data/orthoxml-0.5.xsd):

  1. Single-child root wrapper: when a rootHOG's top-level element is a paralogGroup (duplication at the root level), read_infer_xml_rhog wraps it in an orthologGroup with that paralogGroup as the only child (_infer_subhog.py:112-122). The schema requires at least two children.
  2. Wrapper TaxRange is not the MRCA: that wrapper uses the HOG's taxonomic level as TaxRange (_infer_subhog.py:120), while HOG.to_orthoxml uses the MRCA of the members' species. The two disagree when the members span less than the level. Its scores are computed against that level as well.
  3. gene@main_isoform is not an allowed attribute in OrthoXML 0.5 (collect_subhogs.py:208-209); runs with splice files produce invalid files.

Tests (strict xfail on PR #112)

  • tests/test_level_processor.py::test_read_infer_xml_rhog_groups_have_two_children
  • tests/test_level_processor.py::test_read_infer_xml_rhog_wrapper_taxrange_is_mrca
  • tests/test_subhog_stage.py::test_orthoxml_schema[D0625237]
  • tests/test_subhog_stage.py::test_taxrange_is_mrca_of_member_species[D0625237]
  • tests/test_collect_subhogs.py::TestWriteHogOrthoxml::test_root_level_duplication_is_schema_valid
  • tests/test_collect_subhogs.py::TestWriteHogOrthoxml::test_main_isoform_output_is_schema_valid

Proposed fix

1./2. A paralogGroup at the root level can stay as it is in <groups>, or each of its children becomes its own top-level HOG. The OrthoXML version that FastOMA claims to write determines which one is valid, so this needs a decision (the orthoxml_v03 flag suggests the wrapper was added for v0.3).
3. Write isoform information in a schema-conformant way, e.g. as a <property> or in the notes, or extend the schema upstream (qfo/orthoxml).

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