-
Notifications
You must be signed in to change notification settings - Fork 3
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
Added ome-tiff inference pipeline #8
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, the UI looks super clean. So now we don't actually need two separate notebooks, right? Since basically all of the downstream functionality is the same, it's just in the dataset class creation that things are specified slightly differently?
The difference between the two notebooks is just one line of code |
Yeah, that sounds great. Then people can use the example dataset that better matches their own data structure. |
What is the purpose of this PR?
This PR close #7 by implementing the required utility functions to run inference on ome.tiff files. The final implementation looks pretty different than the design doc. In the design doc, I proposed to implement .ome.tif versions of the following functions
calculate_normalization
,prepare_normalization_dict
,predict_fovs
. While implementing this, I figured that this is not nicely extendable, especially when thinking about additional data representations (eg. zarr, etc.) that we might need to treat in the future. Thus I decided to add a classMultiplexDataset
that abstracts away the data representation and gives a common interface via class methodsget_channel(fov: str, channel: str)
andget_segmentation(fov: str)
to the data.How did you implement your changes
I added the following new classes:
LazyOMETIFFReader
which extends pyometiffsOMETIFFReader
to allow for lazy loading of single channels from an .ome.tiff files. This makes the ViewerWidget way more responsive for .ome.tiffs.MultiplexDataset
which abstracts away the different data representations of the .ome.tiff stacks and the one-folder-per-fov representation and offers a common interface viaget_channel(fov: str, channel: str)
andget_segmentation(fov: str)
.Nimbus
andViewerWidget
classes as well as in the normalization_dict preparation code to make it work with theMultiplexDataset
.Remaining issues