Downloading dx-toolkit

The UK Biobank Research Analysis Platform (UKB RAP) is built on the DNAnexus Platform. Below are instructions to download the DNAnexus SDK, known as dx-toolkit, in order to access UKB RAP via the command line interface.

  • The DNAnexus Platform SDK - also called dx-toolkit - includes the dx command-line client; tools for building and debugging apps; utilities for working with data on UKB-RAP; and Python, Java, C++ and R bindings for working on UKB-RAP.

  • The SDK is released under the Apache v2.0 licensearrow-up-right. This SDK does not collect any user identifiable information.

Installing the Python SDK and Command Line Tools

Before You Begin

Before installing the Python SDK and command line tools, ensure that you are running Python 3.arrow-up-right

Installation

The SDK's Python components - dxpy bindings and command line tools, including dx- are distributed through PyPIarrow-up-right. Use pip3arrow-up-right to download and install the dxpyarrow-up-right package:

pip3 install dxpy

If you see a warning similar to the one below, please update your PATH environment variable to include the path where pip3 installed the new commands.

WARNING: The scripts dx, dx-app-wizard, dx-build-app and d
x-build-applet are installed in 
'/Users/user-amy/Library/Python/3.9/bin'  which is not on PATH
Consider adding this directory to PATH

Enabling Tab Completion

If you're using Z shell (zsh), which is included in recent versions of OS X, enable tab completion by entering the following command, or adding it to your .zshrc:

If you're not using Z shell (zsh), enable tab completion by entering the following command, or add it to your .bashrc:

Upgrading dxpy

To upgrade the dxpypackage after installing it using pip3, enter the command:

Troubleshooting

If you're using the OS X Xcode command line tools and running Python 3, the psutil dependency may fail to compile. To prevent this from happening, set export ARCHFLAGS="-arch x86_64" before installing dxpy.

To avoid character set problems when running the dx command, set the PYTHONIOENCODING environment variable to UTF-8 as follows:

export PYTHONIOENCODING=UTF-8

On Windows, Windows 10 and later versions are supported.

Building from Source

See the Readme.md file in the dx-toolkit Github repositoryarrow-up-right for information on build-time dependencies, Java, C++ and R bindings and additional installation instructions.

Last updated

Was this helpful?