Skip to content

Commit 494d801

Browse files
committed
Fix parsing of xenium index (exclude old versions)
1 parent 722fa33 commit 494d801

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/spatialdata_io/readers/xenium.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def xenium(
202202
# pre-compute cell_id strings from the zarr once, to avoid redundant conversion
203203
# in both _get_cells_metadata_table_from_zarr and _get_labels_and_indices_mapping.
204204
cells_zarr_cell_id_str: np.ndarray | None = None
205-
if cells_zarr is not None:
205+
if cells_zarr is not None and version is not None and version >= packaging.version.parse("1.3.0"):
206206
cell_id_raw = cells_zarr["cell_id"][...]
207207
cell_id_prefix, dataset_suffix = cell_id_raw[:, 0], cell_id_raw[:, 1]
208208
cells_zarr_cell_id_str = cell_id_str_from_prefix_suffix_uint32(cell_id_prefix, dataset_suffix)

0 commit comments

Comments
 (0)