Installation

Conda

Locityper can be installed using conda/mamba:

conda install -c bioconda locityper

During installation, please check that the latest release version (opens in a new tab) is being installed.

⚠️

One of the dependencies, Strobealign, has unresolved bugs in its conda release (≤ v0.17). Optimally, install Strobealign v0.18 manually following instructions here (opens in a new tab). You do not need to do this step when using Docker or Singularity containers.

Docker and Singularity

First, please clone the repository with

git clone https://github.com/tprodanov/locityper
cd locityper

To create Locityper container, run the following commands:

# Without sudo
singularity build --fakeroot locityper.sif containers/locityper.def
# Or with sudo
sudo singularity build locityper.sif containers/locityper.def

Next, to run Locityper containers, please use

./locityper.sif command [args]
# If needed, you can execute dependencies with
./locityper.sif jellyfish/minimap2/strobealign [args]
# You can also explicitely run singularity
singularity exec locityper.sif ...

Manual installation

For manual installation, you need the following software:

Then, run

git clone https://github.com/tprodanov/locityper
cd locityper
git clone https://github.com/smarco/WFA2-lib WFA2
cargo install

Compiling with ILP solvers

By default, ILP solvers are turned off, instead stochastic optimization is used. To turn ILP solvers on, you should compile the code with

cargo install --features highs
# OR
cargo install --features gurobi

Please follow instruction here (opens in a new tab) to link Gurobi (opens in a new tab) library. In addition, one can apply for an academic Gurobi license here (opens in a new tab).

In the nearest versions, Locityper will support SCIP (opens in a new tab) ILP solver, which will be included in the default configuration.

Compiling Locityper without internet

You may want to compile Locityper in an environment with restricted internet access. In such cases, conda/docker/singularity installation is recommended. `Nevertheless, it is possible to compile Locityper offline.

For that, please run cargo vendor in the Locityper directory on the machine with internet access, and then copy vendor, locityper and locityper/WFA2 directories to the server. Additionally, install SCIP (opens in a new tab) (v10.0.2 or later) using conda (conda install -c conda-forge scip) or in any other way. Then, follow source replacement (opens in a new tab) instructions and compile the tool with

cargo install --offline --no-default-features --features libscip

Compiling Strobealign

At the moment, latest Strobealign version on conda is v0.17.0 (opens in a new tab). Nevertheless, we advise to use in-development Strobealign version 0.18.0, which needs to be compiled from scratch when using conda or manual Locityper installations (it is already included in the Docker and Singularity containers). To do that, run

git clone https://github.com/ksahlin/strobealign && cd strobealign
cargo install
strobealign --version
# Should produce 0.18.0-alpha

System requirements

As Locityper can be installed with Docker, it can be run on any system with installed Docker (FAQ here (opens in a new tab)).

Installation from source was tested on Arch Linux and CentOS Linux 7. The process should take between 3 and 10 minutes, depending on the internet speed, desktop specifications and installation method. It is recommended to have at least 16 Gb RAM (preferably 32 Gb) to run Locityper.