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

[WIP] High Content Screening OME-NGFF example #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jluethi
Copy link
Contributor

@jluethi jluethi commented Jun 23, 2022

I'm trying to add an HCS example dataset, here's a WIP PR for this.

Motivation: Provide example data in the OME-NGFF High Content Screening format spec

My example dataset contains 2x2 field of views (fovs) for a single well, with label images, already saved in the OME-Zarr HCS spec. Additionally, I have feature measurements for each site saved as csvs and an example script that loads those measurements and saves them as an AnnData table per site. The saving seems to work nicely and I have an AnnData tables folder per fov. Really cool to see this working already!

Current issues:

  1. I don't have a nice way to share example data. It's currently on a Google Drive, but my attempts to use gdown to download it from there directly have failed. Does anyone know an easy way to fix this? At the moment, one needs to follow the instructions in the example file to manually download the data first, unzip the OME-Zarr file & then run the example.
  2. It seems the load_to_napari_viewer function is flipping x & y dimensions here. Is that intentional? When I open my images with the napari-ome-zarr plugin, they are displayed like this:

Screenshot 2022-06-23 at 18 46 10

But when I open them with `load_to_napari_viewer`, x&y dimensions are flipped for the images (but not for the label, thus making the label not match the images anymore)

Screenshot 2022-06-23 at 18 46 13

  1. It appears the loading isn't designed to handle the plate spec. I haven't had time to look into it much. At the moment, I just load the first field of view, because load_to_napari_viewer throws a zarr.errors.ContainsGroupError: path 'tables' contains a group if I provide e.g. the full well (and full plates currently don't support displaying label images in ome-zarr-py, see here: Refactor PlateLabels ome/ome-zarr-py#65 (comment)

Solved Issues:

  1. I also used the library originally to save my label images to the OME-Zarr file. Saving 3D label images needed axes parameters & I added parsing for those for label images (not used in the example anymore, but maybe useful to somebody else)

@jluethi jluethi changed the title [WIP] HCS example [WIP] High Content Screening OME-NGFF example Jun 23, 2022
@kevinyamauchi
Copy link
Owner

Thanks, @jluethi ! This is already super helpful.

But when I open them with load_to_napari_viewer, x&y dimensions are flipped for the images (but not for the label, thus making the label not match the images anymore)

Is this also the case when you use the napari-ome-zarr plugin?

@jluethi
Copy link
Contributor Author

jluethi commented Jun 24, 2022

Is this also the case when you use the napari-ome-zarr plugin?

The upper image is opening it with the napari-ome-zarr plugin. With the plugin, it works as expected, because the dimensions are zyx.
My impression is that the load_to_napari_viewer function flips the x & y dimensions. Maybe that was to support images saved in non-standard OME-Zarr fashion? i.e. saved as zxy so far?

@kevinyamauchi
Copy link
Owner

The upper image is opening it with the napari-ome-zarr plugin. With the plugin, it works as expected, because the dimensions are zyx.
My impression is that the load_to_napari_viewer function flips the x & y dimensions. Maybe that was to support images saved in non-standard OME-Zarr fashion? i.e. saved as zxy so far?

Got it. I think that must be due to an issue with our test data having flipped axes. In any case, this won't be the final reader/writer code implemented, so I think it's okay for now. Thanks for flagging!

Copy link
Owner

@kevinyamauchi kevinyamauchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on conversations with @jluethi , this is good to merge, but he wants to update the data to match the new HCS layout they are experimenting with. Given that, we will wait to merge until he updates his images data.

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

Successfully merging this pull request may close these issues.

2 participants