Backport FT8, K15: recursive-descent GPR pruning; fix stale KEGG cutoff fallbacks#658
Merged
Conversation
… (FT8) Replace the #n# placeholder loop with a recursive parse-tree walk. OR nodes (isozymes) prune negative-score branches while keeping at least one; AND nodes (complexes) are scored as a unit and pruned only at the enclosing OR level. Nested isozyme groups within a complex are simplified in place. NaN-scored genes/complexes are retained (treated as non-negative).
…aults (K15) Fallback values when empty were still the old 1e-50 and 0.8; align them with the parseRAVENargs defaults of 1e-30 and 0.9.
Function test results206 tests 185 ✅ 25s ⏱️ Results for commit bfea22a. |
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.
Summary
removeLowScoreGenes.m): RewriteprocessComplexRulewith a recursive parse-tree walk, replacing the iterative#n#placeholder approach.G1 & (G2 | G3) & G4) are simplified in place — the old regex approach could not handle these correctly.getKEGGModelForOrganism.m): Fix stale fallback values forcutOff(1e-50→1e-30) andminScoreRatioG(0.8→0.9) when callers explicitly pass an empty value. Aligns them with theparseRAVENargsdefaults set in Backport FS1/FS2/FS4, H1/H4, FT8: correlation-based FSEOF, homology strictness split, deterministic tie-break #655.KEGG pipeline status
Most KEGG items (K1–K3, K6, K7, K12, K14) are already resolved in MATLAB: K1–K3 moved to the Python-generated
keggModel.matartefact; K7 (singlehmmsearch) and K14 sorting/gzip are done in the existing code. K15 cutoff recalibration was done in the defaults by a prior PR; this commit fixes only the dead fallback paths.Test plan
processComplexRuledocstring examples hold:G1 | (G2 and G3 and G4),G1 | (G2 and G3) | (G4 and G5),(G1 and (G2 or G3) and G4)— each with the stated negative genes — produces the stated output.G1 | G2 | G3) and simple complex rules (G1 & G2) are unchanged (they bypassprocessComplexRule).