Skip to content

fix: reject gene ids that split in grRules in getModelFromHomology - #3

Merged
edkerk merged 2 commits into
developfrom
feat/homology-gene-id-check
Oct 17, 2026
Merged

edkerk merged 2 commits into
developfrom
feat/homology-gene-id-check

Conversation

@edkerk

@edkerk edkerk commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Copied from SysBioChalmers/RAVEN#762, opened by edkerk on 2026-10-14.

Main improvements in this PR:

  • fix:
    • getModelFromHomology now raises RAVEN:badInput when gene ids of the new organism contain whitespace, parentheses, | or &. These ids are written into the grRules of the draft model, which are split at whitespace and parentheses, and which COBRA also splits at | and &. A UniProt FASTA header such as sp|P33284|HXK_KLULA would otherwise become three genes in the draft model. Only ids that are mapped to a template gene are checked, and the error names the first three and suggests reducing UniProt headers to the accession.
  • documentation:
    • the help text of getModelFromHomology states the requirement.
  • tests:
    • tReconstruction has a test, getModelFromHomologyRejectsGeneIdsThatSplit.

The same check is in get_model_from_homology in raven-toolbox (SysBioChalmers/raven-toolbox#171).

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.

New-organism gene ids become gene ids of the draft model, and grRules
are split at whitespace and parentheses, and by COBRA also at "|" and
"&". UniProt FASTA headers such as sp|P33284|HXK_KLULA passed through
and broke the draft downstream. getModelFromHomology now raises an
error naming the offending ids, as raven-toolbox does.

Original-commit: SysBioChalmers/RAVEN@48b3c52
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Function test results

394 tests   355 ✅  58s ⏱️
 24 suites   39 💤
  1 files      0 ❌

Results for commit 9167d3c.

♻️ This comment has been updated with latest results.

@edkerk
edkerk merged commit ba60895 into develop Oct 17, 2026
4 checks passed
@edkerk
edkerk deleted the feat/homology-gene-id-check branch October 17, 2026 06:12
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