Getting started
Installation
Install Centrifuger from Bioconda or build it from source with make.
Centrifuger is distributed both as a Bioconda package and as source code that compiles with a single make. Either route gives you the same four executables: centrifuger-build, centrifuger, centrifuger-quant and centrifuger-download.
Requirements#
- A Linux or macOS system with a C++ compiler and
make. - pthreads — Centrifuger's only dependency, and present by default on essentially every Unix-like system.
- Enough RAM to hold the index you intend to use. This is the real constraint: see how much memory do I need?
Install with Conda (recommended)#
Centrifuger is available from Bioconda:
conda install -c conda-forge -c bioconda centrifugerInstalling into a dedicated environment keeps it isolated from the rest of your tooling:
conda create -n centrifuger -c conda-forge -c bioconda centrifuger
conda activate centrifugerMamba works as a drop-in replacement and resolves the environment considerably faster:
mamba install -c conda-forge -c bioconda centrifugerBuild from source#
Clone the GitHub repository and run make in it:
git clone https://github.com/mourisl/centrifuger.git
cd centrifuger
makeThe executables are written into the directory you just built in. There is no make install step.
Putting Centrifuger on your PATH#
After building, you can run the programs by their full path — /path/to/centrifuger/centrifuger — but it is more convenient to make them available everywhere. Either add the build directory to PATH:
export PATH="/path/to/centrifuger:$PATH"(add that line to your ~/.bashrc or ~/.zshrc to make it permanent), or create a symbolic link from a directory that is already on PATH:
ln -s /path/to/centrifuger/centrifuger ~/bin/centrifugerVerify the installation#
Run a program without arguments to print its usage message:
centrifuger
centrifuger-build
centrifuger-quantFor an end-to-end check, use the example/ directory included in the source distribution — it contains a tiny reference, a taxonomy and a pair of FASTQ files, and the whole test takes seconds. The quick start walks through it.
Keeping up to date#
Conda installations update in the usual way:
conda update -c conda-forge -c bioconda centrifugerSource installations update by pulling and rebuilding:
cd /path/to/centrifuger
git pull
make clean && makeNext steps#
- Quick start — your first classification.
- Pre-built indexes — download a database instead of building one.