mantispy.io.write#
- mantispy.io.write(adata, path, compression=None, compression_opts=None)[source]#
Validate and write
adataas h5ad (default) or zarr (.zarrsuffix).- Parameters:
- adata
AnnData Object to write, stamped with the current schema version before it is checked.
- path
str|Path Where to write it. A
.zarrsuffix selects the zarr writer.- compression
Literal['gzip','lzf'] |None(default:None) Passed to
write_h5ad();"gzip"shrinks a large imaging table substantially at the cost of write time. Ignored for the zarr writer, which compresses by default.- compression_opts
int|None(default:None) The compression level passed alongside
compression(h5ad only).
- adata
- Raises:
ValueError – The object does not satisfy the schema, with every failure
validate()found in the message.- Return type:
Notes
An object from an earlier mantispy is migrated first, so it is never relabelled as current without its content being brought up to date. A write that fails validation leaves
uns["mantispy"]as it was.