An open API service indexing awesome lists of open source software.

https://github.com/ome/omero-biofilefinder

OMERO.web plugin for opening data in BioFile Finder
https://github.com/ome/omero-biofilefinder

Last synced: 12 days ago
JSON representation

OMERO.web plugin for opening data in BioFile Finder

Awesome Lists containing this project

README

          

[![Actions Status](https://github.com/ome/omero-biofilefinder/workflows/OMERO/badge.svg)](https://github.com/ome/omero-biofilefinder/actions)

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.

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](https://github.com/AllenInstitute/biofile-finder/pull/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](https://github.com/ome/cookiecutter-omero-webapp).
2. For further info on deployment, see [Deployment](https://docs.openmicroscopy.org/latest/omero/developers/Web/Deployment.html)

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