Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out why omero metadata might be within multiscales[0] rather than at root level of .zattrs #257

Open
keller-mark opened this issue Jul 7, 2023 · 2 comments

Comments

@keller-mark
Copy link
Member

keller-mark commented Jul 7, 2023

Vitessce is expecting the "omero" property to be in the root of the .zattrs dict, but it is within multiscales for some reason
(Perhaps this was always a valid location for it, or perhaps it changed in a newer version of the OME-Zarr specification).
Reference: https://github.com/vitessce/vitessce/blob/cf48564ff115f1260b20a5dfd1958aaa7048ac3e/packages/file-types/zarr/src/ome-loaders/OmeZarrLoader.js#L34C13-L34C18

For now, we can manually copy the value to the root of the dict so that it is where Vitessce expects.

with open(zattrs_path, "r") as f:
    zattrs = json.load(f)

zattrs["omero"] = zattrs["multiscales"][0]["omero"]
with open(zattrs_path, "w") as f:
    json.dump(zattrs, f)
@keller-mark
Copy link
Member Author

Update: seems like a bug ome/ome-zarr-py#260

@keller-mark
Copy link
Member Author

keller-mark commented Jul 7, 2023

Related: we do specify the ome-zarr version in https://github.com/vitessce/vitessce-python/blob/main/pyproject.toml#L36

But perhaps it is not respected when installing other packages at the same time like:

pip install vitessce[all] jupyterlab

(similar to #254 issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant