Skip to content

Fix GFF annotation grouping for discontinuous features - #1039

Open
rpinho wants to merge 2 commits into
biotite-dev:mainfrom
rpinho:fix-gff-features
Open

rpinho wants to merge 2 commits into
biotite-dev:mainfrom
rpinho:fix-gff-features

Conversation

@rpinho

@rpinho rpinho commented Nov 18, 2026

Copy link
Copy Markdown

gff.get_annotation() splits a feature when rows sharing its ID are separated by another feature's row.
A three-row GFF3 file with CDS, gene and CDS entries and the same ID on both CDS rows produces three features instead of two.
The patch groups locations by ID across the file and retains the first row's type and qualifiers, as documented.
Regression tests cover adjacent and interleaved rows, both strands, and features without IDs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N

@padix-key

Copy link
Copy Markdown
Member

This PR fixes #1060, so it will close that issue.

Authored by Claude

@codspeed

codspeed Bot commented Nov 26, 2026

Copy link
Copy Markdown

Merging this PR will regress 4 benchmarks

2 warnings

⚠️ 18 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚠️ 18 benchmarks with a significant change ran in a different software environment

Their base and head results were measured with a different OS or toolchain, such as compiler, runtime or library versions, so the changes might come from this difference rather than from the code. Open an affected benchmark to see what changed.

See affected benchmarks

⚡ 14 improved benchmarks
❌ 4 regressed benchmarks
✅ 93 untouched benchmarks
⏩ 14 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ benchmark_match_kmer_selection[KmerTable-None] 526.4 µs 636.3 µs -17.28%
❌ benchmark_match_kmer_selection[BucketKmerTable(10000)-11*11*1*1***111] 652.7 µs 764 µs -14.58%
❌ benchmark_match[KmerTable-None] 623.9 µs 728 µs -14.3%
❌ benchmark_match[BucketKmerTable(10000)-11*11*1*1***111] 838.9 µs 949.4 µs -11.64%
⚡ benchmark_conversion[bond_type_matrix] 3 ms 1.4 ms ×2.2
⚡ benchmark_conversion[adjacency_matrix] 3 ms 1.4 ms ×2.2
⚡ benchmark_align_pairwise[align_local_gapped-score_only] 120.1 ms 81.2 ms +47.97%
⚡ benchmark_align_pairwise[align_optimal-score_only] 148.8 ms 107.2 ms +38.82%
⚡ benchmark_indexing_from_kmer_selection[11*11*1*1***111-KmerTable] 15.2 ms 11.3 ms +34.41%
⚡ benchmark_indexing_from_kmer_selection[None-KmerTable] 15.2 ms 11.4 ms +34.17%
⚡ benchmark_indexing_from_kmers[None-KmerTable] 15 ms 11.2 ms +34.03%
⚡ benchmark_indexing_from_kmers[11*11*1*1***111-KmerTable] 15 ms 11.2 ms +33.88%
⚡ benchmark_cell_list_compute_contacts[MASK] 34.7 ms 26.4 ms +31.38%
⚡ benchmark_get_assembly 835.9 ms 637.3 ms +31.16%
⚡ benchmark_indexing_from_sequences[None-KmerTable] 21.8 ms 17.5 ms +24.4%
⚡ benchmark_indexing_from_sequences[11*11*1*1***111-KmerTable] 36.6 ms 32.2 ms +13.53%
⚡ benchmark_find_connected 975.5 µs 868.9 µs +12.27%
⚡ benchmark_decode 6.4 ms 5.7 ms +11.4%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rpinho:fix-gff-features (18d5610) with main (2effe8f)

Open in CodSpeed

Footnotes

  1. 14 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@padix-key padix-key left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks correct 👍. Could you add docstrings explaining the what and how of the respective test?

@rpinho

rpinho commented Nov 27, 2026

Copy link
Copy Markdown
Author

Thanks! I've done this.

This branch has not been deployed

No deployments
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.

2 participants