-
Notifications
You must be signed in to change notification settings - Fork 7
Better support for OME-Zarr with singleton T dimension #663
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
Comments
Hey @BioinfoTongLI You mentioned somewhere you managed to drop the time dimension, right? I guess our illumination correction task is another example of a task not handling varying image dimensions well! |
Thanks for the reply! Do you mean there the 2D profile is applied to each FOV across all Zs? Are you planning on doing 3D correction? basically one Z position -> one profile. It is natively supported by
Nope, it seems too much work. The whole folder needs to be recreated...Still trying to figure out how to walk around this issue |
That is interesting. I wasn't aware that BaSiCpy had such a correction. @adrtsc has developed some BaSiCpy Fractal tasks for handling 2D illumination correction (see https://github.com/Apricot-Therapeutics/APx_fractal_task_collection). If you are building something broader for BaSiCpy processing of OME-Zarrs, would be great to also get this into Fractal of course! We are in the process of refactoring our Task API and are hoping to release Fractal 2.0 with more flexible server and simpler Task API, so may be worth to revisit it in the new version :)
Ah, that's a pity! Unfortunately, we won't have a chance to work on making our tasks more flexible in axes handling before our Fractal 2.0 transition that we're currently focusing on, but you nicely highlight the importance of picking this up soon after! |
@BioinfoTongLI I've also started looking into this, as we just had some users with the same issue. I also can't find a way to do this without rewriting the whole Zarr, which is a pity. I'll nonetheless try my luck at creating a Fractal task that copies a Zarr & drops a singleton T dimension to enable our users to use our other tasks. Still, it will be helpful once we update more tasks to use Zarr loading that is robust to this of course! Given the current state of OME-Zarr reading & writing libraries, I'm not sure whether I expect everyone to adopt the same system though. We currently often fall back on the raw Zarr API, which means we'd have to explicitly handle such cases and others may be doing similar things. |
Hey @BioinfoTongLI I now have a working (very early) prototype of a python function that drops the T dimension from an OME-Zarr. It creates a second Zarr with a suffix in the name with the same image, just no T dimension. Lot's of improvements still TBD of course, but it's working on our test data. Maybe a way for you to check out some of the Fractal tasks as well :) |
Thanks a lot @jluethi for helping out here! |
Hi @jluethi, sorry for being radio silent for a while. I've tried the helper function is it's working great! |
Hey @BioinfoTongLI The way we handle this in Fractal is that users/developers write tasks that run e.g. per image and the Fractal server then submits this task to all available images. If you have a pre-existing OME-NGFF plate, the Import OME-Zarr task is what we use to get the list of all the available Zarr images (either within Fractal or run separately). If you run it outside of Fractal, you could probably just run e.g. if you have a Zarr plate located like this: /path/to/my/zarr/plate.zarr Then running:
You can turn on or off the This function returns a dict with |
See more info about these concepts in Fractal 2.0 in the 2 pages here: |
Thanks so much @jluethi ! I think I've made it working. - I couldn't wait to try it out when I saw your answers and keep forgetting sending feedback. sorry about that! |
That's awesome, glad to hear that! And no worries, Github is for async conversations anyway. The speed of my answers also vary ;) |
Downstream processing after #662. I've manually rename
image_ROI_table
toFOV_ROI_table
and it seems to be working.Then I've prepared a fake correction profile for all channels
and ran with
Here's the error msg I've got:
In this case, is the shape of 5D
image_stack
unexpected or thecorr_img
?The text was updated successfully, but these errors were encountered: