-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
executable file
·300 lines (234 loc) · 7.95 KB
/
Dockerfile
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
295
296
297
298
299
300
##############################################################
# Dockerfile Version: 1.7
# Software: HOWARD
# Software Version: 0.12.1.1
# Software Website: https://github.com/bioinfo-chru-strasbourg/howard
# Licence: GNU Affero General Public License (AGPL)
# Description: HOWARD - Highly Open Workflow for Annotation & Ranking toward genomic variant
# Usage: docker run -ti [-v [DATA FOLDER]:/data -v [DATABASE_FOLDER]:/databases] howard:version
##############################################################
##########
# README #
##########
# Config parameters
# identify yum packages for installation
# identify yum packages to remove
#
# Dependecies installation
# identify tools dependences
# config each tool
# write installation procedure for each tools
#
# Tool
# configure tool
# write isntallation procedure for the tool
# add link to current and root tool folder
#
# Workdir / Entrypoint / Cmd
# configure workdir, endpoint and command
# /!\ no variables in endpoint
########
# FROM #
########
FROM almalinux:8-minimal
LABEL Software="HOWARD" \
Version="0.12.1.1" \
Website="https://github.com/bioinfo-chru-strasbourg/howard" \
Description="HOWARD" \
License="GNU Affero General Public License (AGPL)" \
maintener="Antony Le Bechec <[email protected]>" \
Usage='docker run -v $DATA FOLDER:/data -v $DATABASE_FOLDER:/databases -ti howard:0.12.1.1'
########
# ARGS #
########
ARG THREADS="8"
##############
# PARAMETERS #
##############
ENV TOOLS=/tools
ENV DATA=/data
ENV TOOL=/tool
ENV DATABASES=/databases
# YUM and Perl
ENV YUM_INSTALL="gcc bc make wget perl-devel which zlib-devel zlib bzip2-devel bzip2 xz-devel xz ncurses-devel unzip curl-devel java-17 htop libgomp aria2 docker-ce"
ENV PERL_INSTALL="perl-Switch perl-Time-HiRes perl-Data-Dumper perl-Digest-MD5 perl-Tk perl-devel"
###############
# YUM INSTALL #
###############
# AlmaLinux GPG key and YUM install and Perl install and bashrc
RUN echo "#[INFO] System packages installation" && \
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux && \
microdnf install -y wget && \
wget https://download.docker.com/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo && \
microdnf install -y epel-release && \
microdnf install -y $YUM_INSTALL && \
microdnf install -y --enablerepo=powertools $PERL_INSTALL && \
microdnf clean all && \
echo 'alias ll="ls -lah"' >> ~/.bashrc;
################
# DEPENDENCIES #
################
##########
# HTSLIB #
##########
ENV TOOL_NAME=htslib
ENV TOOL_VERSION=1.19.1
ENV TARBALL_LOCATION=https://github.com/samtools/$TOOL_NAME/releases/download/$TOOL_VERSION/
ENV TARBALL=$TOOL_NAME-$TOOL_VERSION.tar.bz2
ENV DEST=$TOOLS/$TOOL_NAME/$TOOL_VERSION
ENV PATH=$DEST/bin:$PATH
# INSTALL
RUN echo "#[INFO] TOOL installation '$TOOL_NAME:$TOOL_VERSION'" && \
wget $TARBALL_LOCATION/$TARBALL && \
tar xf $TARBALL && \
rm -rf $TARBALL && \
cd $TOOL_NAME-$TOOL_VERSION && \
make -j $THREADS prefix=$DEST install && \
cd ../ && \
ln -s $TOOL_VERSION $TOOLS/$TOOL_NAME/current && \
rm -rf $TOOL_NAME-$TOOL_VERSION
############
# BCFTOOLS #
############
ENV TOOL_NAME=bcftools
ENV TOOL_VERSION=1.19
ENV TARBALL_LOCATION=https://github.com/samtools/$TOOL_NAME/releases/download/$TOOL_VERSION/
ENV TARBALL=$TOOL_NAME-$TOOL_VERSION.tar.bz2
ENV DEST=$TOOLS/$TOOL_NAME/$TOOL_VERSION
ENV PATH=$DEST/bin:$PATH
# INSTALL
RUN echo "#[INFO] TOOL installation '$TOOL_NAME:$TOOL_VERSION'" && \
wget $TARBALL_LOCATION/$TARBALL && \
tar xf $TARBALL && \
rm -rf $TARBALL && \
cd $TOOL_NAME-$TOOL_VERSION && \
make -j $THREADS prefix=$DEST install && \
cd ../ && \
ln -s $TOOL_VERSION $TOOLS/$TOOL_NAME/current && \
rm -rf $TOOL_NAME-$TOOL_VERSION
##########
# SNPEFF #
##########
ENV TOOL_NAME=snpeff
ENV TOOL_VERSION=5.2a
ENV TARBALL="snpEff_v5_2a_core.zip"
ENV TARBALL_LOCATION=https://snpeff.blob.core.windows.net/versions
ENV TARBALL_FOLDER=snpeff_folder
ENV TOOL_DATABASE_FOLDER=$DATABASES/snpeff/current
ENV DEST=$TOOLS/$TOOL_NAME/$TOOL_VERSION
ENV PATH=$DEST/bin:$PATH
ENV SNPEFF_DATABASES=$TOOL_DATABASE_FOLDER
# INSTALL
RUN echo "#[INFO] TOOL installation '$TOOL_NAME:$TOOL_VERSION'" && \
wget $TARBALL_LOCATION/$TARBALL && \
unzip $TARBALL -d $TARBALL_FOLDER && \
mkdir -p $DEST/bin/ && \
cp $TARBALL_FOLDER/*/*jar $DEST/bin/ -R && \
cp $TARBALL_FOLDER/*/*.config $DEST/bin/ -R && \
ln -s $TOOL_VERSION $TOOLS/$TOOL_NAME/current && \
mkdir -p $TOOL_DATABASE_FOLDER && \
ln -s $TOOL_DATABASE_FOLDER $DEST/bin/data && \
rm -rf $TARBALL $TARBALL_FOLDER;
###########
# ANNOVAR #
###########
ENV TOOL_NAME=annovar
ENV TOOL_VERSION=2020Jun08
ENV TARBALL_LOCATION=http://www.openbioinformatics.org/annovar/download/0wgxR2rIVP
ENV TARBALL=annovar.latest.tar.gz
ENV TARBALL_FOLDER=$TOOL_NAME
ENV TOOL_DATABASE_FOLDER=$DATABASES/annovar/current
ENV DEST=$TOOLS/$TOOL_NAME/$TOOL_VERSION
ENV PATH=$DEST/bin:$PATH
ENV ANNOVAR_DATABASES=$TOOL_DATABASE_FOLDER
# INSTALL
RUN echo "#[INFO] TOOL installation '$TOOL_NAME:$TOOL_VERSION'" && \
wget $TARBALL_LOCATION/$TARBALL && \
tar xf $TARBALL && \
rm -rf $TARBALL && \
cd $TARBALL_FOLDER && \
mkdir -p $DEST/bin && \
cp *.pl $DEST/bin/ -R && \
cd ../ && \
rm -rf $TARBALL_FOLDER && \
ln -s $TOOL_VERSION $TOOLS/$TOOL_NAME/current && \
mkdir -p $TOOL_DATABASE_FOLDER && \
ln -s $TOOL_DATABASE_FOLDER $DEST/bin/databases ;
############
# EXOMISER #
############
ENV TOOL_NAME=exomiser
ENV TOOL_VERSION=14.0.0
ENV TARBALL_LOCATION=https://data.monarchinitiative.org/exomiser/$TOOL_VERSION
ENV TARBALL=exomiser-cli-$TOOL_VERSION-distribution.zip
ENV TARBALL_FOLDER=exomiser-cli-$TOOL_VERSION
ENV DEST=$TOOLS/$TOOL_NAME/$TOOL_VERSION
ENV PATH=$DEST/bin:$PATH
# INSTALL
RUN echo "#[INFO] TOOL installation '$TOOL_NAME:$TOOL_VERSION'" && \
wget $TARBALL_LOCATION/$TARBALL && \
mkdir -p $DEST && \
unzip $TARBALL -d $DEST && \
mv $DEST/$TARBALL_FOLDER $DEST/bin && \
rm -rf $TARBALL && \
ln -s $TOOL_VERSION $TOOLS/$TOOL_NAME/current
#############
# MINIFORGE #
#############
ENV TOOL_NAME=miniforge
ENV TOOL_VERSION=24.7.1-2
ENV TARBALL_LOCATION=https://github.com/conda-forge/miniforge/releases/download/$TOOL_VERSION
ENV TARBALL=Miniforge-pypy3.sh
ENV DEST=$TOOLS/$TOOL_NAME/$TOOL_VERSION
ENV MAMBA=$DEST/bin/mamba
ENV PATH=$TOOLS/$TOOL_NAME/current/bin:$PATH
# INSTALL
RUN echo "#[INFO] TOOL installation '$TOOL_NAME:$TOOL_VERSION'" && \
wget $TARBALL_LOCATION/Miniforge-pypy3-$TOOL_VERSION-$(uname)-$(uname -m).sh -O $TARBALL && \
bash $TARBALL -b -p $DEST && \
rm -f $TARBALL
##########
# PYTHON #
##########
ENV TOOL_NAME=python
ENV PATH=$TOOLS/$TOOL_NAME/current/bin:$PATH
# PYTHON 3.10 - current
ENV TOOL_NAME=python
ENV TOOL_VERSION=3.10
ENV DEST=$TOOLS/$TOOL_NAME/$TOOL_VERSION
# INSTALL
RUN echo "#[INFO] TOOL installation '$TOOL_NAME:$TOOL_VERSION'" && \
$MAMBA create python=$TOOL_VERSION -p $TOOLS/$TOOL_NAME/$TOOL_VERSION && \
$MAMBA clean --all && \
cd $TOOLS/$TOOL_NAME && \
ln -s $TOOL_VERSION current
###########
# HOWARD #
###########
ENV TOOL_NAME=howard
ENV TOOL_VERSION=0.12.1.1
ENV DEST=$TOOLS/$TOOL_NAME/$TOOL_VERSION
ENV PATH=$DEST/bin:$PATH
ENV USER_HOME=/root
ENV HOWARD_HOME=$USER_HOME/howard
# INSTALL
ADD . $DEST
RUN echo "#[INFO] TOOL installation '$TOOL_NAME:$TOOL_VERSION'" && \
chmod 0775 $DEST -R && \
mkdir -p $DATABASES && \
ln -s $TOOL_VERSION $TOOLS/$TOOL_NAME/current && \
ln -s $DEST/ /tool && \
(cd /tool && python -m pip install -e .) && \
mkdir -p $DEST/bin && \
mkdir -p $HOWARD_HOME && \
ln -s $TOOLS $HOWARD_HOME$TOOLS && \
ln -s $DATABASES $HOWARD_HOME$DATABASES && \
ln -s $DATA $HOWARD_HOME$DATA && \
python -m pip cache purge && \
rm -rf $DEST/.git* && \
howard --help
##############################
# WORKDIR / ENTRYPOINT / CMD #
##############################
WORKDIR "/data"
ENTRYPOINT [ "howard" ]