Releases: mkiyer/zna
Releases · mkiyer/zna
Release list
v0.3.1
v0.3.0
[0.3.0] - 2026-03-25
Added
- Per-sequence label columns for storing SAM-tag metadata (alignment scores,
edit distances, etc.) alongside compressed sequences- Labels defined via
--label NAME:TYPEon the CLI (repeatable) - 11 numeric dtypes:
A,c/C,s/S,i/I,f,d,q/Q - Per-label
missingvalue for reads where a tag is absent - Columnar storage: each label column packed contiguously per block
- Labels defined via
- Decoupled label name and tag — label
name(stored in ZNA, up to 16
chars) can differ from the SAMtagparsed at encode time- CLI 3-part format:
--label edit_dist:C:NM(name:type:tag) - YAML: optional
tagfield per label definition - Tag is encode-time only; not stored in the ZNA file
- If only name or tag is given, the other defaults to the same value
- CLI 3-part format:
- YAML label specification files (
--label-defs labels.yaml)- Define labels, descriptions, dtypes, and missing values in a single file
- CLI
--label/--label-descflags override YAML definitions - Sample template:
examples/labels.yaml
- C++ accelerated label encode/decode — labeled files now use the C++
backend for both encoding and decoding, eliminating the Python fallbackencode_block_labeled: encodes sequences + pre-packed label columns in C++decode_block_labeled: decodes sequences and unpacks label columns by dtypeextract_labels_fast: zero-allocation C++ SAM-tag extraction from headers
- Optimized Python header parsing (fallback path)
- Eliminated
bytes.decode()calls —int()/float()accept bytes directly - Replaced lambda dispatch with integer conv-codes
- Early-exit when all labels found
- Eliminated
Performance
- Labeled encode: 336K rec/s (was 80K rec/s) — 4.2× faster
- Labeled decode: 2.23M rec/s (was 610K rec/s) — 3.7× faster
- Label overhead reduced from ~39% to within typical I/O variance
Changed
- Binary format: label definition on-disk size is now 89 bytes
(16 name + 64 desc + 1 dtype_code + 8 missing) LabelDef.paramreplaced byLabelDef.missing(explicit missing sentinel)- Header field splitting uses any whitespace (tabs and spaces) so fastp
merged_XX_YYsuffixes no longer corrupt trailing tag values - Label tag parsing now supports variable-length keys in
KEY:TYPE:VALUE
header fields (not limited to 2-character SAM tags)- Python fallback parser and C++
extract_labels_fastuse dynamic key parsing - Supports mixed key lengths in the same header (e.g.
NM+edit_distance)
- Python fallback parser and C++
- Dropped fixstr (
Z) label type — all labels are numeric
Documentation
- Expanded README strand guidance to explicitly document
--strand-normalizebehavior and its interaction with--strand-specific - Updated label docs and
examples/labels.yamlto showname+tag
decoupling and custom non-SAM, variable-length header keys
v0.2.0
ZNA v0.1.8
ZNA v0.1.7
ZNA v0.1.5
- change to compressed block storage format to improve compression ratio
- performance optimizations
ZNA v0.1.4
- Performance updates. Integration with pypi and conda.
- Default to compressed format, uncompressed only if user specifies
Full Changelog: v0.1.2...v0.1.4
ZNA v0.1.2
- Support for "N" nucleotides with options for handling them
- Support for mixed paired-end and single-end interleaved reads
Full Changelog: v0.1.1...v0.1.2
ZNA v0.1.1
ZNA v0.1.0
Full Changelog: https://github.com/mkiyer/zna/commits/v0.1.0