OMERO.openlink: Sharing data externally and enabling download of large data via web

Hi everyone,

there’s a new OMERO.web extension OMERO.openlink based on a script and web plugin.

You can generate URL’s for specific data for batch web download via curl (included in the newer Windows 10 builds) and to share data with other collaborates that are not in your group or member of your OMERO system.

Further informations you will find under: https://github.com/sukunis/OMERO.openlink/releases

Enjoy and please let me know if there are some issues :slightly_smiling_face:

7 Likes

Nice job, well done Susanne! Thanks for sharing!

@sukunis
Nice work.
Are you planning to make this new web app available on pypi?
Happy to try it out

Jmarie

2 Likes

Hi @sukunis,

Thank you very much for sharing this, it looks very promising!

We installed the extension on our OMERO server, and can now access the CreateOpenLink script and to the OpenLink tab in the web client, but when I try to run the script on one of my projects or datasets, I get the following error:

Traceback (most recent call last):
  File "./script", line 758, in <module>
    run_script()
  File "./script", line 739, in run_script
    mrep,orep=get_omero_paths(client)
  File "./script", line 102, in get_omero_paths
    orig_repo_dir=get_realpath(orig_repo_dir)
  File "./script", line 82, in get_realpath
    return Path(path).resolve().as_posix()
  File "/usr/lib64/python3.6/pathlib.py", line 1001, in __new__
    self = cls._from_parts(args, init=False)
  File "/usr/lib64/python3.6/pathlib.py", line 656, in _from_parts
    drv, root, parts = self._parse_args(args)
  File "/usr/lib64/python3.6/pathlib.py", line 640, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Any idea of what’s going wrong here?

Thank you very much,
Claire

Hi @stoffelc,

it seems that the script has difficulties with your path to the omero data dir. Please run

>>omero config get

on your system. What is the output for omero.data.dir? This should not be empty.

Best,
Susanne

Hi @sukunis,

Thank you very much for your swift answer.
The omero.data.dir parameter seems to be correct on the server:

>>omero config get omero.data.dir

returns

/data/omero

All the best,
Claire

Hi @stoffelc,

I have adapted the script so that non-recommended paths are also found. Please upload the modified version Create_Openlink.py (OMERO.openlink/Create_OpenLink.py at 978d22d95284674f38d4c5bcdefd96a5f038ecb0 · sukunis/OMERO.openlink · GitHub) to your OMERO instance again. Please let me know if this works for you.

Best,
Susanne

Hi @sukunis,

Thank you very much for the updated script. It works well now, I am able to run it successfully:
image

After completion, when I open the log using the info button, I can get the URL and the curl link for batch download.

However, nothing shows up under OpenLink in the right hand pane, even after refreshing the page, which makes the links impossible to retrieve afterward:
image

It is likely that we messed something in the configuration, especially during the following steps, where we were not sure of what we should do:

Configuration settings (with omero config set ):

  • omero.web.openlink.dir OPENLINK_DIR
  • omero.web.openlink.servername SERVER_NAME

Would you have an idea of what we should change to make the links appear under the OpenLink tab?

All the best,
Claire

Hi @stoffelc,

the OpenLink plugin requires the specification of OPENLINK_DIR and SERVER_NAME, which were also specified in the script, in the omero web configuration. The separate specification results from the fact that the script can be used independently, e.g. to create links in a shared director.
Howto:
On the command line of your OMERO.web system type:

>>omero config set omero.web.openlink.dir '"OPENLINK_DIR"'

and

>>omero config set omero.web.openlink.servername '"SERVER_NAME"'

Please replace OPENLINK_DIR and SERVER_NAME with the specification you used in the script.

Best wishes,
Susanne

Hi @sukunis,

Thank you very much for your answer. We changed the configuration with the omero config set command like described on your howto.
However, after completion of the script, we still do not have access to the urls under the OpenLink tab in the right hand pane, even after refreshing the page.
image

Could you help us with this please?
All the best,
Claire

Hi @stoffelc,

is it ensured that the omero-web user has the required access rights to the specified directory under OPENLINK_DIR (see also Prerequisite)?

Best wishes,
Susanne

Hi @sukunis,

The omero-web user has indeed the required access rights to OPENLINK_DIR.

Best,
Claire

Hi @sukunis,

We are going to change our OMERO infrastructure and are wondering if OMERO.openlink is compatible with an OMERO infrastructure where the OMERO.server is separated from OMERO-web?

All the best,
Claire

Hi @stoffelc,

sorry for the late response.
First: there is a new version of OMERO.openlink with integrated debug functionality and corrected nginx location handling.

To your last question:
If the omero-server and the omero-web server are on separate hardware, then the omero-web needs access to the Openlink directory on the omero-server (e.g. via a mount).
The script for creating the links does not need direct access from the omero-web.
You have to distinguish again: the script Create_OpenLink.py, which creates the links to the data, is started from OMERO.web, but then passes the “work” to the omero-server. The script is already sufficient to generate access to data (the links required for access and download are stored in the output of the script). However, if the user needs an overview of his generated link areas in the openlink-directory and also wants to delete them, the plugin OMERO.openlink comes into play. Then OMERO.web itself must have access to the Openlink directory.

by the way: we delete all link areas older than 30 days via a cron-job

Best,
Susanne