arrayloaders.io.add_h5ads_to_store

arrayloaders.io.add_h5ads_to_store(adata_paths, output_path, chunk_size=4096, shard_size=65536, zarr_compressor=(BloscCodec(typesize=None, cname=<BloscCname.lz4: 'lz4'>, clevel=3, shuffle=<BloscShuffle.shuffle: 'shuffle'>, blocksize=0), ), cache_h5ads=True)

Add h5ad files to an existing Zarr store.

Parameters:
  • adata_paths (Iterable[PathLike[str]] | Iterable[str]) – Paths to the h5ad files used to create the zarr store.

  • output_path (PathLike[str] | str) – Path to the output zarr store.

  • chunk_size (int, default: 4096) – Size of the chunks to use for the data in the zarr store.

  • shard_size (int, default: 65536) – Size of the shards to use for the data in the zarr store.

  • zarr_compressor (Iterable[BytesBytesCodec], default: (BloscCodec(typesize=None, cname=<BloscCname.lz4: 'lz4'>, clevel=3, shuffle=<BloscShuffle.shuffle: 'shuffle'>, blocksize=0),)) – Compressors to use to compress the data in the zarr store.

  • cache_h5ads (bool, default: True) – Whether to cache the h5ad files into memory before writing them to the store.

Examples

>>> from arrayloaders.io.store_creation import add_h5ads_to_store
>>> datasets = [
...     "path/to/first_adata.h5ad",
...     "path/to/second_adata.h5ad",
...     "path/to/third_adata.h5ad",
... ]
>>> add_h5ads_to_store(datasets, "path/to/output/zarr_store")