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

Handle NGFF without OME/METADATA.ome.xml #7

Closed
will-moore opened this issue Aug 30, 2023 · 2 comments · Fixed by #8
Closed

Handle NGFF without OME/METADATA.ome.xml #7

will-moore opened this issue Aug 30, 2023 · 2 comments · Fixed by #8

Comments

@will-moore
Copy link
Member

I see from

if info[i][2] = 'METADATA.ome.xml' then
that mkngff expects to find a METADATA.xml with which to update the pixels table, but in the case of omero-cli-zarr-exported NGFF data, we don't have METADATA.xml, so the pixels table won't get updated, leading to the errors seen at IDR/idr-metadata#650 (comment).

We'll need to pick another file to update the pixels table with.

@will-moore
Copy link
Member Author

@josh - I can have a go at fixing this, but given my lack of sql skills, I would move the logic for finding a path/name from the setup.sql mkngff_fileset() function into the main def sql() function, to add an extra:

self.ctx.out(f"UPDATE pixels SET name = '{name}', path = '{path}' where image in (select id from Image where fileset ={args.fileset_id});

Logic would be: choose METADATA.ome.xml if it's found, otherwise use top-level .zattrs.

Let me know if you'd prefer to update mkngff_fileset() yourself and keep the logic there? - I can hold off on this (and run sql manually for now as at IDR/idr-metadata#650 (comment) for testing)?

@joshmoore
Copy link
Member

That doesn't sound too bad. I wasn't a huge fan of the if block in the SQL to begin with.

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 a pull request may close this issue.

2 participants