-
Notifications
You must be signed in to change notification settings - Fork 7
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
Refactor: How do we refer to channels? #211
Comments
We should enforce unique channel names during parsing (e.g. have DAPI_1, DAPI_2, DAPI_3, not just 3x DAPI). Then we can use channel names as a unique identifier. Let's expand on it here: #231 Ways of addressing channelsThen, there are 3 valid ways to specify a channel:
On 2: let's use the A01_C01 as a wavelength identifier for Yokogawa for the time being. If we add more microscopes, maybe we generalize this to more to a string that is more relevant to the user, but it should always be some identifier string Where is the channel information stored?We may want to have a cached place within Fractal (e.g. within the dataset or the metadata) to cache this information for easy access. But the ground truth should be in the OME-Zarr file. If it's not necessary to cache the information for Fractal, even better! :) [also, if we see the data within metadata/dataset as a cache of what's in the OME-Zarr file, it makes it easier to accept an external OME-Zarr file, we may just have to set/refresh some caches on "import"]
Example omero metadata
I tested this new omero metadata on the 2x2 example manually and the napari viewer doesn't have an issue with us adding such additional key-value pairs. Thus, the omero metadata can be the centralized place where we put all the metadata for each image. Edge case handlingBecause we use the transitional omero metadata, which is optional, we don't know whether someone who brings their own OME-Zarr file will have this metadata. We can enforce it within Fractal for our standard workflows, but we should be able to handle the case where they are not available and fail gracefully otherwise. Specifically: Option 1 is always possible, options 2 & 3 are dependent on what metadata is available. Also, this check should allow us to catch non-unique channel names or missing channel names If we are able to do input inference (see #200), then this would become very relevant. Even if we only do it at runtime (i.e. each task checks whether the label selection its getting is valid for the OME-Zarr file it should process before it starts running), this would be useful and allow us to gracefully catch channel selection that is either not available or non-unique. |
Preliminary to-do list for the next PR(s) OME-zarr-creation tasks (multiplexing or not)
Helper functions:
Tasks:
Broader:
@jluethi, anything I missed from our discussion? |
Looks good!
Aren't we already doing this? Also, we just add the channels contained in that image, not channels from other acquisitions, right?
That's the one to load channels by name in the multiplexing case, correct?
If we build the "run-per-image" functionality first, then using |
I updated the check-list above with the current status of #239 |
Still missing:
|
Let's discuss tomorrow, not sure we should have this as such a hard condition |
I agree now on this, just the between images in a well case to be discussed :) |
TO-DOs:
Usecase X:
|
We currently refer to channels via index or via the string we use in parsing (i.e. A01_C01). There are two issues that aren't covered well by this:
Thus, the broader question: How do we refer to a given channel in a way that works for multiplexing as well?
Channels have the following so far: An identifier string (e.g.
A01_C01
), an index (e.g. 0, only within an OME-Zarr image) and a name (e.g.DAPI
).There is additional metadata we currently don't have, but which may be important in some use-cases: acquisition number (hard-coded to 0 atm) and some microscope metadata (e.g. wavelength, laser used and such)
The identifier string isn't really relevant to the users, but we could get them used to it. For most use-cases, e.g. segmentation or napari workflows, users would probably related to the channel by its name. For illumination correction, the wavelength is the most important criteria. For registration, it's typically current cycle vs. cycle 0 on a specific wavelength or identifier.
Conclusion: We should have different options to refer to channels.
But we can start with 1-2 for the moment, as long as they are general enough to handle multiplexing. Selection by name is reasonable to me (if we make them unique, see below). Alternatively, selection by channel identifier (A01_C01) and acquisition number is also unique.
=> Can we define a channel selection function that can take different identifiers and as long as they can be mapped to a unique channel?
Question:
Should we enforce channel names to be unique? Would simplify selection of channels by name only and be useful when we make measurements on channel names (because we could use e.g. the channel name as a suffix to identify which intensity was measured) => I'd argue for unique channel names
The text was updated successfully, but these errors were encountered: