Skip to content

ome/omero-biofilefinder

Actions Status

OMERO BioFile Finder

This plugin supports opening a table of OMERO Images (from a Project, Dataset or Plate) in the BioFile Finder app https://bff.allencell.org/.

Key-Value pairs on Images in OMERO are converted into tabular data for BioFile Finder (BFF).

To use: select a Project, Dataset or Screen, use the context menu to Open With > BioFile Finder.

For medium numbers of Images, BioFile Finder can load Key-Value pairs "on the fly", in a single http request. If the BFF app page is refreshed, it will re-load the Key-Value pairs from OMERO.

However, for much larger numbers of Images, the time to load Key-Value pairs could become too long for a single http request. In this case, there is the option to use a server-side OMERO.script to export the Key-Value pairs to a Parquet file, attached to the Project. Then, BFF can load the Parquet file directly. You will need an Admin to install the script on the server (see below) and it has the pyarrow library as a dependency.

A third option is provided by the ability of OMERO BioFile Finder to read OMERO.tables and convert them into compatible Parquet files on the fly.

Data in webclient - images and Key-Value pairs are from idr0021. Image

Open Project with BioFile Finder... Image

This will open a page where you can select a parquet file to open in Biofile Finder, or you can directly open Biofile Finder to read data from OMERO "on the fly". Here the images are grouped by Gene Symbol. Image

Installation

This section assumes that an OMERO.web is already installed. OMERO BioFile Finder should be installed in the same python environment as OMERO.web:

$ pip install omero-biofilefinder

To add the application to the omero.web.apps settings, run the following command:

Note the usage of single quotes around double quotes:

$ omero config append omero.web.apps '"omero_biofilefinder"'

Configure Open with:

$ omero config append omero.web.open_with '["omero_bff", "omero_biofilefinder_openwith", {"supported_objects":["project", "dataset", "plate"], "target": "_blank", "label": "BioFile Finder"}]'

If your omero-web server is not aware that it is running under https, the absolute URLs generated by Django will be http. This can be tested by visiting https://your-omeroweb-url/api and checking whether the url that appears in the JSON response starts with http://. If this is the case, then other urls passed to the Biofile Finder app (for loading thumbnails from OMERO.web) will also be http and BFF will refuse to load them. To work around this, you can force Django to use https for generation of absolute URLs in BFF:

$ omero config set omero.web.bff.force_https True

Now restart your omero-web server.

Export script

We use an OMERO.server script to build a Parquet file that is read by BioFile Finder. The script depends on pyarrow library which should first be installed in the OMERO.server python environment.

The script can be uploaded by logging in to the webclient as an Admin and going to biofilefinder/admin where there is an Upload Script button. This uploads the script from the web app to the OMERO.server.

Experimental: The script can also be run locally (without using the OMERO scripting service). This will use cli_login to login to your chosen OMERO server. The exported data will get written to your current directory (where you're running the script) and the parquet file will only get attached to the target (e.g. Project or Dataset) if you can annotate it.

$ cd omero_biofilefinder/scripts
$ python omero/annotation_scripts/Export_to_Biofile_Finder.py Project:501 --base-url https://your-server.org/

Development

Installation

Install omero-biofilefinder in development mode as follows:

# within your python venv:
$ cd omero-biofilefinder
$ pip install -e .

Configure other settings as described above.

Updating the BioFile Finder app

To update the BioFile Finder app, checkout the code, build and replace existing static files:

NB: this uses PR #519.

$ git clone git@github.com:AllenInstitute/biofile-finder.git
$ cd biofile-finder
$ npm install
$ npm --prefix packages/web run build

Replace existing static files in this repo with the build artifacts:

$ rm /PATH/TO/omero-biofilefinder/omero_biofilefinder/static/omero_biofilefinder/dist/*
$ cp packages/web/dist/* /PATH/TO/omero-biofilefinder/omero_biofilefinder/static/omero_biofilefinder/dist/

Further Info

  1. This app was derived from cookiecutter-omero-webapp.
  2. For further info on deployment, see Deployment

License

This project, similar to many Open Microscopy Environment (OME) projects, is licensed under the terms of the AGPL v3.

Copyright

2024 - 2026 University of Dundee

About

OMERO.web plugin for opening data in BioFile Finder

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors