Installing tools and dependencies on UKB-RAP

  • Updated

This article provides practical guidance for installing and using tools and dependencies on the UK Biobank Research Analysis Platform (UKB-RAP). 

It is intended for researchers who want to run analyses beyond the pre-installed toolset, including installing software dependencies, using Docker containers, and running custom applets.

 

Overview

UKB-RAP is a secure, cloud-based environment hosted by DNAnexus. Unlike a personal workstation, compute environments on UKB-RAP are temporary: once a job or interactive session ends, any software you installed locally is removed. To keep your tools reproducible, you need to capture them in a workflow (using for example Docker images, applets, or environment management tools).

There are three common ways to install software on UKB-RAP:

  1. Install dependencies at runtime – Add the tools you need directly within a job or interactive session.

  2. Use Docker containers – Package your software and its dependencies into a container that can be run consistently every time.

  3. Build DNAnexus applets or workflows – Encapsulate installation steps so your tools and pipelines are automatically set up when run.

All of these approaches are supported by UKB-RAP training materials and documentation, helping you work efficiently while keeping your analyses reproducible.

 

Installing dependencies at runtime

When to use this approach

Installing dependencies at runtime is suitable for:

  • Learning and training exercises
  • Prototyping analyses
  • Lightweight tools with minimal dependencies

Key characteristics

  • Dependencies are installed when the job or session starts
  • Installation steps are included in your script or job specification
  • The environment resets after the job completes

Example pattern

Typical steps include:

  1. Start an interactive environment such as JupyterLab or RStudio Workbench.
  2. Use the system package manager (e.g. apt-get) or language-specific tools (pip, conda, or install.packages() in R) to install required libraries.
  3. Run your analysis within the same session.

This pattern is commonly used in UKB-RAP training materials to help researchers understand how dependencies are resolved in the cloud environment.

 

Using Docker on UKB-RAP

Why Docker?

Docker is the recommended way to install and manage tools on UKB-RAP for reproducible research. A Docker image bundles:

  • Operating system libraries
  • System dependencies
  • Programming language runtimes
  • Analysis software

Key concepts

  • Docker images are built externally or within RAP-compatible environments.
  • Images can be referenced when running DNAnexus jobs, applets, or workflows.
  • The same image can be reused across multiple jobs and analyses.

Docker-based workflows are particularly useful for custom tools and large-scale analyses on UKB-RAP.

 

Example implementation: PANDORA 

The pandora-fsl_glm folder of the UKB-RAP-Imaging-ML GitHub repository shows how to build and deploy a Docker image using the DNAnexus Swiss-Army-Knife tool.

Instructions for building Docker images are provided in PANDORA/build_docker_image.ipynb and stepcount/build_docker_image.ipynb.

 

Building and running applets

What is an applet?

An applet is a DNAnexus application that packages:

  • A command-line entry point
  • Input and output specifications
  • Pre-installed software/Docker images

Applets are an effective way to deploy custom tools on UKB-RAP for repeated or large-scale use. For further information see the DNAnexus apps page

 

Example applet: Stepcount

The dnanexus-stepcount GitHub repository from the OxWearables group provides a practical example of how to build and run a DNAnexus applet on UKB-RAP.

The stepcount-applet in the UKB-RAP-Imaging-ML GitHub repository provides further guidance and an alternative Docker-based method.

 

Choosing the right installation method

Use case Recommended approach
Training and experimentation Install dependencies at runtime
Reproducible research outside of UKB-RAP Docker files, images, & containers
Large-scale or repeated analyses Docker, Applets, and workflows

 

Further Resources

If you are unsure which approach best fits your use case, we recommend starting with the official training videos and example repositories before creating custom tools.

 

Related to

Was this article helpful?

1 out of 1 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.