Commit e2d2a25
Sort layers alphabetically for deterministic h5ad output
The HDF5 B-tree stores group children in insertion order, and Python
set iteration order (used when populating layers from output_assays)
is non-deterministic. This caused the layers (spliced, unspliced,
ambiguous) to be written in different orders across runs, producing
different md5 checksums even though the data was identical.
Sort layers alphabetically via OrderedDict before writing h5ad files
to ensure byte-level reproducibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c327d6a commit e2d2a25
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
472 | 476 | | |
473 | 477 | | |
474 | 478 | | |
| |||
494 | 498 | | |
495 | 499 | | |
496 | 500 | | |
| 501 | + | |
| 502 | + | |
497 | 503 | | |
498 | 504 | | |
499 | 505 | | |
| |||
0 commit comments