New dependency for 10x `.h5` output: `hdf5-pure` (pure Rust, no libhdf5)
I maintainer di solito rispondono entro 4 giorni
@Psy-Fer ci sta già lavorando.
Dal 28/10/2026.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reading this issue alongside #340, which determines whether 10x HDF5 output is wanted; this issue asks maintainers to decide whether to accept hdf5-pure or omit .h5 output. The payload names no source files or tests to start from. Done means a maintainer decision on the dependency and output direction; any implementation depends on that decision.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
CONTRIBUTING asks for a new dependency to be raised in an issue before the PR,
especially a non-Rust one. This one is pure Rust, but it is still a dependency
and a supply-chain decision, so here it is.
What needs it
Writing *_feature_bc_matrix.h5 — the HDF5 form of the count matrix that
scanpy.read_10x_h5 and Seurat's Read10X_h5 load. Without it the
CellRanger-compatible output is of limited use, since that is the file most
pipelines actually open. (See #340 for whether that output is wanted at all and
whether its development method is acceptable; this issue is only about how the
file would be written, and is moot if #340 is declined.)
The candidate
hdf5-pure 0.47.0
- Licence
MIT OR Apache-2.0, both already inabout.toml's accepted list.
It shipsLICENSE-MITandLICENSE-APACHEat the crate root, where
cargo-aboutlooks, so noclarifyentry is needed. - Dependencies: one —
byteorder, which rustar-aligner already depends on. - No C, no
-syscrate, nobindgen, no system library, no build script.
cargo installand the Windows build are unaffected. - Supports what the 10x layout needs: nested groups, fixed-width ASCII string
datasets (which is what CellRanger itself writes —|S18,|S15), chunked
extendable datasets, and typed root attributes.
Alternatives considered
hdf5-metno(the maintained fork ofhdf5-rust): bindings to the C
libhdf5. Works, but it is exactly the non-Rust dependency the policy singles
out, and it needs a system library at build time.- Hand-rolling a minimal HDF5 writer: feasible for contiguous 1-D datasets,
and fixed-length strings avoid the global-heap work — but it is ~1000+ lines
of binary-format code whose failure mode is a file that one reader accepts and
another rejects. Hard to justify against a 2-dependency crate. - Shipping no
.h5: the honest fallback if the dependency is unwanted. The
MatrixMarket output already exists; users would convert it themselves.
What I have and have not tested
Validated, on macOS aarch64 only:
- Output read by the reference C library (
h5dump/h5ls, exit 0, no stderr)
and byscanpy.read_10x_h5, on both a small fixture and a real 33,696-gene
mouse matrix. - Matrix contents diffed entry by entry against the
.mtxwritten from the same
counts — identical, including the barcode and feature columns. - Structure diffed against a real CellRanger 10.0.0
.h5: every dataset name,
dtype and root-attribute type matches.
Not tested, and this is the gap that matters for a dependency decision:
- Any platform other than macOS aarch64. rustar-aligner builds on five
platforms including Windows. The crate has no build script and no C, so there
is no obvious reason for it to differ, but I have not demonstrated that and
it is CI's question rather than one I can close locally. - Degenerate shapes through the full writer: zero called cells, a single gene,
a single barcode. The unit tests cover the guards that refuse a malformed
matrix, not these shapes end to end.
Two things worth knowing before adopting it
- It is young (0.47.0, but a 2026 crate). It ships extensive benchmarks
against real ENA data and the validation above came out clean, but it has
far less mileage than libhdf5, and the bug below is the kind of thing that
implies. - It has a bug worth pinning. It encodes a chunk dimension in two bytes, so
a chunk larger than 65535 elements produces a file the reference HDF5 library
refuses outright ("stored chunk dimension encoding length does not match
value calculated from chunk dimensions") — no 10x reader can open it. Real
CellRanger files use 80000-element chunks, i.e. above that limit, so this is
the crate's bug and not a format constraint. My code has a compile-time
assertion holding the chunk size at or below 65535. I will report it
upstream before this PR; the repro is three lines, and how it is received
is probably better evidence about the crate's stewardship than anything I
can test locally.
Question
Is a pure-Rust HDF5 dependency on these terms acceptable, or would you rather
rustar-aligner not write .h5 at all?
- Lingua principale
- Rust
- Stelle
- 91
- Fork
- 9
- Merge medio
- 16h 43m
- PR unite (30g)
- 22
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di scverse/rustar-aligner
-
CellRanger-compatible `outs/` output (`metrics_summary.csv`, `.h5` matrices, `web_summary.html`) — checking the development method before opening PRsForse già presa @Psy-Fer l’ha presa oggi. Apertasensitive license
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
scverse/rustar-aligner#340 · 1 commento · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 1/100
scverse/rustar-aligner#324 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
scverse/rustar-aligner#299 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 5/100
scverse/rustar-aligner#298 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
scverse/rustar-aligner#277 ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di scverse/rustar-aligner
Issue simili
-
area: library data-loss type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
alplabai/signex#1740 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
test(fslc): the unreadable mutate catalog test pins the Unix I/O error text and fails on WindowsForse già presa @rizumita l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
I maintainer di solito rispondono entro 1 giorno
-
ServerProperties defaults white-list to true, so a fresh --dedicated server silently locks itselfAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
horizon-rust/horizon#3888 ·
I maintainer di solito rispondono entro 1 giorno
-
refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno