Skip to content

fix: require matching metabolite support in curateModelFromTables - #677

Merged
edkerk merged 1 commit into
develop3from
fix/curate-duplicate-detection
Jul 17, 2026
Merged

fix: require matching metabolite support in curateModelFromTables#677
edkerk merged 1 commit into
develop3from
fix/curate-duplicate-detection

Conversation

@edkerk

@edkerk edkerk commented Jul 17, 2026

Copy link
Copy Markdown
Member

Main improvements in this PR:

  • fix:
    • curateModelFromTables compared 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. Adding A + B -> C to a model holding A + B -> C + H merged the two. Candidates are now matched only against reactions built from exactly the same metabolites; exact matches are still overwritten as before.
  • documentation:
    • tCuration.m covers both paths, replacing a stub that skipped.

Instructions on merging this PR:

  • This PR has develop3 as target branch, and will be resolved with a squash-merge.

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.
@github-actions

Copy link
Copy Markdown

Function test results

241 tests   220 ✅  1m 8s ⏱️
 23 suites   21 💤
  1 files      0 ❌

Results for commit bc861c7.

@edkerk
edkerk merged commit 7a803fd into develop3 Jul 17, 2026
4 checks passed
@edkerk
edkerk deleted the fix/curate-duplicate-detection branch July 17, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant