fix: require matching metabolite support in curateModelFromTables - #677
Merged
Conversation
The duplicate check sliced S down to the candidate's metabolites before comparing coefficients, so any model reaction that is a superset of the candidate projected onto an identical row and was flagged a duplicate. That sent it into the overwrite branch, which clobbers rxnNames, bounds, rev, subSystems, eccodes, grRules and MIRIAMs, and the candidate was then dropped as already existing. Adding A + B -> C to a model holding A + B -> C + H merged the two; a low-metabolite candidate such as an exchange reaction matched almost anything consuming that metabolite. Candidate reactions are now compared only against model reactions built from exactly the same metabolites. Exact stoichiometric matches are still detected and overwritten as before. Replaces the tCuration assumeFail stub with tests for both paths; the tables the stub said were required are written by the test.
Function test results241 tests 220 ✅ 1m 8s ⏱️ Results for commit bc861c7. |
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.
Main improvements in this PR:
curateModelFromTablescompared candidate reactions only across the candidate's own metabolites, so any existing reaction that used those metabolites and others was flagged a duplicate and had its annotation, bounds and grRules overwritten while the candidate was dropped. AddingA + B -> Cto a model holdingA + B -> C + Hmerged the two. Candidates are now matched only against reactions built from exactly the same metabolites; exact matches are still overwritten as before.tCuration.mcovers both paths, replacing a stub that skipped.Instructions on merging this PR:
develop3as target branch, and will be resolved with a squash-merge.