Skip to content

tables create by import_ome_zarr cannot be loaded by illumination_correction #662

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

Closed
BioinfoTongLI opened this issue Mar 4, 2024 · 3 comments · Fixed by #665
Closed

Comments

@BioinfoTongLI
Copy link

Hi there!

Great tool! Many thanks for building it!

I've imported my bioformats2raw converted ome-ngff using
from fractal_tasks_core.tasks.import_ome_zarr import import_ome_zarr
and I also added add_image_ROI_table=True using the import, since illumination_correction requires it.

However, it seems that there's a mismatch of folder name. The newly created one is called image_ROI_table
https://github.com/fractal-analytics-platform/fractal-tasks-core/blob/main/fractal_tasks_core/tasks/import_ome_zarr.py#L88
And the expected one is called FOV_ROI_table
https://github.com/fractal-analytics-platform/fractal-tasks-core/blob/main/fractal_tasks_core/tasks/illumination_correction.py#L201
Is that just an overlook? I can create a PR if so.

@jluethi
Copy link
Collaborator

jluethi commented Mar 11, 2024

Thanks for opening this issue! We should probably make the illumination correction task more flexible to allow a user to specify which ROI table is used for correction. Currently, it hard-codes the FOV_ROI_table, which we typically generate in our converters. Hard-coding this does not seem like the best approach.

Some context on why this happens:
We often store many field of views in the same Zarr. We still want to apply illumination correction per field of view though. Thus, we use the FOV_ROI_tables generated by our converter.
Our images also often have a well_ROI_table for the whole fused well. But it would be a bad idea to apply illumination correction on that one.

We started to become more flexible in the Import OME-Zarr task. We don't assume you necessarily have wells or that you fuse multiple FOVs into a single image. Thus, we name the ROI tables image_ROI_table for the whole OME-Zarr image
(& optionally grid_ROI_table: if one had fused e.g. 3x3 FOVs with regular intervals, we can generate the equivalent of our FOV_ROI_table).

Long story short: The illumination correction task should probably support differently named ROI tables as well. I'll create a quick PR that would address this

@jluethi
Copy link
Collaborator

jluethi commented Mar 12, 2024

@BioinfoTongLI In the current main, the Illumination correction task now exposes an input_ROI_table option. You can set that one to image_ROI_table in your case and then it should work without renaming them :)

@jluethi
Copy link
Collaborator

jluethi commented Mar 22, 2024

@BioinfoTongLI This is now available in the 0.14.3 release of fractal-tasks-core :)

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