Conda
Locityper can be installed using conda/mamba:
conda install -c bioconda locityperDuring 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 Apptainer/Singularity containers.
Docker and Apptainer
Locityper has container recipes for apptainer (opens in a new tab), which can also be executed using singularity (opens in a new tab); and docker (opens in a new tab). In particular, Apptainer is rootless by default and therefore can be easily run on a high performance cluster.
You can download the container image from the docker library:
apptainer pull locityper.sif docker://tprodanov/locityper:latestTo build the container from scratch, please clone the repository:
git clone https://github.com/tprodanov/locityper
cd locityperand run the following commands:
apptainer build --fakeroot locityper.sif containers/locityper.defNext, to run Locityper from a container, please use
./locityper.sif locityper command [args]
# If needed, you can execute dependencies with
./locityper.sif jellyfish/minimap2/strobealign [args]
# You can also explicitely run apptainer
apptainer exec locityper.sif ...Manual installation
For manual installation, you need the following software:
- Rust ≥ 1.91 (opens in a new tab),
- GCC ≥ 4.9.0 (opens in a new tab),
- Samtools (opens in a new tab),
- Jellyfish (opens in a new tab),
- Minimap2 (opens in a new tab) if you plan to genotype long-read data,
- Strobealign ≥ 0.18 (opens in a new tab). Note that this requirement is strict, Locityper
≥v1.7.4will not with older Strobealign versions. Older Locityper versions are also not recommendedF.
Then, run
git clone https://github.com/tprodanov/locityper
cd locityper
git clone https://github.com/smarco/WFA2-lib WFA2
cargo installCompiling 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 gurobiPlease 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 libscipSystem 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.