annotate Roary/install_dependencies.sh @ 3:e95344f6dfc5 draft default tip

Uploaded
author dereeper
date Fri, 12 Nov 2021 16:32:26 +0000
parents c47a5f61bc9f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
1 #!/bin/bash
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
2
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
3 set -x
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
4 set -eu
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
5
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
6 start_dir=$(pwd)
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
7 ROARY_LIB_DIR="${start_dir}/lib"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
8 ROARY_BIN_DIR="${start_dir}/bin"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
9
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
10 PARALLEL_VERSION=${PARALLEL_VERSION:-"20160722"}
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
11 PARALLEL_DOWNLOAD_FILENAME="parallel-${PARALLEL_VERSION}.tar.bz2"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
12 PARALLEL_URL="http://ftp.gnu.org/gnu/parallel/${PARALLEL_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
13
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
14 BEDTOOLS_VERSION="2.27.1"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
15 BEDTOOLS_DOWNLOAD_FILENAME="bedtools-${BEDTOOLS_VERSION}.tar.gz"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
16 BEDTOOLS_URL="https://github.com/arq5x/bedtools2/releases/download/v${BEDTOOLS_VERSION}/${BEDTOOLS_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
17
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
18 CDHIT_SHORT_VERSION="4.6.8"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
19 CDHIT_LONG_VERSION="4.6.8-2017-0621"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
20 CDHIT_DOWNLOAD_FILENAME="cd-hit-${CDHIT_SHORT_VERSION}.tar.gz"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
21 CDHIT_URL="https://github.com/weizhongli/cdhit/releases/download/V${CDHIT_SHORT_VERSION}/cd-hit-v${CDHIT_LONG_VERSION}-source.tar.gz"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
22
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
23 PRANK_VERSION="0.140603"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
24 PRANK_DOWNLOAD_FILENAME="prank-msa-master.tar.gz"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
25 PRANK_URL="https://github.com/ariloytynoja/prank-msa/archive/master.tar.gz"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
26
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
27 BLAST_VERSION="2.6.0"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
28 BLAST_DOWNLOAD_FILENAME="ncbi-blast-${BLAST_VERSION}+-x64-linux.tar.gz"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
29 BLAST_URL="ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${BLAST_VERSION}/${BLAST_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
30
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
31 MCL_VERSION="14-137"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
32 MCL_DOWNLOAD_FILENAME="mcl-${MCL_VERSION}.tar.gz"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
33 MCL_URL="http://micans.org/mcl/src/mcl-${MCL_VERSION}.tar.gz"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
34
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
35 FASTTREE_VERSION="2.1.10"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
36 FASTTREE_DOWNLOAD_FILENAME="FastTree-${FASTTREE_VERSION}.c"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
37 FASTTREE_URL="http://microbesonline.org/fasttree/FastTree-${FASTTREE_VERSION}.c"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
38
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
39 MAFFT_VERSION="7.310"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
40 MAFFT_DOWNLOAD_FILENAME="mafft-${MAFFT_VERSION}-without-extensions-src.tgz"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
41 MAFFT_URL="http://mafft.cbrc.jp/alignment/software/${MAFFT_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
42
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
43 # Make an install location
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
44 if [ ! -d 'build' ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
45 mkdir build
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
46 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
47 cd build
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
48 build_dir=$(pwd)
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
49
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
50 PARALLEL_DOWNLOAD_PATH="$(pwd)/${PARALLEL_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
51 BEDTOOLS_DOWNLOAD_PATH="$(pwd)/${BEDTOOLS_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
52 CDHIT_DOWNLOAD_PATH="$(pwd)/${CDHIT_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
53 PRANK_DOWNLOAD_PATH="$(pwd)/${PRANK_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
54 BLAST_DOWNLOAD_PATH="$(pwd)/${BLAST_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
55 MCL_DOWNLOAD_PATH="$(pwd)/${MCL_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
56 FASTTREE_DOWNLOAD_PATH="$(pwd)/${FASTTREE_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
57 MAFFT_DOWNLOAD_PATH="$(pwd)/${MAFFT_DOWNLOAD_FILENAME}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
58
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
59 PARALLEL_BUILD_DIR="$(pwd)/parallel-${PARALLEL_VERSION}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
60 BEDTOOLS_BUILD_DIR="$(pwd)/bedtools2"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
61 CDHIT_BUILD_DIR="$(pwd)/cd-hit-v${CDHIT_LONG_VERSION}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
62 PRANK_BUILD_DIR="$(pwd)/prank-msa-master"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
63 BLAST_BUILD_DIR="$(pwd)/ncbi-blast-${BLAST_VERSION}+"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
64 MCL_BUILD_DIR="$(pwd)/mcl-${MCL_VERSION}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
65 FASTTREE_BUILD_DIR="$(pwd)/fasttree"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
66 MAFFT_BUILD_DIR="$(pwd)/mafft-${MAFFT_VERSION}-without-extensions"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
67
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
68
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
69 download () {
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
70 download_url=$1
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
71 download_path=$2
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
72 cd $build_dir
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
73 if [ -e "$download_path" ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
74 echo "Skipping download of $download_url, $download_path already exists"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
75 else
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
76 echo "Downloading $download_url to $download_path"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
77 wget $download_url -O $download_path
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
78 pwd
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
79 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
80 }
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
81
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
82 untar () {
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
83 to_untar=$1
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
84 expected_directory=$2
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
85 if [ -d "$expected_directory" ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
86 rm -rf $expected_directory
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
87 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
88 echo "Untarring $to_untar to $expected_directory"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
89 cd $build_dir
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
90 tar xzvf $to_untar
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
91 rm $to_untar
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
92 pwd
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
93 }
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
94
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
95 if [ -e "$BLAST_BUILD_DIR/bin/blastp" ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
96 echo "blast already untarred to $BLAST_BUILD_DIR, skipping"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
97 else
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
98 download $BLAST_URL $BLAST_DOWNLOAD_PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
99 untar $BLAST_DOWNLOAD_PATH $BLAST_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
100 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
101
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
102 # Build parallel
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
103 if [ -e "$PARALLEL_BUILD_DIR/src/parallel" ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
104 echo "Parallel already built, skipping"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
105 else
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
106 download $PARALLEL_URL $PARALLEL_DOWNLOAD_PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
107 echo "Untarring parallel to $PARALLEL_BUILD_DIR"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
108 tar xjvf $PARALLEL_DOWNLOAD_PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
109 echo "Building parallel"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
110 cd $PARALLEL_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
111 ./configure
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
112 make
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
113 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
114
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
115 # Build bedtools
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
116 if [ -e "$BEDTOOLS_BUILD_DIR/bin/bedtools" ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
117 echo "Bedtools already built, skipping"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
118 else
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
119
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
120 download $BEDTOOLS_URL $BEDTOOLS_DOWNLOAD_PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
121 untar $BEDTOOLS_DOWNLOAD_PATH $BEDTOOLS_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
122 cd $BEDTOOLS_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
123 echo "Building bedtools"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
124 ls -alrt
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
125 make
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
126 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
127
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
128 # Build cd-hit
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
129 if [ -e "$CDHIT_BUILD_DIR/cd-hit" ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
130 echo "cd-hit already built, skipping"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
131 else
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
132 download $CDHIT_URL $CDHIT_DOWNLOAD_PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
133 untar $CDHIT_DOWNLOAD_PATH $CDHIT_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
134 echo "Building cd-hit"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
135 cd $CDHIT_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
136 make
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
137 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
138
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
139 # Build prank
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
140 if [ -e "$PRANK_BUILD_DIR/src/prank" ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
141 echo "prank already built, skipping"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
142 else
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
143 download $PRANK_URL $PRANK_DOWNLOAD_PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
144 untar $PRANK_DOWNLOAD_PATH $PRANK_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
145 echo "Building prank"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
146 cd $PRANK_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
147 cd src
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
148 make
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
149 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
150
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
151 # Build MCL
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
152 if [ -e "$MCL_BUILD_DIR/src/shmcl/mcl" ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
153 echo "MCL already built, skipping"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
154 else
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
155 download $MCL_URL $MCL_DOWNLOAD_PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
156 untar $MCL_DOWNLOAD_PATH $MCL_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
157 echo "Building MCL"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
158 cd $MCL_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
159 ./configure
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
160 make
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
161 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
162
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
163 # Build FastTree
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
164 if [ -e "$FASTTREE_BUILD_DIR/FastTree" ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
165 echo "FastTree already built, skipping"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
166 else
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
167 download $FASTTREE_URL $FASTTREE_DOWNLOAD_PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
168 mkdir -p $FASTTREE_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
169 mv $FASTTREE_DOWNLOAD_FILENAME $FASTTREE_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
170 cd $FASTTREE_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
171 echo "Building FastTree"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
172 gcc -o FastTree FastTree-${FASTTREE_VERSION}.c -lm
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
173 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
174
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
175 export MAFFT_INSTALL_DIR="${MAFFT_BUILD_DIR}/build"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
176 # Build MAFFT
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
177 if [ -e "$MAFFT_BUILD_DIR/build/mafft" ]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
178 echo "MAFFT already built, skipping"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
179 else
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
180 download $MAFFT_URL $MAFFT_DOWNLOAD_PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
181 untar $MAFFT_DOWNLOAD_PATH $MAFFT_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
182 echo "Building MAFFT"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
183 cd $MAFFT_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
184 mkdir -p $MAFFT_INSTALL_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
185 cd core
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
186 sed -i '1s!.*!PREFIX = $(MAFFT_INSTALL_DIR)!' Makefile
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
187 make
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
188 make install
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
189 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
190
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
191
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
192 # Add things to PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
193 update_path () {
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
194 new_dir=$1
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
195 if [[ ! "$PATH" =~ (^|:)"${new_dir}"(:|$) ]]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
196 echo "export PATH=${new_dir}:${PATH}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
197 export PATH=${new_dir}:${PATH}
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
198 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
199 }
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
200
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
201 export PATH
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
202 PARALLEL_BIN_DIR="$PARALLEL_BUILD_DIR/src"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
203 update_path $PARALLEL_BIN_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
204 BEDTOOLS_BIN_DIR="$BEDTOOLS_BUILD_DIR/bin"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
205 update_path $BEDTOOLS_BIN_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
206 CDHIT_BIN_DIR="$CDHIT_BUILD_DIR"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
207 update_path $CDHIT_BIN_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
208 PRANK_BIN_DIR="$PRANK_BUILD_DIR/src"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
209 update_path $PRANK_BIN_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
210
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
211 BLAST_BIN_DIR="$BLAST_BUILD_DIR/bin"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
212 update_path $BLAST_BIN_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
213
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
214 MCL_BIN_DIR="$MCL_BUILD_DIR/src/shmcl"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
215 update_path $MCL_BIN_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
216 MCL_BIN_DIR_2="$MCL_BUILD_DIR/src/alien/oxygen/src"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
217 update_path $MCL_BIN_DIR_2
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
218
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
219 FASTTREE_BIN_DIR=$FASTTREE_BUILD_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
220 update_path $FASTTREE_BIN_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
221 MAFFT_BIN_DIR="$MAFFT_INSTALL_DIR/bin"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
222 update_path $MAFFT_BIN_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
223
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
224 update_perl_path () {
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
225 new_dir=$1
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
226 PERL5LIB=${PERL5LIB-$new_dir}
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
227 if [[ ! "$PERL5LIB" =~ (^|:)"${new_dir}"(:|$) ]]; then
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
228 echo "export PERL5LIB=${new_dir}:${PERL5LIB}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
229 export PERL5LIB=${new_dir}:${PERL5LIB}
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
230 fi
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
231 }
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
232
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
233 BEDTOOLS_LIB_DIR="$BEDTOOLS_BUILD_DIR/lib"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
234 update_perl_path $BEDTOOLS_LIB_DIR
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
235
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
236 cd $start_dir
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
237 cpanm --notest Dist::Zilla
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
238 dzil authordeps --missing | cpanm --notest
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
239 dzil listdeps --missing | cpanm --notest
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
240
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
241 cd $start_dir
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
242
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
243 echo "Add the following lines to one of these files ~/.bashrc or ~/.bash_profile or ~/.profile"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
244 echo "export PATH=${ROARY_BIN_DIR}:${PARALLEL_BIN_DIR}:${BEDTOOLS_BIN_DIR}:${CDHIT_BIN_DIR}:${PRANK_BIN_DIR}:${BLAST_BIN_DIR}:${MCL_BIN_DIR}:${MCL_BIN_DIR_2}:${FASTTREE_BIN_DIR}:${MAFFT_BIN_DIR}:${PATH}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
245 echo "export PERL5LIB=${ROARY_LIB_DIR}:${BEDTOOLS_LIB_DIR}:${PERL5LIB}"
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
246
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
247 set +eu
c47a5f61bc9f Uploaded
dereeper
parents:
diff changeset
248 set +x