Repository navigation
adata-cli 0.5.0
First release under the new name. pip install pyadata-cli — the command is adata.
The distribution is
pyadata-clibecauseadata-cliwas claimed on PyPI by an unrelated project. The import package and the command are bothadata.
Why this release matters
The tool could not read any file written by anndata ≥ 0.11. Since pandas' future.infer_string became the default, anndata writes obs/_index as a nullable-string-array group rather than a dataset, and axis_len required a dataset — so info, export dataframe and subset all failed outright on essentially every file produced in the last year.
That is fixed, and now verified in CI against stores written by anndata 0.8, 0.9, 0.10, 0.11, 0.12 and 0.13, in both .h5ad and .zarr.
Two further faults fixed along the way:
- HDF5 → Zarr conversion failed on any store with string columns, i.e. all of them.
subsetsilently droppedraw/. It is now carried over and matched against its own var axis.
Renamed
h5ad → adata-cli; the command is adata; info is now view. The h5ad command and the info subcommand remain as deprecating aliases and will be removed in 1.0.0.
New commands
adata view data.h5ad # AnnData-aware inspection
adata ls data.h5ad --long # any HDF5/Zarr store, incl. .loom
adata create out.h5ad --n-obs 5000 --n-var 2000
adata subset data.h5ad -o out.h5ad -q "cluster == Cortex_2 and n_counts > 1000"
adata split data.h5ad --by sample -o per_sample/
adata concat per_sample/*.h5ad -o merged.h5ad --join outer --label samplels— tree listing of any HDF5 or Zarr store, no AnnData assumptions.-1emits bare paths for piping.create— write a valid empty store forimportto fill in.split --by— one store per distinct value of a column, with a CSV manifest. Closes #2.concat— obs-axis concatenation with inner/outer join and merge strategies. Verified to agree withanndata.concat.subset --obs-query/--var-query— a small predicate language evaluated while streaming; no new dependency.
Closes #4: results go to stdout with status on stderr, export dataframe accepts any dataframe path, and export array can write to stdout.
Correctness
Everything written is now tagged with its encoding-type and encoding-version; text is variable-length UTF-8 as the spec requires; categoricals keep ordered and survive a CSV round-trip; None round-trips via anndata's null encoding. Sparse subsetting streams in blocks (byte-exact against scipy). All four HDF5/Zarr pairings convert, across Zarr v2 and v3.
Testing
1029 tests, coverage 92% with a 90% floor enforced in CI. The compatibility suite builds a store with each pinned anndata release in its own environment and checks that what this tool writes reopens in that same release.
Full detail in CHANGELOG.md. Documentation at https://cellgeni.github.io/adata-cli/.