Skip to content

Latest commit

 

History

History
137 lines (104 loc) · 7.73 KB

README.md

File metadata and controls

137 lines (104 loc) · 7.73 KB

Galaxy Project tools module for downloading, uploading & browsing iRODS

Galaxy iBridges download is a Galaxy tool that facilitates downloading of objects (files) and collections (folders) from iRODS, and can be integrated in a Galaxy workflow.

Galaxy iBridges upload is a Galaxy tool that facilitates uploading of objects and collections to iRODS, and can be integrated in a Galaxy workflow.

Galaxy iBridges browser is an interactive Galaxy tool that makes it possible to browse through an iRODS instance to locate objects and collections, and select them for use in a Galaxy workflow.

The tools are named for iBridges, the client used for interaction with iRODS.

What it does

iBridges download

iBridges download takes an iRODS-path to either a dataobject (file) or collection (directory) as source, and a local path to a directory to download the file or files to as. The module has a variable 'data_dir' as output, pointing to the directory files were downloaded to.

iBridges upload

iBridges upload takes a local path to a directory or file as source, and an iRODS-path to either a collection (directory) as target. The module requires an input called 'local_path', pointing to the path to upload.

iBridges browser

iBridges browser launches as a Galaxy Interactive Tool that allows the user to browse the objects and collections in the iRODS instance through a web interface.

When running an interactive tool, the interactive tool-icon (three gears) will appear in the Galaxy main menu, to the right of User. Clicking the icon opens a screen listing the interactive tools that are running. This can also be reached using the option Active Interactive Tools in the User-item of the main menu. If the icon and the option in the User-menu aren't there, it means no interactive tools are running. If they appear briefly and then disappear, launching of the tool was unsuccesful.

Next, open the tool by clicking 'ibridges browser' in the Active Interactive Tools-list (if the link isn't clickable, the tool is still starting). A new tab will open with a simple web page listing the dataobjects and collections in the user's home folder for the iRODS instance. Navigate through the instance by clicking collections' names, and the links in the breadcrumb path.

To select a path as output for the module, navigate to the appropriate collection and click the 'select'-button. The interactive tool will terminate, signalling to Galaxy that exectution of the workflow can continue. The selected path will be available as the module output parameter 'iRODS path' (this will take a few seconds). Alternatively, you can also copy the path without quitting to your computer's clipboard by clicking 'copy'. To quit without selecting a path, click 'quit' or close the page; the value of the 'iRODS path' parameter will be None.

Please note that the tools' web page cannot close itself; close it by hand once you're done.

Installing

The three tools are available in the Galaxy Toolshed as a single module called 'ibridges', and can be installed via the Toolshed (Toolshed link).

Currenly the tools can work with only one iRODS instance per installation.

Galaxy configuration

Changes to user_preferences_extra_conf.yml

Add the following to config/user_preferences_extra_conf.yml (create the file if it doesn't exist):

preferences:
    irods_config:
        description: Your iRODS account
        inputs:
            - name: username
              label: Username
              type: text
              required: True
            - name: password
              label: Data Access Password
              type: secret
              required: True
            - name: env
              label: Config
              required: True
              type: text

This will create a section Your iRODS account with inputs for Username, Data Access Password, and Config in the Galaxy user profile, in which users can store their credentials for accessing the appropriate iRODS instance.

Changes to tool_conf.xml

Add the tools to an appropriate section in the config/tool_conf.xml:

    <tool file="ibridges/ibridges_download.xml" />
    <tool file="ibridges/ibridges_upload.xml" />
    <tool file="ibridges/ibridges_browse.xml" />

Please note: if you don't need the browse function, omit the third line shown above, and skip the changes to config/galaxy.yml and config/job.yml detailed below.

Changes to galaxy.yml

The browse tool is an interactive tool (essentially a webserver communicating with the iRODS server, running in a Docker container). To enable the running of interactive tools, make sure the following settings are present in the galaxy and gravity sections of config/galaxy.yml (change my_galaxy_domain.com to the domain of the actual Galaxy server):

galaxy:
  interactivetools_enable: true
  outputs_to_working_directory: true
  galaxy_infrastructure_url: http://my_galaxy_domain.com:8080
  interactivetools_map: database/interactivetools_map.sqlite
  interactivetools_upstream_proxy: false
  interactivetools_proxy_host: localhost:4002

gravity:
  gx_it_proxy:
    enable: true
    port: 4002

Changes to job.yml

For the running of interactive jobs, add the following to the config/job.yml file (create the file if it doesn't exist):

runners:
  local:
    load: galaxy.jobs.runners.local:LocalJobRunner
    workers: 4

execution:
  default: docker_dispatch
  environments:
    local:
      runner: local

    docker_local:
      runner: local
      docker_enabled: true
      docker_set_user:

    docker_dispatch:
      runner: dynamic
      type: docker_dispatch
      docker_destination_id: docker_local
      default_destination_id: local

iRODS environment file

Copy the appropriate server configuration from the section Step 2. Configuring iCommands of the page 'Using iCommands for large datasets', and paste it as a string into the Config input for Your iRODS account (via main Galaxy menu: User > Preferences; link Manage Information). You can leave the iRODS username [email protected] as it is.

iRODS access

Make sure users using the tools have access to the iRODS instance specified in the iRODS environment Users must save their username (e-mail address) and Data Access Password in the appropriate inputs for Your iRODS account. Every time one of the tools needs to access iRODS, it automatically reads the credentials from the user's personal profile, and uses them to log in. Be aware that Data Access Passwords usually have a limited lifespan.

Building a local copy of the browser container

Galaxy iBridges browse uses a Docker container which runs in Galaxy's own Docker-environment. It can be pulled from Utrecht University's package registry, and is pulled automatically by Galaxy, from the specification in ibridges_browse.xml:

    [...]
    <requirements>
        <container type="docker">ghcr.io/utrechtuniversity/ibridges_browse:0.1</container>
    </requirements>
    [...]

If for some reason you want to build your own version of the container, the Dockerfile is available in the docker-src folder of this repo. Make sure to change the value in the 'container' element in ibridges_browse.xml to the appropriate value.

License

This project is licensed under the terms of the MIT License.