How to install Bio++.
- 1 Lastest release : Bio++ 2.2.0
- 2 Development version
- 3 Older versions
Lastest release : Bio++ 2.2.0
Bio++ 2.1 packages (libbpp-core, libbpp-seq, etc.) are available in the Ubuntu and Debian standard repositories. They can be installed using your usual package/program manager.
Warning: as of June 30, 2012, there is an issue with the Ubuntu popgen package. If you want to use this part of the library, please use the package from the custom repository instead, or compile from source, or switch to the development version.
Packages for version 2.2.0. have not been uploaded yet, and are only available from the custom repository.
Ubuntu/Debian packages (custom repository)
A local repository is available for architectures i386 and amd64, containing additional programs built against the libraries.
Use your favorite apt manager to add the following line to your sources.list :
deb http://biopp.univ-montp2.fr/repos/apt/ Trusty main
You will also need to add the key that was used to sign the packages : <source lang="bash"> wget http://biopp.univ-montp2.fr/repos/apt/conf/biopp.gpg.key sudo apt-key add biopp.gpg.key </source>
Reload the packages list and then look for "Bio++" packages. That's all!
Packages are built with an Ubuntu system. Here are the version correspondences:
|Bio++ version||Ubuntu version||Distribution code name|
Make sure to use the appropriate distribution name in your 'source.list'.
RPM packages (version >= 2.0.3) are available at http://download.opensuse.org/repositories/home:/jdutheil:.
Additional RPMs for Mageia 4 are available at http://biopp.univ-montp2.fr/repos/rpm/RPMS/x86_64/mga4/.
DMG packages are available at http://biopp.univ-montp2.fr/repos/dmg/ (compiled with a MacIntel computer).
Compiling from source
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).
The easiest way to compile from source is to download the Bio++ automatic installer, edit the script header to match your system, and run it.
For instance, to download the sources in $HOME/local/bpp/latest/sources and install the libraries in $HOME/local/bpp/latest/lib and $HOME/local/bpp/latest/include, one would enter :
bpp_dir=$HOME/local/bpp/latest mkdir -p $bpp_dir/sources cd $bpp_dir/sources wget http://biopp.univ-montp2.fr/Download/bpp-setup.sh chmod +x bpp-setup.sh gedit bpp-setup.sh # set PATH_INSTALL to $bpp_dir, on line 16 ./bpp-setup.sh
Download the source archives individually. The compilation and installation procedure is then the same as for compiling the development version.
wget http://biopp.univ-montp2.fr/repos/sources/bpp-core-2.2.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-seq-2.2.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-phyl-2.2.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-popgen-2.2.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-raa-2.2.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-qt-2.2.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-seq-omics-2.2.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-phyl-omics-2.2.0.tar.gz
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 : <source lang="bash"> git cmake </source>
Installing Bio++ in a custom location greatly helps in compiling and running different programs depending on different Bio++ versions. This section therefore demonstrates how to download the sources in $HOME/local/bpp/dev/sources and install the libraries in $HOME/local/bpp/dev/lib and $HOME/local/bpp/dev/include.
We start by creating the directory :
bpp_dir=$HOME/local/bpp/dev/ mkdir -p $bpp_dir/sources
Getting the source files
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 $bpp_dir/sources 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
At this point the sources directory should contain three subdirectories.
Compiling and installing
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 cmake -DCMAKE_INSTALL_PREFIX=$bpp_dir . # 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 cmake ./ # update files list make make install
Alternatively, the following script can be used :
#!/bin/bash cd $HOME/local/bpp/dev/sources 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
See also Installation (old page).
Former versions of libraries and API documentation are available from " here. Browsable documentation is only available for the previous release of Bio++. Older documentation must be downloaded.
Installing a previous version of the libraries is necessary when maintaining or modifying programs that depend on those libraries. The preferred procedure is to compile from sources. From version 1.9, the installation procedure is the same as for the development version. Source files can be found at http://biopp.univ-montp2.fr/repos/sources/.
wget http://biopp.univ-montp2.fr/repos/sources/bpp-utils-1.5.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-numcalc-1.8.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-seq-1.7.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-phyl-1.9.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-popgen-1.5.0.tar.gz
wget http://biopp.univ-montp2.fr/repos/sources/bpp-utils-1.4.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-numcalc-1.7.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-seq-1.6.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-phyl-1.8.0.tar.gz wget http://biopp.univ-montp2.fr/repos/sources/bpp-popgen-1.4.0.tar.gz
Note that version 1.8 uses autotools.