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

ZarrReader doesn't read zarrs without top-level 'series' #99

Open
dominikl opened this issue Oct 28, 2024 · 6 comments
Open

ZarrReader doesn't read zarrs without top-level 'series' #99

dominikl opened this issue Oct 28, 2024 · 6 comments

Comments

@dominikl
Copy link
Member

Bioformats2raw creates ome.zarrs with "0" top-level directory ("series" : [ "0" ] in OME/.zattr). These import fine. But when you remove this top level directory, it reports ("no imports found"):

(venv3) bash-5.1$ /opt/omero/server/OMERO.server/bin/omero import -T Dataset:18451 --transfer=ln_s --depth=100 -n /uod/idr/filesets/idr0138-lohoff-seqfish/20210917-Globus/ngff/TimEmbryos-102219/HybCycle_0/MMStack_Pos0.ome.zarr
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
2024-10-28 14:54:58,602 313        [      main] INFO          ome.formats.importer.ImportConfig - OMERO.blitz Version: 5.7.4
2024-10-28 14:54:58,620 331        [      main] INFO          ome.formats.importer.ImportConfig - Bioformats version: 7.3.1 revision: 41e12f630ad7349caa0293cba23948c17d22732b date: 11 July 2024
2024-10-28 14:54:58,678 389        [      main] INFO   formats.importer.cli.CommandLineImporter - Setting transfer to ln_s
2024-10-28 14:54:58,682 393        [      main] INFO   formats.importer.cli.CommandLineImporter - Log levels -- Bio-Formats: ERROR OMERO.importer: INFO
2024-10-28 14:54:59,073 784        [      main] INFO      ome.formats.importer.ImportCandidates - Depth: 100 Metadata Level: MINIMUM
No imports found

I don't think this top-level series is mandatory, is it? At least for older ome.zarrs (see above example from idr0138) we didn't use that. A previous version of the ZarrReader must have supported that.

@dominikl
Copy link
Member Author

/cc @sbesson any ideas? The currently imported idr0138 images are fine though. So ZarrReader can read the image data without the 0 series. But for some reason for the import it expects the 0 series top-level directory.

@sbesson
Copy link
Member

sbesson commented Oct 29, 2024

I suspect whatever changes caused the issue were introduced as part of the overhaul in #64.

What do you mean by "Remove this top level directory"? Are you referring to the OME Zarr group or the 0 Zarr group?

@dominikl
Copy link
Member Author

Ah, that's possible. I see if I can fix that...

With removing I mean move the contents out of this '0' top-level directory, one level up (tile_5.ome.zarr vs tile_5_with_labels.ome.zarr):
Screenshot 2024-10-29 at 10 14 56

And remove the '0' series from OME/.zattrs.

{
  "series" : [ "0" ]
}

The resulting zarr looks fine imo, according to validator, and can also be viewed in vizarr. But unfortunately not imported (no imports found).

https://ome.github.io/ome-ngff-validator/?source=https://minio-dev.openmicroscopy.org/idr/with_labels/tile_5_with_labels.ome.zarr

@sbesson
Copy link
Member

sbesson commented Oct 29, 2024

Is OME/METADATA.ome.xml present in your directory? The reader definitely includes some logic which parses this XML and tries to map it into the Zarr groups. If that's the source of the issue, you might look into tightening the conditions
of detection of this file

@dominikl
Copy link
Member Author

dominikl commented Oct 29, 2024

Same problem after I removed OME directory. Also idr0138 don't have OME dir and show the same "no imports" issue. Anyway, I'll check the PR you mentioned, maybe I can find out where this 0 series assumption sneaked in.

@dominikl
Copy link
Member Author

So for my ...with_labels.ome.zarr example the problem is actually the "labels" in the filename! Fixed here: b2c2b9c . Doesn't explain the "no imports" for idr0138 zarrs. But I'll look into that again later.

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

No branches or pull requests

2 participants