• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openvax / gtfparse / 28969477314
96%
master: 96%

Build:
Build:
LAST BUILD BRANCH: feature/21-write-gtf
DEFAULT BRANCH: master
Ran 08 Jul 2026 07:22PM UTC
Jobs 1
Files 6
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Jul 2026 07:21PM UTC coverage: 95.276% (+0.06%) from 95.215%
28969477314

Pull #72

github

iskandr
write_gtf: robust, vectorized, gzip-aware; test both round-trip directions

Addresses the review findings on the first draft:

- Faithful missing-value handling. read_gtf represents an absent attribute
  as null (numeric *_version columns) or the empty string (string columns)
  and cannot tell absent from present-but-empty. The writer now omits both
  null and "" so that read -> write -> read reproduces the parsed frame
  exactly, including column order, on multi-feature GTFs (GENCODE). A
  non-empty falsy value such as "0" is still written (the original #46 bug).

- Vectorized. The attribute field and full line are built with polars
  expressions (concat_str/format) instead of per-row Python; ~200k rows x
  6 attributes now writes in ~0.1s.

- gzip output. A path ending in .gz is gzip-compressed, mirroring read_gtf
  which transparently reads gzipped GTFs.

- Dropped the redundant fixed-column filter; fixed columns are always
  written in canonical order (the missing-column guard runs first).

- Documented that "\"" and ";" in attribute values cannot round-trip
  (a limitation shared with read_gtf, which strips quotes and splits on ";").

Tests now cover both directions across RefSeq/Ensembl/GENCODE/StringTie
fixtures: write(read(...)) recovers the parsed frame and is byte-idempotent
(a fixed point); read(write(...)) recovers a DataFrame's values. Plus gzip,
pandas input, the "0"-vs-empty-vs-null semantics, "." for missing fixed
values, header lines, the structural-character limitation, and the
missing-column error.

Co-authored-by: Benoitdw <bw@oncodna.com>
Claude-Session: https://claude.ai/code/session_014fNxSBm5zvdsDNwN3nhmpS
Pull Request #72: Add write_gtf: serialize a DataFrame back to GTF (fixes #21)

242 of 254 relevant lines covered (95.28%)

0.95 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28969477314.1 08 Jul 2026 07:22PM UTC 6
95.28
GitHub Action Run
Source Files on build 28969477314
  • Tree
  • List 6
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28969477314
  • Pull Request #72
  • PR Base - master (#25821451381)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc