Tcs and implied loss scores - #93
Open
alpae wants to merge 5 commits into
Open
Conversation
adds TCS score according to reference implementation. adds implied loss score computing the nr of implied loss of a (sub)HOG.
adds unittests about the score calculation and update the nf-test output with the addtional score lines
alpae
force-pushed
the
tcs-and-implied-loss-scores
branch
from
August 26, 2026 09:11
a03c7d1 to
b6bceaf
Compare
Member
Author
|
@sinamajidian what do you think about the tcs score? should we include it like this? (see my comment in the toplevel description.) |
Collaborator
|
looks useful! Thanks. would it be easy to have a flag to activate it or its computation and the increase in the orthoxml file size would be negligible? |
Member
Author
|
extra size is quite fine: 2 additional lines per sub-hog (one for tcs score, on for implied loss). for the computation, I think I can benchmark this on a medium size dataset. will let you know. having a flag to active/deactivate would certainly be possible. |
Adds --store-completeness-score/--store-implied-losses-score/--store-tcs-score options to fastoma-infer-subhogs (wired through FastOMA.nf as store_completness_score/store_implied_losses_score/store_tcs_score params) so score computation can be toggled per run. collect_subhogs now looks ahead at the first HOG in the pickle folder to only write scoreDef entries for scores actually present in the run's output, instead of always writing all three. compute time for score computation is tracked during the to_orthoxml() call. Serialization is generally quick, score computation uses roughly 40% of the time.
The previous --store_*_score params (default true) were missing from nextflow_schema.json, so nf-schema parsed CLI-supplied values as plain strings instead of booleans -- a non-empty string is truthy in Groovy, so --store_tcs_score false never actually disabled anything. Switch to --disable_*_score (default false): setting the flag means the user actively wants to disable the score, so bare presence of the flag conveys the intent without needing a boolean value at all.
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.
attempt to include two more scores into the orthoxml:
ImpliedLosses: number of implied gene loss for the subhog underneath the which stores the score.
TCSScore: Taxonomic congruence score as defined in the FoldTree publication. As taxonomy, the species tree given to FastOMA is used. We normalize the score with the number of genes. However, this does NOT mean the score is in the (0,1) range. This is also reflected when you run the example data. The TCS score can be <1 for a perfectly congruent HOG without any loss/gains.