Installation

DNAstack products can be accessed programmatically through the Command Line Interface (CLI) for Windows, Mac, and Linux environments.

This guide will help you install dnastack-client-library 3.0. If you need to install a specific version, please check out the list of available versions on the release history page.

Installing Python

First, you need to have:

  • Python 3.9 or newer

  • Optional: pip 21.3 or newer. This is only required for ARM-based systems e.g., ARM-based MacOS machines..

MacOs

Newer versions of MaxOS are already bundled with Python3. To determine if you have the correct version of python installed open a terminal and type python --version. If it is already installed you will see the version printed to the console

$ python --version

Linux - Debian

If you are using a debian system (ie Ubuntu) the easiest way to install python is using the bundled apt package manager.

sudo apt update
sudo apt install -y python3 python3-pip

You can validate this has run properly in a terminal after:

python --version

Linux - CentOS, RHEL

If you are using a CentOs the easiest way to install python is using the bundled yum package manager.

sudo yum update
sudo yum install -y python3 python3-pip

You can validate this has run properly in a terminal after:

$ python --version

Windows 10/11

  1. Download the installer from anaconda.com.

  2. Run the installer to install Python 3

Installing the CLI/library package

Windows 10/11

Open the Anaconda Powershell Prompt from the start menu or Anaconda Navigator and type the following

pip3 install -U dnastack-client-library
omics --version

MacOS / Linux

Open a terminal window and type the following:

pip3 install -U dnastack-client-library
omics --version

Enabling Shell Completion (Optional)

You can enable command auto-completion for the omics CLI to make it easier to use. The steps vary depending on your shell:

Bash

Add this to your ~/.bashrc:

eval "$(_OMICS_COMPLETE=bash_source omics)"

Zsh

Add this to your ~/.zshrc:

eval "$(_OMICS_COMPLETE=zsh_source omics)"

Fish

Add this to your ~/.config/fish/completions/omics.fish:

eval (env _OMICS_COMPLETE=fish_source omics)

After adding the appropriate line, either restart your shell or run:

source ~/.bashrc  # for bash
source ~/.zshrc   # for zsh
source ~/.config/fish/completions/omics.fish  # for fish

Now you can use tab completion with the omics command to auto-complete subcommands and options.

Installing from Source

First download the source code from the public Git Repository

git clone https://github.com/DNAstack/dnastack-client.git

Once the git repository is downloaded, you can build it with pip. Building the package will download all of the required dependencies and make the omics and dnastack commands available from the command line

cd dnastack-client
pip3 install -IU .

Last updated

Was this helpful?