-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
How to install Bio++.
Bio++ 3.0 packages (libbpp-core, libbpp-seq, etc.) are available in the Debian Testing repositories (and are subsequently transferred to Debian Stable and Ubuntu). They can be installed using your usual package/program manager.
The Bio++ libraries and program are available from Homebrew. You need to add the corresponding tap with the command
brew tap jydu/homebrew-biopp
Each library is available as libbpp-core, libbpp-seq, etc. together with the bppsuite programs.
An apptainer image of all libraries and binaries of bpp (including testnh) is available on pbil.
An easy way to use this container is to open a shell in it, and then all binaries are available:
apptainer shell bpp.sif
Compiling from source is necessary when superuser rights are not available or to install Bio++ to a non-standard location (useful when several Bio++ versions coexist on a system). Download the source archives individually from GitHub. The compilation and installation procedure is then the same as for compiling the development version.
libbpp-phyl depends on Eigen3 (version >= 3.8). Ensure it is installed at standard location.
git and CMake are needed to retrieve and compile the source files. They can be installed through the git and cmake packages in Ubuntu/Debian repositories, and should be present on most servers. You can check whether they are installed on your system simply by typing :
git
cmake
Installing Bio++ in a custom location greatly helps in compiling and running different programs depending on different Bio++ versions. This section therefore shows how to download the sources in directory $HOME/devel/bpp and install the libraries in $HOME/.local/lib and $HOME/.local/bin.
We start by creating the directory :
PROJECTDIR=$HOME/devel/bpp/ mkdir -p $PROJECTDIR/ cd $PROJECTDIR/
This is done with git. Git repository is available from GitHub.
You need to download only the components of the library that you want to use. The bpp-core and bpp-seq components are required by all others, which are otherwise independent. (Example is given for bpp-popgen and bpp-phyl.)
cd $PROJECTDIR git clone https://github.com/BioPP/bpp-core git clone https://github.com/BioPP/bpp-seq git clone https://github.com/BioPP/bpp-popgen git clone https://github.com/BioPP/bpp-phyl git clone https://github.com/BioPP/bppsuite
At this point the $HOME/devel/bpp directory should contain five subdirectories.
All desired components must be compiled and installed successively, starting with bpp-core and bpp-seq. Repeat the following steps (example given for bpp-core) :
cd bpp-core mkdir build cd build cmake -B . -S .. -DCMAKE_INSTALL_PREFIX=$HOME/.local # prepare compilation make # compile make install # move files to the installation directory
That's it ! The libraries are now installed. For more information on how to compile and run Bio++ dependent programs, see the Usage pages.
- Environment. If you install lour libraries in a non standard directory, you should tell where the dynamic libraries are. For example, with bash shell, you can add in your .bashrc:
export CPATH=$CPATH:path_to_the_library/include # for compilation export LIBRARY_PATH=$LIBRARY_PATH:path_to_the_library/lib # for compilation export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path_to_the_library # for execution
- Debugging symbols. Usage of a debugger is possible if the option -D CMAKE_BUILD_TYPE=Debug is added to the cmake command line.
- On some systems, 64-bits libraries have to be installed in lib64/ directories instead of just lib/. This can be achieved by passing the -DLIB_SUFFIX=64 option to cmake.
To update the libraries the basic procedure is :
cd bpp-core git pull # retrieve changes cd build cmake ./ # update files list make make install
Alternatively, the following script can be used :
#!/bin/bash cd $PROJECTDIR for d in bpp-core bpp-seq bpp-phyl bpp-popgen bpp-raa bpp-qt; do if [[ ! -e $d ]]; then echo -e "Skip $d (does not exist).\n" continue fi echo "Updating $d..." cd $d/ git pull cmake . if make; then echo "Installing..." make install >/dev/null else echo "Compilation error in '$d/'. Abort" cd .. break fi cd .. done