Repository navigation
fix: infer-subhogs no longer drops proteins (#113) - #130
Merged
Merged
Conversation
Their HOGs were never frozen and their proteins got lost (#113). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A HOG whose representative rows were all filtered out was lost at the next level (#113). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
They are frozen at the current level instead of being lost (#113). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The subHOGs stay active, so they can still be merged at the next level (#113). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Proteins missing from the output HOGs are kept as frozen singletons, with a warning (#113). Adds a test for the frozen subHOGs of a split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
…ter fix - tests set FASTOMA_STRICT_INVARIANTS: process() raises instead of repairing a lost protein, so the safety net can no longer hide a regression - process() also reports proteins that end up in several HOGs - HOG.__init__ keeps unfiltered rows only if the filter would drop all of them - get_subhog_path no longer loops forever on an inconsistent HOG - trace: recovered proteins get kept_as_singleton_at_level, not a loss fate Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #113.
fastoma-infer-subhogslost proteins in four places. Each commit fixes one of them:HOG.__init__). It could drop all representative rows, and the HOG was then lost at the next level. If the filter would drop rows, the unfiltered rows are kept.split_hog. It kept only the subHOGs that a partition's representatives lead to. It now also returns the others unchanged, andmerge_subhogsfreezes them, because they have no representative in the gene tree.process()returned without the frozen HOGs. The subHOGs also stay active now, so the level is just skipped.Safety net. At the end of every level,
process()checks that the output HOGs hold all input proteins. Any missing protein is kept as a frozen singleton, with a warning and alost_at_leveltrace event. On the 10 fungi-30 rootHOGs that dropped proteins, the safety net never triggers: the four fixes account for all of them.Tests
dev.dropsrootHOGs of the fungi-30 fixture are now golden snapshots, generated indessimozlab/fastoma:dev. The 13 existing snapshots are unchanged, so rootHOGs that didn't drop proteins give the same output.Note for review. The recovered proteins are not merged back into their families. Frozen subHOGs are passed up without being merged again, so they end up as separate top-level HOGs, or as unwritten singletons. They are no longer lost, but their orthology to the rest of the family is not recovered. For example, F0412257 now has 456 of 496 proteins in groups, where it previously lost 367 proteins.
🤖 Generated with Claude Code