-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·254 lines (229 loc) · 7.75 KB
/
install.sh
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
#!/bin/bash
red=$'\e[1;31m'
green=$'\e[1;32m'
yellow=$'\e[1;33m'
blue=$'\e[1;34m'
magenta=$'\e[1;35m'
cyan=$'\e[1;36m'
white=$'\e[0m'
tools_dir=$(pwd)
main2 () {
echo -e "${blue}\n############################################## ${yellow}\n- downloading and installing bcftools ${blue}\n##############################################${white}"
wget https://github.com/samtools/bcftools/releases/download/1.17/bcftools-1.17.tar.bz2 &&
tar -xvf bcftools-1.17.tar.bz2; cd bcftools-1.17; make
rm ../bcftools-1.17.tar.bz2
cd $tools_dir
}
dirtool=bcftools-1.17
if [ -d $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of dependency (bcftools) ${white}"
main2 &>> ./log.out
if [ ! -d $dirtool ]; then
echo -e "${magenta} bcftools did not install properly ${white}"
fi
fi
main3 () {
echo -e "${blue}\n############################################## ${yellow}\n- downloading and installing bedtools ${blue}\n##############################################${white}"
wget https://github.com/arq5x/bedtools2/releases/download/v2.29.1/bedtools-2.29.1.tar.gz &&
tar -zxvf bedtools-2.29.1.tar.gz; cd bedtools2; make
rm ../bedtools-2.29.1.tar.gz
cd $tools_dir
}
dirtool=bedtools*
if [ -d $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of dependency (bedtools) ${white}"
main3 &>> ./log.out
if [ ! -d $dirtool ]; then
echo -e "${magenta} bedtools did not install properly ${white}"
fi
fi
main4 () {
echo -e "${blue}\n############################################## ${yellow}\n- downloading and installing samtools ${blue}\n##############################################${white}"
wget https://github.com/samtools/samtools/releases/download/1.17/samtools-1.17.tar.bz2 &&
tar -xvf samtools-1.17.tar.bz2; cd samtools-1.17; make
rm ../samtools-1.17.tar.bz2
cd $tools_dir
}
dirtool=samtools*
if [ -d $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of dependency (samtools) ${white}"
main4 &>> ./log.out
if [ ! -d $dirtool ]; then
echo -e "${magenta} samtools did not install properly ${white}"
fi
fi
main5 () {
echo -e "${blue}\n############################################## ${yellow}\n- downloading PICARD tools ${blue}\n##############################################${white}"
wget https://github.com/broadinstitute/picard/releases/download/2.25.6/picard.jar
cd $tools_dir
}
dirtool=picard*
if [ -f $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of dependency (picard tools) ${white}"
main5 &>> ./log.out
if [ ! -f $dirtool ]; then
echo -e "${magenta} PICARD tools did not install properly ${white}"
fi
fi
main () {
echo -e "${blue}\n############################################## \n- installiing java 1.8. ${blue}\n##############################################${white}"
wget https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz
tar -xvf OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz; rm *tar.gz
cd $tools_dir
}
dirtool=*jdk*
if [ -d $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of dependency (java 1.8)${white}"
main &>> ./log.out
if [ ! -d $dirtool ]; then
echo -e "${magenta} java did not install properly ${white}"
fi
fi
main6 () {
echo -e "${blue}\n############################################## \n- installiing Emboss ${blue}\n##############################################${white}"
wget -m 'ftp://emboss.open-bio.org/pub/EMBOSS/'
mv emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.6.0.tar.gz ./
rm -rf emboss.open-bio.org/
gunzip EMBOSS-6.6.0.tar.gz
tar xvf EMBOSS-6.6.0.tar
cd EMBOSS-6.6.0/
./configure --without-x
make
cd ../
rm EMBOSS-6.6.0.tar
cd $tools_dir
}
dirtool=EMBOSS*
if [ -d $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of dependency (EMBOSS)${white}"
main6 &>> ./log.out
if [ ! -d $dirtool ]; then
echo -e "${magenta} Emboss did not install properly ${white}"
fi
fi
main7 () {
echo -e "${blue}\n############################################## \n- installing mafft ${blue}\n##############################################${white}"
wget https://mafft.cbrc.jp/alignment/software/mafft-7.505-without-extensions-src.tgz
tar zxvf mafft-7.505-without-extensions-src.tgz
rm mafft-7.505-without-extensions-src.tgz
cd mafft-7.505-without-extensions/core/
awk 'NR!=3{print $0}' Makefile | awk 'NR>1{print $0}' | cat <(printf "BINDIR = ${GBSapp_dir}tools/mafft\n") - | \
cat <(printf "PREFIX = ${GBSapp_dir}tools/mafft\n") - > makefile.tmp
mv makefile.tmp Makefile
make clean
make
make install
cd $tools_dir
}
dirtool=mafft-7.505-without-extensions
if [ -d $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of dependency (mafft)${white}"
main7 &>> ./log.out
if [ ! -d $dirtool ]; then
echo -e "${magenta} mafft did not install properly ${white}"
fi
fi
main8 () {
echo -e "${green}\n############################################## \n- downloading GATK \n##############################################${white}"
wget -O GATK4.2.6.1.zip "https://github.com/broadinstitute/gatk/releases/download/4.2.6.1/gatk-4.2.6.1.zip"
unzip GATK4.2.6.1.zip
rm GATK4.2.6.1.zip
cd $tools_dir
}
dirtool=gatk*
if [ -d $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of dependency (GATK) ${white}"
main8 &>> ./log.out
if [ ! -d $dirtool ]; then
echo -e "${magenta} GATK did not install properly ${white}"
fi
fi
main0 () {
if which R; then
:
else
module add R
if which R; then
:
else
echo -e "${magenta}- install R before proceeding ${white}" > /dev/tty
echo -e "${magenta}- dependencies for R in linux: <sudo apt install libcurl4-openssl-dev> and <sudo apt install libssl-dev> ${white}" > /dev/tty
exit 1
fi
fi
}
echo -e "${white}\n############################################## ${orange}\n- check for R installation ${white}\n##############################################${white}" &>> ./log.out
main0 &>> ./log.out
dirtool=R
if [ -d $dirtool ]; then
cd $dirtool
R_dir=$(pwd)
else
mkdir ./$dirtool
cd $dirtool
R_dir=$(pwd)
fi
main9 () {
echo -e "${blue}\n############################################## \n- installing R-package: reshape2 ${blue}\n##############################################${white}"
R -e 'install.packages("reshape2", dependencies = TRUE, lib="./")'
cd $R_dir
}
dirtool=./reshape2
if [ -d $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of R-package: reshape2 ${white}"
main9 &>> ./log.out
cd $R_dir
if [ ! -d $dirtool ]; then
echo -e "${magenta} R-package: reshape2 did not install properly ${white}"
fi
fi
main10 () {
echo -e "${blue}\n############################################## \n- installing R-package: ggplot2 ${blue}\n##############################################${white}"
R -e 'install.packages("ggplot2", dependencies = TRUE, repos="http://cran.r-project.org", lib="./")'
cd ../
}
dirtool=./ggplot2
if [ -d $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of R-package: ggplot2 ${white}"
main10 &>> ./log.out
cd $R_dir
if [ ! -d $dirtool ]; then
echo -e "${magenta} R-package: ggplot2 did not install properly ${white}"
fi
fi
main11 () {
echo -e "${blue}\n############################################## \n- installing R-package: CMplot ${blue}\n##############################################${white}"
R -e 'install.packages("CMplot", dependencies = TRUE, repos="http://cran.r-project.org", lib="./")'
cd ../
}
dirtool=./CMplot
if [ -d $dirtool ]; then
:
else
echo -e "${magenta}- Performing installation of R-package: CMplot ${white}"
main11 &>> ./log.out
cd $R_dir
if [ ! -d $dirtool ]; then
echo -e "${magenta} R-package: CMplot did not install properly ${white}"
fi
fi