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

[cellpose segmentation task] label or wavelength_id for ChannelInputModel #762

Open
BioinfoTongLI opened this issue Jun 11, 2024 · 1 comment

Comments

@BioinfoTongLI
Copy link

Hi there,

When running the cell segmentation task, the function requires a parameter called ChannelInputModel.
One could attach either label or wavelength as the input.
However, when executing the code, this line will load the existing channel from the disk (.zattrs), which requires wavelength_id to be present (?)
Shouldn't we enforce it to use wavelength_id in cellpose_segmentation in this case?

Also, my zarr was preprocessed by import_ome_zarr with update_omero_metadata=True.
This is currently not adding wavelength_id if it's missing. We can maybe duplicate label if wavelength_id is not there?

@jluethi
Copy link
Collaborator

jluethi commented Jun 14, 2024

Hey @BioinfoTongLI

Interesting point. We enforce wavelength_id present in Fractal (at least at the moment). Given that the Cellpose task fully functions when the selection happens via label, we should look for a way to relax this.

Given that this model is used in multiple places, the change isn't fully trivial.

Also, my zarr was preprocessed by import_ome_zarr with update_omero_metadata=True.
This is currently not adding wavelength_id if it's missing. We can maybe duplicate label if wavelength_id is not there?

I'd be in favor of adding this to the Import OME-Zarr task as well! Our definition for wavelength_id vs. label is:
A label is a string that describes a channel and that is unique within a given OME-Zarr image and also typically unique across some selections of OME-Zarrs (e.g. all images in a well when those images are separate acquisitions)
A wavelength_id is a string that describes a channel (by some wavelength identifier) and it's unique only within a given image (but e.g. a way to describe the same wavelength in different images where the channels have different names).

We'll probably have to revisit these definitions for the more general, non-HCS cases. I'd be fine with a solution of just adding the label as wavelength_id in the import task if there is no wavelength_id present there

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

No branches or pull requests

2 participants