Skip to main content

Installation

Installation of SAMtools

If you want to use the SAM/BAM module of MonetDB, you must have the SAMtools (development) library pre-installed. On Ubuntu, you need to install the libbam-dev package. On Fedora, you need to install the samtools-devel package. On any other OSs, you need to install the SAMtools library yourself and tell MonetDB where to find it. The details of the steps are shown below:

  1. Create a folder for your SAMtools installation. We refer to the absolute path of this folder as $SAMTOOLS_BASEDIR.
  2. Download and save the latest version of SAMtools from here in $SAMTOOLS_BASEDIR. We used version 0.1.19 for this manual, so we have a file $SAMTOOLS_BASEDIR/samtools-0.1.19.tar.bz2.
  3. Unzip the bzip2 file and rename the resulting directory:
    $ cd $SAMTOOLS_BASEDIR
    $ tar xf samtools-0.1.19.tar.bz2
    $ mv samtools-0.1.19 samtools
  4. Create two symbolic links $SAMTOOLS_BASEDIR/include and $SAMTOOLS_BASEDIR/lib:
    $ ln -s $SAMTOOLS_BASEDIR $SAMTOOLS_BASEDIR/include
    $ ln -s $SAMTOOLS_BASEDIR/samtools $SAMTOOLS_BASEDIR/lib
  5. Open the file $SAMTOOLS_BASEDIR/samtools/Makefile with your favourite editor and add the flag -fPIC to the CFLAGS variable. This edit is necessary for MonetDB to use the SAMtools libraries during its installation process. NB: we do not know what effects this change might have on other software that also use the SAMtools library directly.
  6. Now the SAMtools library can be compiled without any other argument.
    $ cd $SAMTOOLS_BASEDIR/samtools && make
  7. For more detailed information on the compilation and installation, see the file $SAMTOOLS_BASEDIR/samtools/INSTALL.
  8. Add the SAMtools library we have just installed to the library path:
    $ export LD_LIBRARY_PATH=$SAMTOOLS_BASEDIR/samtools:$LD_LIBRARY_PATH
  9. When installing MonetDB, it needs to know where to find the SAMtools library. This is achieved by passing the option --with-samtools=$SAMTOOLS_BASEDIR to the configure script of MonetDB.

Contact MonetDB Solutions for additional support options or a reference to a prepared Cloud instance.