Repository navigation
convert: read one dataset of a plain HDF5 file (#25) - #65
Conversation
anndata's read_hdf, streamed: --key names a 2-D numeric dataset, which becomes X (CSR, or dense with --dense), its dtype kept; --transpose reads one holding genes as rows. Names come from read_hdf's root row_names and col_names, or --obs-names-key / --var-names-key. - Without --key nothing is written: the refusal lists the 2-D numeric datasets and the 1-D ones that could hold names. - No content sniff, which would take h5ad files: .hdf5, .he5 and .hdf by extension, a plain .h5 with --from hdf5. An HDF5 file no format reads now says to pass --from hdf5. - The slab writer moves from loom.py to conversion/dense.py, shared by loom's genes x cells matrices and both orientations here: slabs of whole chunks along the cell axis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d8dd16af8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Found in review: a complex64 or complex128 dataset was refused as not numeric, though anndata stores complex arrays and read_hdf reads them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #25 with the text PR below it (read_hdf). Stacked on the text PR; it retargets to
mainonce that merges.What it reads
One 2-D numeric dataset of a plain HDF5 file as X, as anndata's
read_hdf:--keynames it; without it nothing is written and the refusal lists the 2-D numeric datasets (shape, dtype) and the 1-D ones that could hold names;row_names/col_names(naming the dataset's rows and columns), or--obs-names-key/--var-names-key; a misfit length warns and numbers that axis;--transposefor genes as rows; dtype kept; CSR, or--dense.Recognised as
.hdf5/.he5/.hdfby extension only (a content sniff would take h5ad files). A plain.h5that is not 10x needs--from hdf5, and an HDF5 file no format reads now says exactly that.How
The slab writer moves from
loom.pytoconversion/dense.py(write_dense_matrix,slab_size), shared by loom (genes x cells) and both orientations here: slabs of whole chunks along the cell axis.loom.SLAB_BYTESstays loom's knob.Checks
tests/test_hdf5.py: listing refusal, names from root and flags, numbering with a warning, keys that are no matrix, transposed CSR and dense, slabs across chunks,--from hdf5on.h5while a 10x.h5stays 10x, make-unique.anndata.read_hdf(and.T) gives the same X, dtype and names.🤖 Generated with Claude Code