annbatch.write_sharded#
- annbatch.write_sharded(group, adata, *, sparse_chunk_size=32768, sparse_shard_size=134217728, dense_chunk_size=1024, dense_shard_size=4194304, compressors=(BloscCodec(_tunable_attrs={'typesize'}, typesize=1, cname=<BloscCname.lz4: 'lz4'>, clevel=3, shuffle=<BloscShuffle.shuffle: 'shuffle'>, blocksize=0), ), key=None)#
Write a sharded zarr store from a single AnnData object.
- Parameters:
- group
Group The destination group, must be zarr v3
- adata
AnnData The source anndata object
- sparse_chunk_size
int(default:32768) Chunk size of
indicesanddatainside a shard.- sparse_shard_size
int(default:134217728) Shard size i.e., number of elements in a single sparse
dataorindicesfile.- dense_chunk_size
int(default:1024) Number of obs elements per dense chunk along the first axis
- dense_shard_size
int(default:4194304) Number of obs elements per dense shard along the first axis
- compressors
Iterable[BytesBytesCodec] (default:(BloscCodec(_tunable_attrs={'typesize'}, typesize=1, cname=<BloscCname.lz4: 'lz4'>, clevel=3, shuffle=<BloscShuffle.shuffle: 'shuffle'>, blocksize=0),)) The compressors to pass to
zarr.- key
str|None(default:None) The key to which this object should be written - by default the root, in which case the entire store (not just the group) is cleared first.
- group