Skip to content

BioNGFF/omero-biofilefinder

Repository files navigation

Actions Status

OMERO BioFile Finder

This plugin supports opening of OMERO data (e.g. a Project) in the BioFile Finder app https://bff.allencell.org/.

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

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 and this has been tested with over 400 Images.

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, Biofile Finder can load the parquet file directly. You will need an Admin to install the script on the server (see below) and it has a dependency of the pyarrow library.

NB: This app is not yet "production ready" or supported by the OME team. Feedback welcome!

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.

Development mode

Install omero-biofilefinder in development mode as follows:

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

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. Currently we only support opening a Project in OMERO BioFile Finder.

$ 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. The Biofile Finder app (which is hosted under https) will not load data from OMERO via http. To work around this, you can force Django to use https for absolute URLs with:

$ 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.

$ cd omero_biofilefinder/scripts
$ omero script upload --official omero/annotation_scripts/Export_to_Biofile_Finder.py

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/

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 University of Dundee

About

OMERO.web plugin for opening data in BioFile Finder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •