ligase
ActiveReads biological dimensions (organism, reference build, coordinate system, sample order, identifier namespace) out of the files, propagates them, and type-checks every edge when the graph is built, before a step runs. A GRCh37 reference meeting a GRCh38 alignment is a DimensionError, not a plausible wrong number.
- Rust
- Python
- PyO3
ligase-bio v0.4.0 on PyPI, 4 releases, released 2026-10-30. Rust core with Python bindings via PyO3. Consumed by both SAWA and NeoRx.
Licence — MIT OR Apache-2.0
pip install ligase-bioWhat was broken.
Biological data carries dimensions the file formats do not: which organism, which reference build, which coordinate system, which order the samples are in, which identifier namespace. Nothing enforces them. A GRCh37 reference meeting a GRCh38 alignment still produces a number, and that number is wrong in a way no assertion further down the pipeline will catch. Most pipelines find out in review, if at all.
How it is wired.
A Rust core with a Python surface through PyO3. Dimensions are read out of the files rather than declared in a config, propagated as the graph is assembled, and type-checked on every edge when the graph is built — before a single step runs. A mismatch is a DimensionError at construction time rather than a plausible wrong number at the end of a run.
What I shipped.
- Dimension inference from the files themselves: organism, reference build, coordinate system, sample order, identifier namespace
- Edge-level type checking at graph construction, so a mismatch fails before any step executes
- A Rust engine with Python bindings through PyO3
- Published as ligase-bio on PyPI across four releases, with its own documentation site
- Consumed by both SAWA and NeoRx
Why these choices.
Checked at construction rather than at runtime, because the point is to fail before the expensive step and not after it. Rust for the core so the check costs nothing worth measuring, Python for the surface because that is where the pipelines already are. Dual-licensed MIT OR Apache-2.0, the convention of the ecosystem the core borrows from.