Skip to content

curation: fix getGeneData crash when a CDS's Parent resolves to no gene - #730

Merged
edkerk merged 1 commit into
develop3from
fix/getgenedata-emptygene-uniprot
Sep 5, 2026
Merged

curation: fix getGeneData crash when a CDS's Parent resolves to no gene#730
edkerk merged 1 commit into
develop3from
fix/getgenedata-emptygene-uniprot

Conversation

@edkerk

Copy link
Copy Markdown
Member

Summary

Found while porting getGeneData to raven-toolbox (SysBioChalmers/raven-gecko-parity#53): parseGFF's emptyGene fallback struct (used when a CDS's Parent chain doesn't resolve to any parsed gene feature) has no uniProt field, so hitting that fallback crashes outright:

>> T = getGeneData('orphan_cds.gff');
Unrecognized field name "uniProt".
Error in getGeneData>parseGFF (line 161)

Added the missing field, empty like the rest of the fallback record.

Test plan

  • Reproduced the crash directly with a minimal GFF3 (a single CDS with Parent=missing_gene) before the fix; confirmed it now returns a row with empty locus_tag/old_locus_tag/GeneID/gene_name/UniProt and the CDS's own protein_id.
  • tGenomeData test class: 6/6 passed.

Found while porting getGeneData to raven-toolbox
(SysBioChalmers/raven-gecko-parity#53): parseGFF's emptyGene fallback
struct had no uniProt field, so a CDS whose Parent chain doesn't resolve
to any parsed gene feature crashed outright on g.uniProt with
'Unrecognized field name'. Added the missing field, empty like the rest
of the fallback record.
edkerk added a commit to SysBioChalmers/raven-gecko-parity that referenced this pull request Sep 5, 2026
Landed in SysBioChalmers/raven-toolbox#132. Adds the parity scenario
calling getGeneData.m directly (via a local GFF3 path, bypassing
downloadGenomeData) against a hand-built fixture. Also notes
SysBioChalmers/RAVEN#730, a crash found and fixed upstream while building
the scenario.
@github-actions

Copy link
Copy Markdown

Function test results

306 tests 279 ✅ 1m 5s ⏱️
25 suites 27 💤
1 files 0 ❌

Results for commit 43408b1.

@edkerk
edkerk merged commit 2363210 into develop3Sep 5, 2026
4 checks passed
@edkerk
edkerk deleted the fix/getgenedata-emptygene-uniprot branch September 5, 2026 09:11
Sign up for freeto 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

@edkerk