Install blasr in CentOS6

Install GCC 5.2.0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
wget http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2
tar xf gcc-5.2.0.tar.bz2
wget https://gmplib.org/download/gmp/gmp-6.0.0a.tar.xz
tar xf gmp-6.0.0a.tar.xz
mv gmp-6.0.0 gcc-5.2.0/gmp
wget ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
tar xf mpc-1.0.3.tar.gz
mv mpc-1.0.3 gcc-5.2.0/mpc
wget http://www.mpfr.org/mpfr-current/mpfr-3.1.4.tar.xz
tar xf mpfr-3.1.3.tar.xz
mv mpfr-3.1.3 gcc-5.2.0/mpfr
mkdir gcc-5.2.0/gcc-build && cd gcc-5.2.0/gcc-build
../configure --prefix=$HOME/gcc5
--disable-multilib
--enable-languages=c,c++
--enable-libstdcxx-threads
--enable-libstdcxx-time
--enable-shared
--enable-__cxa_atexit
--disable-libunwind-exceptions
--disable-libada
--host x86_64-redhat-linux-gnu
--build x86_64-redhat-linux-gnu
--with-default-libstdcxx-abi=gcc4-compatible

make -j 40
make install

Check C++11 support

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
cat test.cpp
#include <iostream>

int main(){
#if __cplusplus==201402L
std::cout << "C++14" << std::endl;
#elif __cplusplus==201103L
std::cout << "C++11" << std::endl;
#else
std::cout << "C++" << std::endl;
#endif

return 0;
}

g++ -std=c++11 test.cpp -o test

./test
C++11

Install blasr

1
2
3
4
5
6
7
8
9
10
11
12
13
blasrpath=/xxxxxx/BLASR/blasr_el6
HDF5=/xxxxxx/BLASR/hdf5-1.8.16-linux-centos6-x86_64-gcc447-shared
LD_LIBRARY_PATH=$blasrpath/libcpp/alignment:$blasrpath/libcpp/hdf:$blasrpath/libcpp/pbdata:$HDF5/lib/:/xxxxxx/BLASR/blasr_el6/gcc/gcc5_el6/lib64:LD_LIBRARY
PATH=/xxxxxx/BLASR/blasr_el6/gcc/gcc5_el6/bin:$PATH
./configure.py --shared --sub --no-pbbam HDF5_INCLUDE=$HDF5/include/ HDF5_LIB=$HDF5/lib
make configure-submodule
make build-submodule
make blasr
./blasr --version
5.2

#benchamrk cpu
time ./blasr /xxxxxx/BLASR/error_corrected_reads_7.fa /xxxxxx/BLASR/platypus.v2.fa.gapfilled.fa --sa /xxxxxx/BLASR/platypus.v2.fa.gapfilled.fa.blasr_sa --minMatch 11 --maxAnchorsPerPosition 500 --nproc $(cat /proc/cpuinfo | grep MHz -c) > /dev/zero