Skip to content

Fix _longest_orf partialStart initialization and boundary condition - #11

Merged
nextgenusfs merged 2 commits into
mainfrom
fix-alignment-parsing-bug
May 23, 2026
Merged

Fix _longest_orf partialStart initialization and boundary condition#11
nextgenusfs merged 2 commits into
mainfrom
fix-alignment-parsing-bug

Conversation

@nextgenusfs

Copy link
Copy Markdown
Owner

This PR fixes a bug in _longest_orf where partialStart and partialStop arrays were not properly initialized when returning an mRNA CDS or when falling back, causing a SystemExit(1) error during length validation in gff2dict (e.g. ERROR in parsing gene gapmm2_4).

It also fixes an off-by-one boundary bug (cov < lenOrf instead of cov <= lenOrf) which caused it to over-extend the CDS when its length perfectly matches the required ORF coverage.

This fixes the issue reported in funannotate2#44 where transcript alignments with gapmm2 crash the parsing phase.


Pull Request opened by Augment Code with guidance from the PR author

@nextgenusfs
nextgenusfs marked this pull request as ready for review May 23, 2026 06:26
@nextgenusfs
nextgenusfs merged commit e755b09 into main May 23, 2026
10 checks passed
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