fmicompbio / ez_zarr

GIve easy, high-level access to ome-zarr fileset
https://fmicompbio.github.io/ez_zarr/
MIT License
13 stars 1 forks source link

`names` and `paths` not aligned in ImageList class #12

Closed silvbarb closed 3 months ago

silvbarb commented 4 months ago

In ez_zarr 0.2.1 paths and names are wrongly assigned within the image class when using import_Fractal_plate

Example:

plate = ome_zarr.import_Fractal_plate(zarr_directory) # zarr_directory can be any Fractal-test plates
im = plate['B02'] # pick one well to showcase
im.get_paths() # returns .../_mip.zarr/G/02/0' # requested well B02, but returned image at 'G02'
csoneson commented 4 months ago

Thanks for the report - indeed I think there is an unmatched sorting step, sorry about that. Could you try to install ez-zarr from the fix-plate-sort branch and see if that does it on your data set for now? We will fix this in the release version once back from holidays.

silvbarb commented 4 months ago

I installed the fix-plate-sort branch which seems to work on my data set, now:

plate = ome_zarr.import_Fractal_plate(zarr_directory) # zarr_directory can be any Fractal-test plates
im = plate['B02'] # picking one well ... 
im.get_paths() # returns the expected path .../_mip.zarr/B/02/0' # requested well B02, returned image at 'B02'

Thanks!

csoneson commented 4 months ago

Great, thanks for checking! I have added some more unit tests as well 🙂

mbstadler commented 3 months ago

This has now been released on GitHub and PyPi (version 0.2.3, https://pypi.org/project/ez-zarr/).