Carrot root and DNA VCRU Bioinformatics USDA ARS Vegetable Crops Research Unit

This page was last updated on Wednesday, 15-Nov-2017 13:47:04 CST

Installation notes for BLASR

Home Page

Installation using pitchfork, blasr version 5.3.f72428d

https://github.com/PacificBiosciences/pitchfork
wiki

  1. $ cd /programinstallers
  2. $ git clone https://github.com/PacificBiosciences/pitchfork.git
  3. $ cd pitchfork
  4. remove this symlink to .git/settings.mk which does not exist
    $ rm settings.mk
  5. $ sudo mkdir /opt/pacbio && sudo chmod 775 /opt/pacbio
  6. $ sudo mkdir /opt/pitchfork && sudo chmod 775 /opt/pitchfork
  7. Omit this and just comment out the zlib location in the configuration and it will be built automatically
    Because of the way that the path to zlib is interpreted, we need simulate the expected directory structure
    $ mkdir /tmp/zlib && cd /tmp/zlib && ln -s /usr/lib/x86_64-linux-gnu lib && ln -s /usr/include include && cd -
  8. Create the settings file /programinstallers/pitchfork/settings.mk as follows
    $ nano settings.mk
    PREFIX        = /opt/pacbio
    WORKDIR       = /opt/pitchfork
    #HAVE_CCACHE   = ?
    #HAVE_ZLIB     = /tmp/zlib
    HAVE_PYTHON   = /usr/bin/python
    HAVE_OPENBLAS = /usr/lib
    HAVE_BOOST    = /usr/include/boost
    HAVE_CMAKE    = /usr/local/bin/cmake
    #HAVE_HDF5     = /usr/include/hdf5
  9. $ make init
  10. $ make blasr
  11. To run, two methods are given
    $ bash --init-file /opt/pacbio/setup-env.sh
    or
    $ source /opt/pacbio/setup-env.sh
  12. $ blasr --version
    blasr   5.3.f72428d

Prerequisites for ninja installation

Installation using ninja (failed!)

Based on installation instructions at https://github.com/PacificBiosciences/blasr/wiki/Step-by-step-blasr-installation-example

  1. $ cd /programinstallers/
  2. $ TOP=$(pwd)
  3. $ sudo apt-get install libhdf5-dev
  4. $ mkdir blasr_install && cd blasr_install
  5. $ git clone https://github.com/PacificBiosciences/blasr.git --recursive
  6. $ cd blasr
  7. $ git submodule update --init --remote
  8. $ export HTSLIB_ROOT=/usr/local/bin/samtools1/include
  9. $ mkdir build
  10. $ cd build
  11. $ cmake -GNinja ..
  12. Issue 370
    We should firstly cmake pbbam at the path "external/pbbam/build/", and then cmake blasr at the path "build/"
    $ cd external/pbbam/build
  13. $ mkdir build
  14. $ cd build
  15. Fail - I give up and will use blasr on Ceres
  16. $ ninja

