Skip to content

Installation

Téo Lemane edited this page Nov 17, 2021 · 2 revisions

Conda installation

conda create -p kmtricks_env
conda activate ./kmtricks_env
conda install -c conda-forge -c tlemane kmtricks

Conda package provides the following binaries:

  • kmtricks: kmtricks main program
  • kmtricksp: kmtricks main program with plugin support
  • kmtricks-debug: kmtricks main program for debugging purposes (see reporting an issue)
  • kmtricks-socks: kmtricks socks interface

Each binary supports a maximum k-mer size of 255. For larger k-mer size, you need to build kmtricks from source.

Build from source

Prerequisites

  • cmake >= 3.13
  • gcc >= 8.1 or XCode >= 11.0 or clang >= 7
  • zlib

If you cannot install these prerequisites but you have conda installed on you system, use the -e option when using the proposed install.sh script. Compilers and dependencies will then be provided by a conda environment.

Count size is set at compilation time. The default value is 4 bytes per count (-c 4), that can be changed at compilation time (see below).

The maximum k-mer implementation sizes are set at compilation time. The default settings are -k "32 64 96 128". If you want to use larger kmer sizes, use -k <kmer_size_list> when compiling. This parameter has no impact on performances because the right implementation is chosen at runtime. It is highly recommended to use a list of consecutive multiples of 32. Behind the scenes, kmtricks uses this list to compile the code for several types of large integers, and chooses the smallest type that can contain the chosen k-mer size at execution.

git clone --recursive https://github.com/tlemane/kmtricks
kmtricks build script.
Usage: 
  ./install.sh [-r str] [-k LIST[int]] [-t int] [-c int] [-j int] [-w] [-o] [-m] [-s] [-n] [-e] [-h]
Options: 
  -r <Release|Debug> -> build type {Release}.
  -k <LIST[INT]>     -> k-mer size {"32 64 96 128"}.
  -t <0|1|2>         -> tests: 0 = disabled, 1 = compile, 2 = compile and run {2}.
  -c <1|2|4>         -> byte per count {4}.
  -j <INT>           -> nb threads {8}.
  -o                 -> build socks interface {disabled}
  -w                 -> build with howdesbt support {disabled}
  -m                 -> build all modules {disabled}
  -s                 -> static build {disabled}.
  -n                 -> disable -march=native {enabled}
  -e                 -> use conda to install compilers/dependencies {disabled}
  -h                 -> show help.

Release binaries

Release binaries are provided here.

For Linux (kmtricks-vX.Y.Z-bin-Linux.tar.gz), binaries are statically linked.

For MacOS (kmtricks-vX.Y.Z-bin-Darwin.tar.gz), binaries are built on Catalina and linked against:

  • libSystem.B
  • libz.1
  • libc++.1