eXpress build instructions on TACC Ranger
author's installation instructions: http://bio.math.berkeley.edu/eXpress/tutorial.html#install
On Ranger, we don't need to install cmake or boost, already have that as a module
Setup environment
Setup environment:
module swap $TACC_FAMILY_COMPILER gcc module load cmake module load boost
Download source for eXpress and BamTools (both links are availabe in the "author's installation instructions" link above)
wget http://bio.math.berkeley.edu/eXpress/downloads/express-1.1.0/express-1.1.0-src.tgz tar zxvf express-1.1.0-src.tgz cd ./express*/ # Remember where eXpress unpacked itself MY_EXPRESS_DIR=`pwd` # Download BamTools from github wget --no-check-certificate https://github.com/downloads/pezmaster31/bamtools/bamtools-1.0.2.tar.gz # extract BamTools into $MY_EXPRESS_DIR then install tar zxvf bamtools-1.0.2.tar.gz cd ./bamtools*/ # Remember where BamTools unpacked itself MY_BAMTOOLS_DIR=`pwd`
Build bamtools
cd $MY_BAMTOOLS_DIR mkdir build cd build cmake .. make
Start building eXpress
cd $MY_EXPRESS_DIR mkdir build cd build cmake ../src
cmake doesn't do a good job of building the file "$EXPRESS_DIR/src/build/CMakeFile/express.dir/link.txt" it ignores the links needed for BamTools and Boost, but we can fix that!
This little script is not the prettiest way to do this, but it works as a "cut and paste" way to add what is missing while reusing what we can to make this work on both Ranger and Lonestar.
mv ./CMakeFiles/express.dir/link.txt ./CMakeFiles/express.dir/link.txt.original cat ./CMakeFiles/express.dir/link.txt.original | sed -r "s/\s+/\n/g" | \ awk -v TACC_BOOST_INC=$TACC_BOOST_INC -v TACC_BOOST_LIB=$TACC_BOOST_LIB -v MY_BAMTOOLS_DIR=$MY_BAMTOOLS_DIR ' BEGIN {printf "-I%s\n",TACC_BOOST_INC}; {print}; /rdynamic/ {exit}; END {printf "-Wl,-rpath,%s/lib\n-L%s/lib\n-lbamtools\n-L%s -lboost_filesystem -lboost_thread -lboost_system -lboost_program_options -lpthread\n",MY_BAMTOOLS_DIR,MY_BAMTOOLS_DIR,TACC_BOOST_LIB;}' \ | tr '\n' ' ' | xargs echo > ./CMakeFiles/express.dir/link.txt
Finish installing eXpress
make CXX_FLAGS="-I$TACC_BOOST_INC -I../bamtools*/include"