forked from MaximilianHanussek/BOOTABLE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_check.sh
284 lines (234 loc) · 7.21 KB
/
install_check.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
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
#!/bin/bash
green='\033[0;32m'
red='\033[0;31m'
nc='\033[0m' # No Color
# Save original PATH and LD_LIBRARY variables
original_path_variable=$(echo $PATH)
original_ld_library_variable=$(echo $LD_LIBRARY_PATH)
check_files() {
filepath=$1
filename=$(basename $1)
if [ -e $filepath ]
then
echo -e "${green}The file: $filename is at the right place.${nc}"
else
echo -e "${red}The file: $filename can not be found at the expected location. Please check and re-download the file.${nc}"
fi
}
check_directories() {
dirpath=$1
if [ -d $dirpath ]
then
echo -e "${green}The directory: $dirpath exists.${nc}"
else
echo -e "${red}The directory: $dirpath can not be found at the expected location. Please check and re-run the install script.${nc}"
fi
}
check_tool () {
commandstring=$1
toolname=$2
eval "$commandstring" > /dev/null 2>&1
exit_parameter=$(echo $?)
if [ $exit_parameter == 0 ]
then
echo -e "${green}$2 seems to be installed correctly.${nc}"
else
echo -e "${red}Something seems to be wrong with $2. Please check and maybe reinstall again.${nc}"
fi
}
# ERR251006
path="datasets/1000_genomes/ERR251006.filt.fastq"
check_files "$path"
path="datasets/1000_genomes/ERR251006.filt.fa"
check_files "$path"
# ERR016155
path="datasets/1000_genomes/ERR016155.filt.fastq"
check_files "$path"
path="datasets/1000_genomes/ERR016155.filt.fa"
check_files "$path"
# ERR015528
path="datasets/1000_genomes/ERR015528.filt.fastq"
check_files "$path"
path="datasets/1000_genomes/ERR015528.filt.fa"
check_files "$path"
# SRR741411
path="datasets/1000_genomes/SRR741411.filt.fastq"
check_files "$path"
path="datasets/1000_genomes/SRR741411.filt.fa"
check_files "$path"
# DRR001012
path="datasets/ebi/DRR001012.fastq"
check_files "$path"
path="datasets/ebi/DRR001012.fa"
check_files "$path"
path="datasets/BWA/DRR001012/DRR001012.amb"
check_files "$path"
path="datasets/BWA/DRR001012/DRR001012.ann"
check_files "$path"
path="datasets/BWA/DRR001012/DRR001012.bwt"
check_files "$path"
path="datasets/BWA/DRR001012/DRR001012.pac"
check_files "$path"
path="datasets/BWA/DRR001012/DRR001012.sa"
check_files "$path"
# DRR001025
path="datasets/ebi/DRR001025.fastq"
check_files "$path"
path="datasets/ebi/DRR001025.fa"
check_files "$path"
path="datasets/BWA/DRR001025/DRR001025.amb"
check_files "$path"
path="datasets/BWA/DRR001025/DRR001025.ann"
check_files "$path"
path="datasets/BWA/DRR001025/DRR001025.bwt"
check_files "$path"
path="datasets/BWA/DRR001025/DRR001025.pac"
check_files "$path"
path="datasets/BWA/DRR001025/DRR001025.sa"
check_files "$path"
# GRCh38
path="datasets/1000_genomes/GRCh38_full_analysis_set_plus_decoy_hla.fa"
check_files "$path"
path="datasets/BWA/GRCh38_full_analysis_set_plus_decoy_hla/GRCh38_full_analysis_set_plus_decoy_hla.amb"
check_files "$path"
path="datasets/BWA/GRCh38_full_analysis_set_plus_decoy_hla/GRCh38_full_analysis_set_plus_decoy_hla.ann"
check_files "$path"
path="datasets/BWA/GRCh38_full_analysis_set_plus_decoy_hla/GRCh38_full_analysis_set_plus_decoy_hla.bwt"
check_files "$path"
path="datasets/BWA/GRCh38_full_analysis_set_plus_decoy_hla/GRCh38_full_analysis_set_plus_decoy_hla.pac"
check_files "$path"
path="datasets/BWA/GRCh38_full_analysis_set_plus_decoy_hla/GRCh38_full_analysis_set_plus_decoy_hla.sa"
check_files "$path"
# wgs.ANCA.1_200.fsa
path="datasets/clustalOmega/wgs.ANCA.1_200.fsa"
check_files "$path"
# wgs.ANCA.1_400.fsa
path="datasets/clustalOmega/wgs.ANCA.1_400.fsa"
check_files "$path"
# wgs.ANCA.1_500.fsa
path="datasets/clustalOmega/wgs.ANCA.1_500.fsa"
check_files "$path"
# query_shuffled.faa.gz
path="datasets/diamond/query_shuffled.faa.gz"
check_files "$path"
# uniref50_annot_shuffled.faa.gz
path="datasets/diamond/uniref50_annot_shuffled.faa.gz"
check_files "$path"
# OE-38_R1
path="datasets/SINA/OE-38_R1.fa"
check_files "$path"
path="datasets/SINA/OE-38_R1.fastq"
check_files "$path"
# RefSeq-RDP16S_v2_May2018
path="datasets/SINA/RefSeq-RDP16S_v2_May2018.fa"
check_files "$path"
# GTDB_bac-arc_ssu_r8
path="datasets/SINA/GTDB_bac-arc_ssu_r86.fa"
check_files "$path"
# SILVA_138.1_SSURef_NR99_12_06_20_opt
path="datasets/SINA/SILVA_138.1_SSURef_NR99_12_06_20_opt.arb"
check_files "$path"
path="datasets/SINA/SILVA_138.1_SSURef_NR99_12_06_20_opt.sidx"
check_files "$path"
# nmonchart
path="nmonchart/nmonchart"
check_files "$path"
# cifar-10-batches-bin
path="datasets/tensorflow/cifar-10-batches-bin"
check_directories "$path"
# Tensorflow models
path="datasets/tensorflow/models"
check_directories "$path"
# GROMACS adh_cubic
path="datasets/gromacs/adh_cubic"
check_directories "$path"
# nmonchart
cmd="sh nmonchart/nmonchart -h"
name="nmonchart"
check_tool "$cmd" "$name"
# GCC 7.3.0
cmd="gcc/gcc-installed/bin/gcc --version"
name="GCC 7.3.0"
check_tool "$cmd" "$name"
# BBMap
cmd="BBMap/bbmap/bbmap.sh"
name="BBMap"
check_tool "$cmd" "$name"
# Bowtie2 build
cmd="bowtie2/bowtie2-2.4.2/bowtie2-build --version"
name="Bowtie2 build"
check_tool "$cmd" "$name"
# Bowtie2 align
cmd="bowtie2/bowtie2-2.4.2/bowtie2 --version"
name="Bowtie2 align"
check_tool "$cmd" "$name"
# BWA
version_line=$(BWA/bwa-0.7.17/bwa 2>&1 | grep Version)
name="BWA"
if [ "$version_line" == "Version: 0.7.17-r1188" ]
then
echo -e "${green}$name seems to be installed correctly.${nc}"
else
echo -e "${red}Something seems to be wrong with $name. Please check and maybe reinstall again.${nc}"
fi
# Diamond
cmd="diamond/diamond-2.0.13/bin/diamond version"
name="Diamond"
check_tool "$cmd" "$name"
# Velveth
cmd="velvet/velveth"
name="Velveth"
check_tool "$cmd" "$name"
# Velvetg
first_line=$(velvet/velvetg | head -n 1)
name="Velvetg"
if [ "$first_line" == "velvetg - de Bruijn graph construction, error removal and repeat resolution" ]
then
echo -e "${green}$name seems to be installed correctly.${nc}"
else
echo -e "${red}Something seems to be wrong with $name. Please check and maybe reinstall again.${nc}"
fi
# IDBA
path="datasets/1000_genomes/ERR251006.filt.fa"
name="IDBA"
if [ -e "$path" ]
then
echo -e "${green}$name seems to be installed correctly.${nc}"
else
echo -e "${red}Something seems to be wrong with $name. Please check and maybe reinstall again.${nc}"
fi
# Tensorflow
cmd="python datasets/tensorflow/models/tutorials/image/cifar10/cifar10_train.py --help"
name="Tensorflow"
check_tool "$cmd" "$name"
# GROMACS
# Set GCC to 7.3.0
export PATH=$PWD/gcc/gcc-installed/bin:$PATH
export LD_LIBRARY_PATH=$PWD/gcc/gcc-installed/lib64:$LD_LIBRARY_PATH
cmd="/usr/local/gromacs/bin/gmx --version"
name="GROMACS"
check_tool "$cmd" "$name"
# Reset to system compiler
export PATH=$original_path_variable
export LD_LIBRARY_PATH=$original_ld_library_variable
# SPAdes
cmd="python SPAdes/SPAdes-3.12.0-Linux/bin/spades.py --help"
name="SPAdes"
check_tool "$cmd" "$name"
# ClustalOmega
cmd="clustalOmega/clustal-omega-1.2.4/bin/clustalo --version"
name="ClustalOmega"
check_tool "$cmd" "$name"
# MAFFT
version_line=$(MAFFT/mafft-7.475-with-extensions/bin/mafft --help 2>&1 | grep MAFFT)
name="MAFFT"
if [ "$version_line" == " MAFFT v7.475 (2020/Nov/23)" ]
then
echo -e "${green}$name seems to be installed correctly.${nc}"
else
echo -e "${red}Something seems to be wrong with $name. Please check and maybe reinstall again.${nc}"
fi
# SINA
cmd="SINA/sina-1.7.2-linux/sina -V"
name="SINA"
check_tool "$cmd" "$name"