Input/Output#
To read the data from a specific technology (e.g., Xenium, MERSCOPE, …), you can use any of the spatialdata-io readers.
- spatialdata.read_zarr(store, selection=None)#
Read a SpatialData dataset from a zarr store (on-disk or remote).
- Parameters:
store (
str
|Path
|Group
) – Path to the zarr store (on-disk or remote) or a zarr.Group object.selection (
Optional
[tuple
[str
]] (default:None
)) – List of elements to read from the zarr store (images, labels, points, shapes, table). If None, all elements are read.
- Return type:
- Returns:
: A SpatialData object.
- spatialdata.save_transformations(sdata)#
Save all the transformations of a SpatialData object to disk.
- Return type:
None
- sdata
The SpatialData object
- spatialdata.get_dask_backing_files(element)#
Get the backing files that appear in the Dask computational graph of an element/any element of a SpatialData object.
- Parameters:
element (
SpatialData
|DataArray
|DataTree
|GeoDataFrame
|DataFrame
|AnnData
) – The element to get the backing files from.- Return type:
list
[str
]- Returns:
: List of backing files.
Notes
It is possible for lazy objects to be constructed from multiple files.