Skip to content

feat: complexPolicy, keepGeneFree and preserveNotes in getModelFromHomology, and no repeated genes - #757

Merged
edkerk merged 1 commit into
develop3from
feat/homology-keep-template
Oct 7, 2026
Merged

edkerk merged 1 commit into
develop3from
feat/homology-keep-template

Conversation

@edkerk

@edkerk edkerk commented Oct 6, 2026

Copy link
Copy Markdown
Member

Main improvements in this PR:

  • features:
    • getModelFromHomology: new name-value options, matching get_model_from_homology in raven-toolbox (feat: keep gene-free reactions and template notes in get_model_from_homology, drop duplicate genes CompMetEng/raven-toolbox#166):
      • complexPolicy: what happens to an and-linked subunit without an ortholog. flag (default, current behaviour) keeps it as OLD_MODELID_gene, keep drops just that subunit, drop drops the reaction.
      • keepGeneFree (default false): also transfer template reactions without a grRule (spontaneous, transport, exchange, artificial).
      • preserveNotes (default false): keep the template's rxnNotes, rxnReferences and rxnConfidenceScores instead of overwriting them.
  • fix:
    • getModelFromHomology: a gene that several template genes map to now appears once in a grRule (was A or A or A), and redundant brackets are removed.
    • getModelFromHomology: the draft no longer carries the templates' version, date, description or descriptive annotation.
  • tests:
    • tReconstruction: the three policies, gene-free reactions, kept notes, deduplication and the metadata; an unknown policy errors.

Needed by the MATLAB animal GEM generator in Human-GEM (SysBioChalmers/Human-GEM#1141), which with these options gives the same Mouse, Rat, Worm, Fruitfly and Zebrafish models as the Python generator. The full testing/function_tests suite passes (MATLAB R2024b, Gurobi).

Instructions on merging this PR:

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

…mology, and no repeated genes

complexPolicy decides what happens to an and-linked subunit without an ortholog (flag, keep,
drop), keepGeneFree also transfers template reactions without a grRule, and preserveNotes
keeps the template's rxnNotes, rxnReferences and rxnConfidenceScores. A gene that several
template genes map to appears once in a grRule, and the draft no longer carries the
templates' version, date and description. Matches get_model_from_homology in raven-toolbox.
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Function test results

392 tests   353 ✅  1m 40s ⏱️
 24 suites   39 💤
  1 files      0 ❌

Results for commit 613428d.

@edkerk
edkerk merged commit 5b5b1ee into develop3 Oct 7, 2026
4 checks passed
@edkerk
edkerk deleted the feat/homology-keep-template branch October 7, 2026 13:17
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