Skip to content

infer-roothogs silently drops proteins #114

Open

Description

@alpae

Problem

Some proteins of the input proteomes never reach a rootHOG FASTA (and so no output file), without any warning. Unlike #113 this has not been quantified on fungi-30 yet.

  • merge_rhogs2 overflow: when a merge cluster exceeds --big-rhog-size, newhost is not reset between clusters and the overflow host loses its own proteins (_utils_roothog.py:667-713). Also, if all members of a cluster are gone, the previous cluster's host_hog is reused.
  • Proteins without any hogmap row are dropped (parse_hogmap_omamer, _utils_roothog.py:264). They are neither mapped nor in unmapped, so they don't reach linclust either.
  • Ids longer than 230 characters are truncated (_utils_roothog.py:256) and then no longer match the hogmap qseqid (:289). check-input rejects ids longer than 60 characters, so this only happens when check-input is bypassed; the two limits should agree anyway.
  • Minor isoforms reach linclust: isoform selection filters the hogmaps but not the unmapped proteins, so non-selected isoforms are clustered (infer_roothogs.py:50-60, :93).

Tests (strict xfail on PR #112)

  • tests/test_roothog_grouping.py::TestMergeRhogs2::test_overflowing_clusters_keep_all_proteins
  • tests/test_roothog_stage.py::test_synthetic_protein_missing_from_hogmap_not_lost
  • tests/test_roothog_io.py::TestParseHogmapOmamer::test_long_ids_are_kept
  • tests/test_roothog_stage.py::test_synthetic_minor_isoforms_not_clustered

Proposed fix

Fix the four cases, and add an accounting step at the end of fastoma-infer-roothogs: every protein of the proteomes (after length filtering and isoform selection) is either in a rootHOG FASTA, in singleton_unmapped.fa, or reported as a deliberately dropped singleton, and the counts are logged.

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