Skip to content

Conversation

@talonchandler
Copy link
Contributor

@talonchandler talonchandler commented Feb 19, 2025

This PR contains minor spec-mismatch bug fixes to enable iohub info to work with .zarr files converted from .nd2 using bioformats2raw conversion tool.

For example:

iohub info /hpc/projects/comp.micro/zebrafish-macrophage/2025-02-15-93a 4dpf/250215_93a_4dpf_em2_sib_2048_002.zarr/0

prints

Reading file:	 /hpc/projects/comp.micro/zebrafish-macrophage/2025-02-15-93a-4dpf/250215_93a_4dpf_em2_sib_2048_002.zarr/0
Zarr hierarchy:
/
 ├── 0 (10, 3, 66, 2048, 2048) >u2
 ├── 1 (10, 3, 66, 1024, 1024) >u2
 ├── 2 (10, 3, 66, 512, 512) >u2
 └── 3 (10, 3, 66, 256, 256) >u2

=== Summary ===
Format:			 omezarr v0.4
Axes:			 t (time); c (channel); z (space); y (space); x (space); 
Channel names:		 ['DIA', 'GFP', 'RFP']
(Z, Y, X) scale (um):	 (1.0, 0.157177107973598, 0.157177107973598)
Chunk size:		 (1, 1, 1, 1024, 1024)
No. bytes decompressed:		 16609443840 [15.5 GiB]

Note: bioformats2raw seems to create single positions stacked one layer deeper than our typical single positions, so I call iohub info on .zarr/0.

Note: @ziw-liu @mattersoflight I'm tagging you here to keep you in the loop. I'll plan to request your review after we've completed a phase reconstruction during the week of March 3.

@talonchandler talonchandler changed the title Support metadata from .zarr converted from .nd2 using bioformats2raw conversion Support metadata for .zarr converted from .nd2 using bioformats2raw conversion Feb 19, 2025
@ziw-liu
Copy link
Contributor

ziw-liu commented Feb 26, 2025

I'm noticing some OMERO-related issues. Might also be related to #270.

@talonchandler talonchandler marked this pull request as ready for review March 10, 2025 16:38
@talonchandler talonchandler requested a review from ziw-liu March 10, 2025 16:39
@talonchandler
Copy link
Contributor Author

@ziw-liu we found this PR necessary to open bioformats2raw-converted .zarr files last week, and we found that the resulting files were interpretable by waveorder.

@ziw-liu are the existing tests sufficient, or would you suggest more? Do we need to upload a bioformats2raw-converted dataset?

@ziw-liu
Copy link
Contributor

ziw-liu commented Mar 10, 2025

I'm trying to understand the changes to the metadata models, but the file in OP has been removed. @talonchandler can you point me to an example?

@talonchandler
Copy link
Contributor Author

Pardon me! Here's a test. Thank you @ziw-liu.

(iohub-dev) [talon.chandler@login-fry1] ~/iohub
16:52:07 $ git checkout main
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
(iohub-dev) [talon.chandler@login-fry1] ~/iohub
16:55:03 $ **iohub info /hpc/projects/virtual_staining/datasets/shiau-lab/2025-02-28-93a-4dpf-2um/0-convert/250228_4dpf_em5_mut_pLLG_fullview_010_WellA01_ChannelX_Seq0000.zarr/A/1/0/
Reading file:	 /hpc/projects/virtual_staining/datasets/shiau-lab/2025-02-28-93a-4dpf-2um/0-convert/250228_4dpf_em5_mut_pLLG_fullview_010_WellA01_ChannelX_Seq0000.zarr/A/1/0
Error: No compatible dataset is found.**
(iohub-dev) [talon.chandler@login-fry1] ~/iohub
16:55:09 $ git checkout nd2-conversion
Switched to branch 'nd2-conversion'
Your branch is up to date with 'origin/nd2-conversion'.
(iohub-dev) [talon.chandler@login-fry1] ~/iohub
16:55:22 $ iohub info /hpc/projects/virtual_staining/datasets/shiau-lab/2025-02-28-93a-4dpf-2um/0-convert/250228_4dpf_em5_mut_pLLG_fullview_010_WellA01_ChannelX_Seq0000.zarr/A/1/0/
Reading file:	 /hpc/projects/virtual_staining/datasets/shiau-lab/2025-02-28-93a-4dpf-2um/0-convert/250228_4dpf_em5_mut_pLLG_fullview_010_WellA01_ChannelX_Seq0000.zarr/A/1/0
Zarr hierarchy:
/
 ├── 0 (11, 3, 29, 2048, 2048) >u2
 ├── 1 (11, 3, 29, 1024, 1024) >u2
 ├── 2 (11, 3, 29, 512, 512) >u2
 └── 3 (11, 3, 29, 256, 256) >u2

=== Summary ===
Format:			 omezarr v0.4
Axes:			 t (time); c (channel); z (space); y (space); x (space); 
Channel names:		 ['RFP', 'GFP', 'DIA']
(Z, Y, X) scale (um):	 (2.0, 0.157177107973598, 0.157177107973598)
Chunk size:		 (1, 1, 1, 1024, 1024)
No. bytes decompressed:		 8027897856 [7.5 GiB]  

@ziw-liu
Copy link
Contributor

ziw-liu commented Mar 21, 2025

@talonchandler a more complete version of b2244ec is in main via #284 (hence the conflict). You can decide how to merge/rebase/cherrypick.

@ziw-liu ziw-liu added bug Something isn't working NGFF OME-NGFF (OME-Zarr format) labels Mar 21, 2025
@ziw-liu ziw-liu added this to the 0.2.0 milestone Mar 21, 2025
@talonchandler talonchandler requested a review from ziw-liu March 25, 2025 23:39
@talonchandler talonchandler merged commit 316e919 into main Mar 25, 2025
7 checks passed
@talonchandler talonchandler deleted the nd2-conversion branch March 25, 2025 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working NGFF OME-NGFF (OME-Zarr format)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants