Repository navigation
Installation (Linux & MacOS)
This page describes how to install STOAT and its dependencies on Linux and macOS.
On Debian/Ubuntu-based systems, install the required dependencies with:
sudo apt-get update
sudo apt-get install build-essential cmake pkg-config \
libjansson-dev protobuf-compiler libprotoc-dev libprotobuf-dev \
libboost-all-dev libhts-dev valgrindSTOAT uses Homebrew for some of its dependencies.
Install the required Homebrew packages:
brew install libomp htslib boost pkg-configSTOAT requires Protobuf v29.0. Install it locally with:
cd ~/local
git clone --branch v29.0 https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
-DCMAKE_CXX_EXTENSIONS=OFF \
-Dprotobuf_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX="$HOME/local/protobuf"
cmake --build build --parallel
cmake --install buildSTOAT requires Jansson v2.14. Install it locally with:
cd ~/local
git clone --branch v2.14 https://github.com/akheron/jansson.git
cd jansson
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$HOME/local/jansson" \
-DJANSSON_BUILD_DOCS=OFF \
-DJANSSON_BUILD_TESTS=OFF
cmake --build build --parallel
cmake --install buildAdd the locally installed libraries and Homebrew dependencies to the environment:
export PKG_CONFIG_PATH="$HOME/local/jansson/lib/pkgconfig:$(brew --prefix htslib)/lib/pkgconfig:$PKG_CONFIG_PATH"
export CMAKE_PREFIX_PATH="$HOME/local/protobuf:$HOME/local/jansson:$(brew --prefix htslib):$(brew --prefix boost):$CMAKE_PREFIX_PATH"These variables must be set before configuring STOAT.
- vg — optional
STOAT uses libbdsg and libvgio, both of which depend on libhandlegraph.
STOAT uses its own copies of these libraries. However, if compatible libraries are already installed on your system, version conflicts may occur. In general, the latest versions of these tools should work.
STOAT can also be built and run using Docker.
- Dockerfile
- Docker image on Quay.io:
quay.io/patou/stoat
Clone the repository with its submodules:
git clone --recursive https://github.com/Pa-Tou/stoat.git
cd stoatConfigure and build STOAT:
cmake -S . -B build
cmake --build build --parallelThe stoat binary will be created in stoat/bin.
From the main STOAT directory, run:
./bin/stoatNote: STOAT currently uses dynamic compilation on both Linux and macOS.