-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add OMERO File Source Plugin #21367
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
base: dev
Are you sure you want to change the base?
Add OMERO File Source Plugin #21367
Conversation
Introduces support for browsing and downloading OMERO projects, datasets, and images through a hierarchical interface.
Important: requires manual installation of additional dependencies. Instructions here: https://omero.readthedocs.io/en/stable/developers/Python.html#omero-python-language-bindings
Switches TIFF export to include every Z-plane as separate pages, preserving the full Z-stack for downstream 3D visualization or analysis. Limits export to the first channel and timepoint to maintain manageable file size.
Improves scalability and performance when browsing OMERO files by introducing paginated queries and efficient entry counting for projects, datasets, and images. Supports UI pagination and reduces memory usage for large collections by avoiding loading all objects at once.
Enables efficient search and filtering of projects, datasets, and images using HQL queries, improving scalability and user experience when browsing large OMERO repositories. Updates pagination and counting methods to support query-based operations.
Catches SecurityViolation when original file download is restricted, allowing graceful fallback to pixel data export for servers like IDR.
Pylance complains about those but mypy seems to be happy about them.
202f5d5 to
d841037
Compare
| Exports the first channel (C=0) and first timepoint (T=0) across all Z-planes. | ||
| This preserves the full Z-stack for 3D analysis while keeping the export manageable. | ||
| """ | ||
| from PIL import Image as PILImage |
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.
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.
IOW can you move the import to the top @davelopez ?
| @@ -0,0 +1,569 @@ | |||
| from contextlib import contextmanager | |||
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.
I was uneasy about the size & complexity of this file and asked Claude if it would make sense to break out an interaction layer here - their response was a fairly definitive no (https://gist.github.com/jmchilton/83abdb13c12ce0b103eb307c9e941b7d).
This PR introduces a new file source plugin that enables Galaxy users to browse and import microscopy images from OMERO servers.
Features
Warning
Multi-file formats are currently not supported. Microscopy formats that consist of multiple files (e.g., some proprietary formats) cannot be downloaded in their original form. In most cases, images will be converted and downloaded as generated multi-page TIFF files containing all Z-planes when possible.
Configuration
Requires OMERO credentials (username, password, host, port) configured via file source templates.
Dependencies
omero-py- OMERO Python clientPillow- For TIFF export fallbackHow to test the changes?
Install the
omero-pydependency following the instructions in https://omero.readthedocs.io/en/stable/developers/Python.html#omero-python-language-bindingsAdd the new file source template to your
config/file_source_templates.ymlfile:Start the Galaxy server and create a new OMERO file source in your user preferences -> Manage Your Repositories

Use the IDR connection settings or the ones from your own OMERO instance.

Browse your newly added integration from the Upload dialog using "Choose from repository" and selecting your integration.
OmeroFileSource.mp4
License