#!/bin/bash # exit when any command fails set -e # keep track of the last executed command trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG # echo an error message before exiting trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT [ ! -d "/tmp/install" ] && mkdir /tmp/install cd /tmp/install wget https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.9.6/sratoolkit.2.9.6-ubuntu64.tar.gz gunzip sratoolkit.2.9.6-ubuntu64.tar.gz tar -xvf sratoolkit.2.9.6-ubuntu64.tar cp sratoolkit.2.9.6-ubuntu64/bin/fastq-dump /usr/local/bin/ cp sratoolkit.2.9.6-ubuntu64/bin/prefetch /usr/local/bin/ wget https://sourceforge.net/projects/samtools/files/tabix/tabix-0.2.6.tar.bz2 bzip2 -d tabix-0.2.6.tar.bz2 tar -xvf tabix-0.2.6.tar cd /tmp/install/tabix-0.2.6 make cp /tmp/install/tabix-0.2.6/bgzip /tmp/install/tabix-0.2.6/tabix /usr/local/bin/ cd /tmp/install wget https://github.com/bedops/bedops/releases/download/v2.4.39/bedops_linux_x86_64-v2.4.39.tar.bz2 tar jxvf bedops_linux_x86_64-v2.4.39.tar.bz2 cp /tmp/install/bin/* /usr/local/bin/ cd /tmp/install git clone https://github.com/genome/bam-readcount.git cd bam-readcount cmake /tmp/install/bam-readcount make cp /tmp/install/bam-readcount/bin/bam-readcount /usr/local/bin/ cd /tmp/install git clone https://github.com/gpertea/gffcompare cd gffcompare make release cp gffcompare /usr/local/bin/ cp trmap /usr/local/bin cd /tmp/install git clone https://github.com/TGAC/KAT.git cd KAT ./build_boost.sh ./autogen.sh ./configure make make install