Skip to content

v0.0.14

Choose a tag to compare

@selmanozleyen selmanozleyen released this 25 Nov 13:13
ae1bd79

Added

  • scfit.data.open_adata(path, *refs, uns_keys=...) opens a .zarr or .h5ad store with exactly the parts the anndata.acc references name: A.X, A.layers[k], A.obsm[k] (arrays, on disk for zarr), A.obs[col] and A.obs.index. A .h5ad file's arrays are read into memory and the file is closed

Changed

  • Breaking: array locations are anndata.acc references instead of loc strings. Stream(reps=...) is required (no default: A.X is never implied) and takes A.X, A.layers[k] or A.obsm[k], or a sequence of them, and rejects strings and references into an array. Batches from Loader and EvalLoader are keyed by these references: batch["primary"][A.obsm["X_pca"]]. Migrate "X" to A.X, "obsm/X_pca" to A.obsm["X_pca"] and "layers/k" to A.layers["k"]; a config string resolves with A.resolve("obsm.X_pca", vec=False). group_by and match_on stay column names
  • Breaking: open_source(src, keys=..., cols=..., uns=...) is now open_source(src, *refs, uns_keys=...), with arrays, A.obs[col] and A.obs.index as references. It also opens .h5ad paths, reading only the named parts
  • load_backed_adata is removed; open_adata and open_source open zarr stores the same way
  • open_adata and open_source raise one KeyError naming every missing rep, obs column and uns key, with what the store has, instead of failing on the first lookup
  • annbatch is installed with its numba extra, which it needs to stream in-memory sparse arrays such as a .h5ad X
  • A source whose files hold a rep on disk in some (zarr) and in memory in others (.h5ad, in-memory AnnData) raises, since annbatch streams one kind per source; .h5ad is always read into memory
  • open_adata(..., missing="skip") leaves out the parts a store lacks instead of raising, for a dataset whose files each hold some of them
  • An annbatch DatasetCollection root is refused in a list of paths too, and obs columns come back in the requested order