Skip to content

Dependency issue with spatialdata #502

@liz-is

Description

@liz-is

I'm trying to visualise some Xenium data, inspatialdata format, with Vitessce, using the functions in vitessce.data_utils for optimisation. However, I can't get versions of the spatialdata and vitessce-python packages to install that have all the functionality I need.

I'm using uv for environment management.

  • If I install vitessce first:
uv add "vitessce[all]"
uv add spatialdata
uv add "setuptools<=81" # otherwise I get an import error

I get the following package versions (snipped to those I thought might be relevant, let me know if you need the full list):

Package                   Version
------------------------- -----------
ome-zarr                  0.10.2
spatialdata               0.5.0
vitessce                  3.8.3
zarr                      2.18.7

With these versions, I can't load a Zarr store of data processed with spatialdata version 0.7.3 (following the squidpy tutorial):

>>> sdata = read_zarr("../../data/Xenium-Human-Ovarian-Cancer/Xenium_Prime_Ovarian_Cancer_FFPE_processed.zarr")
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    read_zarr("../../data/Xenium-Human-Ovarian-Cancer/Xenium_Prime_Ovarian_Cancer_FFPE_processed.zarr")
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/vitessce-pilot/env-testing/vitessce-first/.venv/lib/python3.13/site-packages/spatialdata/_io/io_zarr.py", line 74, in read_zarr
    f, f_store_path = _open_zarr_store(store)
                      ~~~~~~~~~~~~~~~~^^^^^^^
  File "/Users/vitessce-pilot/env-testing/vitessce-first/.venv/lib/python3.13/site-packages/spatialdata/_io/io_zarr.py", line 35, in _open_zarr_store
    f = store if isinstance(store, zarr.Group) else zarr.open(store, mode="r")
                                                    ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/Users/vitessce-pilot/env-testing/vitessce-first/.venv/lib/python3.13/site-packages/zarr/convenience.py", line 139, in open
    raise PathNotFoundError(path)
zarr.errors.PathNotFoundError: nothing found at path ''
>>> import os
>>> os.path.exists("../../data/Xenium-Human-Ovarian-Cancer/Xenium_Prime_Ovarian_Cancer_FFPE_processed.zarr")
True
  • If I install spatialdata first:
uv add spatialdata
uv add "vitessce[all]"

I get the following package versions (snipped to those I thought might be relevant, let me know if you need the full list):

Package                   Version
------------------------- -----------
ome-zarr                  0.15.0
spatialdata               0.7.3
vitessce                  3.5.1
zarr                      3.2.1

Then I can read the same Zarr store successfully:

>>> from spatialdata import read_zarr 
>>> sdata = read_zarr("../../data/Xenium-Human-Ovarian-Cancer/Xenium_Prime_Ovarian_Cancer_FFPE_processed.zarr")
>>> 

But vitessce-python==3.5.1 doesn't have the vitessce.data_utils functions that are used for optimisation, e.g. sdata_morton_sort_points, sdata_points_process_columns, etc.

Questions

  • Is it intentional that recent versions of vitessce-python are only compatible with older versions of spatialdata? If so, can you provide some guidance as to the most recent suitable version of spatialdata I can use to be compatible with vitessce-python?
  • How important are the optimisations? Is it worthwhile trying to visualise my data with an older version of vitessce-python where these helpers aren't available? I can't currently get the widget to work but I'm not sure if that's because of the version issues or something else (following this notebook but the example data URL gives a 404).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions