A correctness release. Several 0.2.0 defects returned plausible results that were wrong, with nothing raised. Upgrade.
pip install --upgrade gffbaseabi3 wheels for Linux (x86_64, aarch64), macOS (Intel, Apple Silicon) and Windows (x86_64) cover CPython 3.10 through 3.14; no Rust toolchain is needed.
Silent-data-loss fixes
- A query inside a feature loop ended the loop early.
db.children(gene)insidefor gene in db.features_of_type("gene")— the canonical gffutils loop — stopped at the first 10,000 rows without an error.create_introns,create_splice_sitesanditer_by_parent_childswere truncated the same way. update()lost ids, parents and duplicates. New features ignored theirIDattribute (the introns ofdb.update(db.create_introns())becameintron_6instead ofe1-e2), got noParentedges, and a duplicate id was stored instead of refused.update()now runs new data through thecreate_dbpipeline, atomically, as gffutils does.- Empty or unrecognized input built an empty database. Empty, header-only, FASTA-only and binary files — and gzip not named
.gz(.bgz,.GZ, no extension) — now raiseEmptyInputErroror are decompressed by content. - A GTF with one bad first line was read as GFF3 by the Rust engine, so its gene/transcript hierarchy was never built.
- Quoted values (
ID="g001") read differently from what was stored, and re-serialized with doubled quotes. DataIteratorrefused files thatcreate_dbreads, and a transform returningNonekept the feature instead of dropping it.- Six
create_dbparameters were ignored (gtf_transcript_key,gtf_gene_key,dialect,verbose, andpragmas, which never reached the ingest); a failed ingest left DuckDB's spill directory behind.
Behaviour you may notice
Each change brings gffbase in line with gffutils or its own documentation: EmptyInputError for input with no features; update() raises DuplicateIDError on a taken id (write an edit back with merge_strategy="replace"); checklines samples checklines + 1 records; add_relation(level=...) other than 1 raises; inferred GTF parents are labelled gffutils_derived in compat mode. The full list is under Changed in the changelog.
The documentation was corrected where it was wrong — versioned GENCODE ids, RefSeq's region rows, memory claims — and the migration guide now gives measured per-call latencies against gffutils: region() is faster; single-row children() and db[id] are slower, which is what the batched API is for.
How this release was verified
- Qualified in CI on Linux, macOS and Windows across Python 3.10–3.14 on both spatial index paths, with a five-corpus correctness gate, the gffutils parity suite, the pure-Python engine without the extension, and the minimum supported dependencies.
- Every fix lands with a regression test that fails on 0.2.0.
- The binaries attached here are byte-identical to the files on PyPI.
| File | SHA-256 |
|---|---|
gffbase-0.2.1.tar.gz
| 8e622f8b6f3e59199c585c6510e6773cc378ca1cc57154b4bb7b579f01d5a472
|
…manylinux_2_17_x86_64…whl
| b738c2d4862b32d7115537f4066674bf6d425fae0fa4f3a2edcbd9ad9f9f2ac5
|
…manylinux_2_17_aarch64…whl
| 0999cec4c2356bb34cb0f684f340754bd943fab9ba4189794bf3ab25dea48cb3
|
…macosx_11_0_arm64.whl
| 8b8231388da25d26dbe9eeb860ddf83d720663618dee41e686ddb356dbd285d7
|
…macosx_10_12_x86_64.whl
| 1e21bd12445d142523e3993ebc73df5fe6fdb0abd582f96d7b21be8adb9709de
|
…win_amd64.whl
| 6f3d88eab43ae1165459d0ff5eea959dd9a6f40e368b7b4631ec1b131fb609a8
|
Docs: https://khchao.com/gffbase/ · Changelog: CHANGELOG.md · PyPI: https://pypi.org/project/gffbase/0.2.1/