-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathinstall_dDocent_requirements
294 lines (269 loc) · 7.41 KB
/
install_dDocent_requirements
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
#!/bin/bash
###Script to check for and install most of the required software for dDocent
if [ -z "$1" ]; then
echo "Correct usage is sh install_dDocent_requirements [directory in your computer or user PATH]"
echo "if installing for all users, best to run this script as root"
exit 1
fi
INSTALL_PATH=$1
export PATH=$INSTALL_PATH:$PATH
echo "Checking for required software"
echo "Checking for cmake"
if which cmake &>/dev/null; then
echo "cmake is already installed"
else
echo "Downloading and installing cmake"
curl -O https://cmake.org/files/v3.4/cmake-3.4.0-rc3.tar.gz
tar xvzf cmake-3.4.0-rc3.tar.gz
cd cmake-3.4.0-rc3
./bootstrap --prefix=$INSTALL_PATH
make
make install
ln -s $INSTALL_PATH/bin/* $INSTALL_PATH
cd ..
fi
echo "Checking for FreeBayes"
if which freebayes &>/dev/null; then
echo "FreeBayes is already installed"
else
echo "Downloading and installing FreeBayes"
git clone --recursive https://github.com/ekg/freebayes.git
cd freebayes
make
cd bin
chmod +x *
cp -f * $INSTALL_PATH
cd ..
cd ./vcflib/
make
chmod +x ./bin/*
cp -f ./bin/* $INSTALL_PATH
cd ..
cd ..
fi
echo "Checking for vcflib"
if which vcfcombine &>/dev/null; then
echo "vcflib is already installed"
else
echo "Downloading and installing vcflib"
git clone --recursive git://github.com/ekg/freebayes.git
cd freebayes
cd ./vcflib/
make
chmod +x ./bin/*
cp -f ./bin/* $INSTALL_PATH
cd ..
cd ..
fi
echo "Checking for Trimmomatic"
if find ${PATH//:/ } -maxdepth 1 -name trimmomatic*jar 2> /dev/null | awk '/./' ; then
echo "Trimmomatic is already installed"
else
echo "Downloading and installing Trimmomatic"
curl -O http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-0.33.zip
unzip Trimmomatic-0.33.zip
cd Trimmomatic-0.33
cp -f ./adapters/* $INSTALL_PATH
cp -f trimmomatic-0.33.jar $INSTALL_PATH
cd ..
fi
if find ${PATH//:/ } -maxdepth 1 -name TruSeq2-PE.fa 2> /dev/null | grep -q '.' ; then
echo "Trimmomatic adapters already installed"
else
echo "Downloading and installing Trimmomatic"
curl -O http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-0.33.zip
unzip Trimmomatic-0.33.zip
cd Trimmomatic-0.33
cp -f ./adapters/* $INSTALL_PATH
cp -f trimmomatic-0.33.jar $INSTALL_PATH
cd ..
fi
echo "Checking for mawk"
if which mawk &>/dev/null; then
echo "mawk is already installed"
else
echo "Downloading and installing mawk"
curl -O http://invisible-island.net/datafiles/release/mawk.tar.gz
tar xvzf mawk.tar.gz
cd mawk-1.*
./configure
make
chmod +x mawk
cp -f mawk $INSTALL_PATH
cd ..
fi
echo "Checking for bwa"
if which bwa &>/dev/null; then
echo "bwa is already installed"
else
echo "Downloading and installing bwa"
git clone https://github.com/lh3/bwa.git
cd bwa
make
chmod +x bwa
cp -f bwa $INSTALL_PATH
cd ..
fi
echo "Checking for samtools"
if which samtools &>/dev/null; then
echo "samtools is already installed"
else
echo "Downloading and installing samtools"
curl -L -o samtools-1.3.1.tar.bz2 "https://github.com/samtools/samtools/releases/download/1.3.1/samtools-1.3.1.tar.bz2"
tar xvjf samtools-1.3.1.tar.bz2
cd samtools-1.3.1/
./configure
make
chmod +x samtools
cp -f samtools $INSTALL_PATH
cd ..
fi
echo "Checking for VCFtools"
if which vcftools &>/dev/null; then
echo "VCFtools is already installed"
else
echo "Downloading and installing VCFtools"
curl -L -o vcftools_x.tar.gz "https://github.com/vcftools/vcftools/releases/download/v0.1.14/vcftools-0.1.14.tar.gz"
tar xvzf vcftools_x.tar.gz
cd vcftools-*
./configure
make
chmod +x ./src/cpp/vcftools
cp -f ./src/cpp/vcftools $INSTALL_PATH
cd ..
fi
echo "Checking for Rainbow"
if which rainbow &>/dev/null; then
VER=(`rainbow | head -1 | cut -f2 -d' ' `)
if [[ "$VER" == "2.0.2" || "$VER" == "2.0.3" || "$VER" == "2.0.4" ]]; then
echo "Rainbow is already installed"
else
echo "Downloading and installing Rainbow"
curl -L -o rainbow.x.tar.gz "http://sourceforge.net/projects/bio-rainbow/files/latest/download?source=files"
tar xvzf rainbow.x.tar.gz
cd rainbow_*
make
chmod +x rainbow rbasm rbmergetag select_*
cp -f rainbow rbasm rbmergetag select_* $INSTALL_PATH
cd ..
fi
else
echo "Downloading and installing Rainbow"
curl -L -o rainbow.x.tar.gz "http://sourceforge.net/projects/bio-rainbow/files/latest/download?source=files"
tar xvzf rainbow.x.tar.gz
cd rainbow_*
make
chmod +x rainbow rbasm rbmergetag select_*
cp -f rainbow rbasm rbmergetag select_* $INSTALL_PATH
cd ..
fi
echo "Checking for gnuplot"
if which gnuplot &>/dev/null; then
echo "gnuplot is already installed"
else
echo "Downliading and installing gnuplot"
curl -L -o gnuplot.x.tar.gz "http://sourceforge.net/projects/gnuplot/files/latest/download?source=files"
tar xvzf gnuplot.x.tar.gz
cd gnuplot-*
current=`pwd`
./configure --prefix=$current/gnuplot_install
make install
chmod +x gnuplot_install/bin/gnuplot
cp -f gnuplot_install/bin/gnuplot $INSTALL_PATH
cd ..
fi
echo "Checking for seqtk"
if which seqtk &>/dev/null; then
echo "seqtk is already installed"
else
echo "Downloading and installing seqtk"
git clone https://github.com/lh3/seqtk.git
cd seqtk
make
chmod +x seqtk
cp -f seqtk $INSTALL_PATH
cd ..
fi
echo "Checking for cd-hit"
if which cd-hit-est &>/dev/null; then
echo "cd-hit is already installed"
else
echo "Downloading and installing cd-hit"
curl -L -O https://github.com/weizhongli/cdhit/releases/download/V4.6.6/cd-hit-v4.6.6-2016-0711.tar.gz
tar xvzf cd-hit-v4.6.6-2016-0711.tar.gz
cd cd-hit-v4.6.6-2016-0711
make openmp=yes
chmod +x cd-hit-est cd-hit-est-2d
cp -f cd-hit-est cd-hit-est-2d $INSTALL_PATH
cd ..
fi
echo "Checking for bedtools"
if which bamToBed &>/dev/null; then
echo "bedtools is already installed"
else
curl -L -O https://github.com/arq5x/bedtools2/releases/download/v2.26.0/bedtools-2.26.0.tar.gz
tar xvzf bedtools-2.26.0.tar.gz
cd bedtools2
make
cd bin
chmod +x *
cp -f * $INSTALL_PATH
cd ..
cd ..
fi
echo "Checking for bedops"
if which bedops &>/dev/null; then
echo "bedops is already installed"
else
git clone https://github.com/bedops/bedops.git
cd bedops
make all
make install
cp -f bin/* $INSTALL_PATH
cd ..
fi
echo "Checking for bamtools"
if which bamtools &>/dev/null; then
echo "bamtools is already installed"
else
git clone https://github.com/pezmaster31/bamtools.git
cd bamtools
mkdir build
cd build
cmake ..
make
cd ../bin
chmod +x bamtools
cp -f bamtools $INSTALL_PATH
cd ..
cd ..
fi
echo "Checking for GNU-parallel"
if which parallel &>/dev/null; then
echo "GNU-parallel is already installed"
else
curl -L -O http://ftp.gnu.org/gnu/parallel/parallel-latest.tar.bz2
tar xvjf parallel-latest.tar.bz2
rm parallel-latest.tar.bz2
cd parallel*
./configure && make
chmod +x ./src/parallel ./src/sem ./src/niceload ./src/sql
cp -f ./src/parallel ./src/sem ./src/niceload ./src/sql $INSTALL_PATH
cd ..
fi
echo "Checking for PEAR (read merger)"
if which pearRM &>/dev/null; then
echo "pear is already installed"
else
curl -L -O http://sco.h-its.org/exelixis/web/software/pear/files/pear-0.9.6-bin-64.tar.gz
tar vxzf pear-0.9.6-bin-64.tar.gz
cd pear-0.9.6-bin-64
cp -f pear-0.9.6-bin-64 pearRM
chmod +x pearRM
cp -f pearRM $INSTALL_PATH
cd ..
fi
echo "Now installing dDocent"
curl -L -O https://github.com/jpuritz/dDocent/raw/master/dDocent
chmod +x dDocent
cp -f dDocent $INSTALL_PATH