Repository navigation
Conversation
so that infer-roothogs can use the same safety net as infer-subhogs (#114).
- merge_rhogs2: a cluster bigger than --big-rhog-size is split into consecutive rootHOGs below the limit; before, the overflow host was not reset between clusters and lost its own proteins, and a cluster whose rootHOGs were all gone reused the previous host. - parse_hogmap_omamer: proteins without any hogmap row are treated as unmapped (with a warning), so they reach the clustering of unmapped proteins. N/A rows of proteins that are not in the (length-filtered) proteome are ignored. - add_species_name_prot_id no longer truncates ids to 230 characters: the truncated id did not match the hogmap any more. fastoma-check-input rejects ids that are too long for FastTree. - the unmapped proteins are filtered by isoform selection too, so minor isoforms no longer reach linclust. - every grouping step checks that it neither loses nor duplicates a protein (only filter_big_roothogs may remove proteins), and the stage checks that every protein has OMAmer hits, is unmapped, or is a minor isoform. As in infer-subhogs, a violation is logged and repaired, and raises with FASTOMA_STRICT_INVARIANTS (set in the tests). A summary line logs where all proteins went.
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 #114. Part of #124.
The four leak points
merge_rhogs2overflow: a merge cluster bigger than--big-rhog-sizeis now split into consecutive rootHOGs below the limit. Each is named after its smallest rootHOG. Before,newhostwas not reset between clusters, so the overflow host lost its own proteins. A cluster whose rootHOGs were all gone also reused the previous cluster's host. Merged member lists keep their order now (dict.fromkeysinstead ofset).Proteins without any hogmap row are treated as unmapped, with a warning, so they reach the clustering of unmapped proteins.
N/Arows of proteins that are not in the length-filtered proteome are now ignored instead of counted as unmapped.Long ids:
add_species_name_prot_idno longer truncates ids to 230 characters. The truncated id stopped matching the hogmap, so the protein vanished.fastoma-check-inputalready rejects ids longer than 60 characters, and that is now the only limit.Minor isoforms: the unmapped proteins are now filtered by isoform selection too, so non-selected isoforms no longer reach linclust.
Accounting
create_root_hogschecks that it neither loses nor duplicates a protein. Onlyfilter_big_roothogsmay remove proteins.FASTOMA_STRICT_INVARIANTSset, a violation raises instead; the tests set it. The helper moved toFastOMA/_invariants.py.fastoma-protein-tracecounts the newkept_as_singleton_roothogevent under its consistency checks.Tests
The five strict xfails of infer-roothogs silently drops proteins #114 now pass and their markers are removed.
New tests cover the split order of oversized clusters, clusters whose rootHOGs are all gone, the safety net (strict and repair modes, losses and duplicates), and the isoform filter of unmapped proteins.
The characterisation tests that pinned the old behaviour are updated: missing hogmap rows, id truncation, and the synthetic stage accounting.
Full suite: 415 passed, 23 skipped, 10 xfaile
refactor: move the strict-invariants helper to FastOMA/_invariants.py
fix: infer-roothogs no longer drops proteins (infer-roothogs silently drops proteins #114)