Building from source

It may be necessary to install several system-level libraries to build odgi. On Ubuntu, these can be installed using apt:

sudo apt install build-essential cmake python3-distutils python3-dev libjemalloc-dev

Alternatively, after sudo apt install guix start a GNU Guix build container with

source .guix-build

odgi requires a C++ version of 9.3 or higher. You can check your version via:

gcc --version
g++ --version

If this requirement is satisfied, obtain a copy of the repository and its submodules:

git clone --recursive
cd odgi

Finally, build odgi using cmake:

cmake -H. -Bbuild && cmake --build build -- -j 2

The -j argument determines the number of threads used for the compilation process. In the command above it is set to 2. As odgi is a fairly large project, it is recommended to set -j to the maximum number of available threads. This can reduce the compilation time significantly.


If you need to avoid machine-specific optimizations, use the CMAKE_BUILD_TYPE=Generic build type:

cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Generic && cmake --build build -- -j 3


odgi recipes for Bioconda are available at To install the latest version using Conda please execute:

conda install -c conda-forge -c bioconda odgi


Installing via the guix-genomics git repository

First, clone the guix-genomics repository:

git clone

And install the odgi package to your default GUIX environment:

GUIX_PACKAGE_PATH=. guix package -i odgi

Now ODGI is available as a global binary installation.

Installing via the guix-genomics channel

Add the following to your ~/.config/guix/channels.scm:

  (name 'guix-genomics)
  (url "")
  (branch "master"))

First, pull all the packages, then install odgi to your default GUIX environment:

guix pull
guix package -i odgi

If you want to build an environment only consisting of the odgi binary, you can do:

guix environment --ad-hoc odgi

For more details about how to handle Guix channels, please go to


Thanks to our Bioconda recipe a docker image is generated for free. Pulling the latest odgi docker image:

docker pull<tag>

Please see odgi/tags for valid values for <tag>.