Skip to content

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

Closed
edkerk wants to merge 1 commit into
develop3from
feat/homology-gene-id-check
Closed

edkerk wants to merge 1 commit into
develop3from
feat/homology-gene-id-check

Conversation

@edkerk

@edkerk edkerk commented Oct 14, 2026

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown

Function test results

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

Results for commit 48b3c52.

@edkerk

edkerk commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

Development of this pull request continues in CompMetEng/RAVEN#3, which has the same commits on the copied history.

@edkerk edkerk closed this Oct 16, 2026
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