Prerequisites version "20130703"

  • hdf 1.8.0 or above installed and configured with c++ support (you should have the library libhdf5_cpp.a)
    Compiling instructions
    1. $ hver="1.8.11"
    2. $ wget -N http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-$hver.tar.gz
    3. $ tar -zxvf hdf5-$hver.tar.gz
    4. $ cd hdf5-$hver
    5. $ ./configure --enable-cxx --prefix=/usr/local/lib/libhdf5 --with-zlib=/usr/local/lib/libhdf5
    6. $ sudo mkdir -p /usr/local/lib/libhdf5/include
    7. $ make
    8. $ make check &> check.out
      Review the check.out file to be sure everything was built and tested properly
    9. $ sudo make install &> install.log
      ...
      Libraries have been installed in:
         /usr/local/lib/libhdf5/lib

      ...
  • Installation version "20130703"

    1. $ cd /programinstallers/
    2. $ git clone https://github.com/PacificBiosciences/blasr.git
      or to update $ cd blasr ; git pull --rebase origin master && git submodule update --init
    3. $ cd blasr
    4. $ git submodule update --init --remote
    5. $ export HDF5INCLUDEDIR=/usr/local/lib/libhdf5/include
    6. $ export HDF5LIBDIR=/usr/local/lib/libhdf5/lib
    7. New step 2017-10-21
      $ ./configure.py --shared --sub --no-pbbam HDF5_INCLUDE=/usr/local/lib/libhdf5/include HDF5_LIB=/usr/local/lib/libhdf5/lib
      $ make configure-submodule
    8. $ make
    9. Error /usr/bin/ld: cannot find -lz (this error only occurred on Fedora 15 system)
      This was needed to allow bwtutils to compile
      $ sudo yum install zlib-static
    10. Now I have this error
      ...
      H5PL.c:(.text+0x3be): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

      ...
      g++ -g -O3 -Wno-div-by-zero -I ../common -I /usr/local/lib/libhdf5/include -fpermissive bin/BuildQualityValueProfile.o -static -o bin/buildQualityValueProfile -lpthread -L/usr/local/lib/libhdf5/lib -lhdf5_cpp -lhdf5 -lz
      /usr/lib/../lib64/libpthread.a(libpthread.o): In function `sem_open':
      (.text+0x68db): warning: the use of `mktemp' is dangerous, better use `mkstemp'
      /usr/local/lib/libhdf5/lib/libhdf5.a(H5PL.o): In function `H5PL_term_interface':
      H5PL.c:(.text+0xa7): undefined reference to `dlclose'
      /usr/local/lib/libhdf5/lib/libhdf5.a(H5PL.o): In function `H5PL_load':
      H5PL.c:(.text+0x2e5): undefined reference to `dlsym'
      H5PL.c:(.text+0x3be): undefined reference to `dlopen'
      H5PL.c:(.text+0x3d7): undefined reference to `dlsym'
      H5PL.c:(.text+0x504): undefined reference to `dlclose'
      H5PL.c:(.text+0x589): undefined reference to `dlerror'
      H5PL.c:(.text+0x753): undefined reference to `dlclose'
      collect2: error: ld returned 1 exit status
      make[1]: *** [bin/buildQualityValueProfile] Error 1

      So I modified alignment/Makefile line 142 where BuildQualityValueProfile is compiled by adding -ldl to the end of the line, i.e.
              $(CPP) -g $(CPPOPTS) $< $(STATIC) -o $@ -lpthread -L$(HDF5LIBDIR) -l$(HDF5LIBCPP) -l$(HDF5LIB) -lz -ldl
    11. Made same additions of -ldl to line 69 for Mask, line 72 for GuidedAlign, line 75 for ExtendAlign
    12. Also make same additions to sequtils/Makefile
      line 185 for filterBySubreadAgreement
    13. Also make same additions to pbihdfutils/Makefile
      line 72 for CmpH5View, line 75 for DiffAlnInfoGroups, line 78 for PrintMSA, line 81 for PrintVariants, line 84 for CmpH5Information, line 87 for filterHDFPls, line 90 for writeHDFSubset, line 93 for testAdvance, line 96 for PrintHDFPlsSummary, line 99 for ToAfg, line 102 for PulseToFasta, line 108 for LoadPulses, line 114 for extractReadsByTitle, line 117 for computeRefCoverage, line 120 for SamToCmpH5
    14. Also make same additions to simulator/Makefile:
      line 75 for StoreQualityByContextFromCmpH5, line 78 for StoreQualityByContext, line 81 for BasH5Simulator
      After all of these changes, blasr compiles.
    15. Configure destination for install. Use the same default location as used by PacBio software
      $ sudo mkdir -m 777 /opt/smrtanalysis
    16. $ sudo make install ASSEMBLY_HOME=/opt/smrtanalysis/analysis
    17. Add this directory to the default path
      $ sudo nano /etc/profile
      ...
      PATH="$PATH:/opt/smrtanalysis/analysis/bin"
      ...