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

CLI to update metadata of zarr stores #210

Open
ieivanov opened this issue Feb 16, 2024 · 4 comments
Open

CLI to update metadata of zarr stores #210

ieivanov opened this issue Feb 16, 2024 · 4 comments
Labels
enhancement New feature or request NGFF OME-NGFF (OME-Zarr format)
Milestone

Comments

@ieivanov
Copy link
Contributor

@ziw-liu and I discussed the need to update metadata of a zarr store after it has been created. In shrimPy we have an update_scale_metadata CLI call which we use frequently - it allows us to update the scale metadata by calling Position.set_transform on all positions in a zarr store. @ziw-liu also brought up the need to update the channel names in a zarr store, and I know that @Soorya19Pradeep has also had similar needs - this can be done using Position.rename_channel.

We are asking other users if they would prefer to have CLI calls in iohub to update these metadata or if the existing python API is sufficient to do that, say in a python script.

Separately, are there other metadata fields which you have had the need to update? Is there a need for more general methods to update the ome-zarr metadata (outside of channel names and data scale)? @ziw-liu brought up the point that the metadata tree is relatively deep and a general update-metadata method will be difficult to maintain.

@edyoshikun @talonchandler @JoOkuma

@ieivanov
Copy link
Contributor Author

I have occasionally wanted to update the mix/max/start/end values of the contrast limits, such that data will open up in napari looking nice without having to adjust the contrast slider every time. Minor annoyance for now.

@ziw-liu ziw-liu added enhancement New feature or request NGFF OME-NGFF (OME-Zarr format) labels Feb 17, 2024
@JoOkuma
Copy link
Member

JoOkuma commented Feb 17, 2024

There's a napari-metadata for editing ome-zarr metadata, but it doesn't allow editing all the fields, and I'm not sure if it works with HCS files.

I usually change start and end as Ivan. To do this, I use a text editor, but this doesn't scale to multiple plates.

@edyoshikun
Copy link
Contributor

I regularly use the shrimPy update-scale-metadata especially with Falcon datasets since we don't have a way to tell it that it's a 60x vs 20x objective when we swap them, so inherently the pixel sizes in XY are wrong.
Also, currently use it for virtual staining since the predictions default scale is (1,1,1,1,1).

This probably is better suited as an iohub CLI than shrimPy.

@talonchandler
Copy link
Contributor

I agree that modifying scale, channel names, and contrast limits are good candidates for CLI shortcuts in iohub.

@ziw-liu ziw-liu added this to the 0.2.0 milestone Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request NGFF OME-NGFF (OME-Zarr format)
Projects
None yet
Development

No branches or pull requests

5 participants