-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile_cloud_dev
287 lines (243 loc) · 9.81 KB
/
Dockerfile_cloud_dev
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
FROM ubuntu:xenial
USER root
# might need to install a particular version of perl
RUN apt-get update && apt-get install -y curl \
gcc \
git \
tar \
unzip \
perl \
wget \
make \
automake \
curl \
gzip \
g++ \
vim \
gfortran \
default-jdk \
r-base \
r-base-dev
RUN apt-get install -y libimage-size-perl \
libtest-most-perl \
libdbd-mysql-perl \
libdata-uuid-perl \
libconvert-color-perl \
libio-all-perl \
libdata-pageset-perl \
libsearch-queryparser-perl \
libcatalyst-action-renderview-perl \
libx11-6 \
&& apt-get clean
# create an Rfam directory where all software will be installed
RUN mkdir /Rfam
RUN mkdir /Rfam/software
RUN mkdir /Rfam/software/bin
RUN mkdir /Rfam/rfamseq
RUN mkdir /workdir
RUN cpan -f install File::ShareDir::Install && \
cpan -f install Inline::C && \
cpan -f install Data::Printer && \
cpan -f install Config::General && \
cpan -f install DBIx::Class::Schema && \
cpan -f install DateTime && \
cpan -f install DateTime::Format::MySQL && \
cpan -f install MooseX::NonMoose && \
cpan -f install Bio::Annotation::Reference && \
cpan -f install File::Touch && \
cpan -f install IPC::Run && \
cpan -f install Term::ReadPassword && \
cpan -f install JSON && \
cpan -f install JSON::XS
#cpan -f install DBI
#cpan -f install DBI::mysql \
#cpan -f install Catalyst::Devel
#cpan -f install Catalyst::Model::DBIC::Schema
ENV PERL5LIB=/usr/share/perl5:/usr/local/share/perl/5.24.1:/usr/bin/perl/:/usr/bin/perl5
ENV USR_BIN=/Rfam/software/bin
ENV DISPLAY=0.0
# SOFTWARE INSTALLATION
# Infernal installation
RUN cd /Rfam/software && \
curl -OL http://eddylab.org/infernal/infernal-1.1.2.tar.gz && \
tar -xvzf infernal-1.1.2.tar.gz && \
cd infernal-1.1.2 && \
./configure && \
make && \
make install && \
cd /Rfam/software/infernal-1.1.2/easel && \
make install && \
cd miniapps && \
# create links to make easel tools available in software bin
cp esl-afetch esl-alimanip esl-alimap esl-alimask esl-alimerge esl-alipid /Rfam/software/bin/. && \
cp esl-alirev esl-cluster esl-alistat esl-compalign esl-compstruct esl-construct /Rfam/software/bin/. && \
cp esl-histplot esl-mask esl-reformat esl-selectn esl-seqrange esl-seqstat /Rfam/software/bin/. && \
cp esl-sfetch esl-shuffle esl-ssdraw esl-translate esl-weight /Rfam/software/bin/.
# make infernal tools available in software bin
RUN cd /Rfam/software/infernal-1.1.2/src && \
cp cmalign cmbuild cmscan cmemit cmpress cmstat cmsearch cmcalibrate /Rfam/software/bin/.
# CMfinder installation
RUN cd /Rfam/software && \
wget http://bio.cs.washington.edu/yzizhen/CMfinder/CMfinder_0.2.tgz && \
tar -xvf CMfinder_0.2.tgz && \
cd CMfinder_0.2 && \
make && \
cp bin/cmfinder /Rfam/software/bin/.
# HMMER installation
RUN cd /Rfam/software && \
wget http://eddylab.org/software/hmmer/hmmer-3.2.1.tar.gz && \
tar -xzf hmmer-3.2.1.tar.gz && \
cd /Rfam/software/hmmer-3.2.1 && \
./configure && \
make && \
make install && \
cd /Rfam/software/hmmer-3.2.1/src && \
cp alimask hmmalign hmmbuild hmmc2 hmmconvert hmmemit hmmerfm-exactmatch /Rfam/software/bin/. && \
cp hmmfetch hmmlogo hmmpgmd hmmpress hmmscan hmmsearch hmmsim hmmstat /Rfam/software/bin/. && \
cp jackhmmer makehmmerdb nhmmer nhmmscan phmmer /Rfam/software/bin/.
# MAFFT installation
RUN cd /Rfam/software && \
curl -OL https://mafft.cbrc.jp/alignment/software/mafft-7.402-with-extensions-src.tgz && \
tar -xzf mafft-7.402-with-extensions-src.tgz && \
cd mafft-7.402-with-extensions/core && \
make clean && \
make && \
make install && \
cd /Rfam/software/mafft-7.402-with-extensions/binaries && \
cp mafft.1 /Rfam/software/bin/mafft
# ERATE installation
RUN cd /Rfam/software && \
curl -OL http://eddylab.org/software/erate/erate-v.0.8.tar.gz && \
tar -xzf erate-v.0.8.tar.gz && \
cd erate-v.0.8/phylip3.66-erate/src && \
make dnaml && \
cp dnaml /Rfam/software/bin/.
# RNAcode installation
RUN cd /Rfam/software && \
curl -OL http://github.com/downloads/wash/rnacode/RNAcode-0.3.tar.gz && \
tar -xzf RNAcode-0.3.tar.gz && \
cd RNAcode-0.3 && \
./configure --prefix=/Rfam/software/RNAcode-0.3 && \
make && \
make install && \
cp /Rfam/software/RNAcode-0.3/bin/RNAcode /Rfam/software/bin/.
# MUSCLE installation
RUN cd /Rfam/software && \
curl -OL http://www.drive5.com/muscle/downloads3.8.31/muscle3.8.31_i86linux64.tar.gz && \
tar -zxvf muscle3.8.31_i86linux64.tar.gz && \
cp /Rfam/software/muscle3.8.31_i86linux64 /Rfam/software/bin/muscle
# argtable2/ClustalW dependencies
RUN cd /Rfam/software && \
curl -OL http://prdownloads.sourceforge.net/argtable/argtable2-13.tar.gz && \
tar -zxvf argtable2-13.tar.gz && \
cd argtable2-13 && \
./configure --prefix=/Rfam/software/argtable2-13 && \
make && \
make install
# ClustalW installation
RUN cd /Rfam/software && \
curl -OL http://www.clustal.org/omega/clustal-omega-1.2.4.tar.gz && \
tar -zxvf clustal-omega-1.2.4.tar.gz && \
cd clustal-omega-1.2.4 && \
./configure CFLAGS=-I/Rfam/software/argtable2-13/include LDFLAGS=-L/Rfam/software/argtable2-13/lib --prefix=/Rfam/software/clustal-omega-1.2.4 && \
make && \
make install && \
cp /Rfam/software/clustal-omega-1.2.4/bin/clustalo /Rfam/software/bin/.
# PPFold installation
RUN cd /Rfam/software && \
curl -OL http://www.daimi.au.dk/~compbio/pfold/PPfold/PPfold3.1.1.jar && \
cp PPfold3.1.1.jar /Rfam/software/bin/.
# RAxML installation
RUN cd /Rfam/software && \
git clone https://github.com/stamatak/standard-RAxML.git && \
cd /Rfam/software/standard-RAxML && \
make -f Makefile.gcc && \
cp /Rfam/software/standard-RAxML/raxmlHPC /Rfam/software/bin/.
RUN cd /Rfam/software && \
curl -OL https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_4_x/ViennaRNA-2.4.9.tar.gz && \
tar -zxvf ViennaRNA-2.4.9.tar.gz && \
cd ViennaRNA-2.4.9 && \
./configure --prefix=/Rfam/software/ViennaRNA-2.4.9 && \
make && \
make install && \
cd bin && \
cp RNA2Dfold RNALalifold RNALfold RNAPKplex RNAaliduplex RNAalifold /Rfam/software/bin/. && \
cp RNAcofold RNAdistance RNAduplex RNAeval RNAfold RNAforester RNAheat /Rfam/software/bin/. && \
cp RNAinverse RNAlocmin RNApaln RNAparconv RNApdist RNAplex RNAplfold /Rfam/software/bin/. && \
cp RNAplot RNApvmin RNAsnoop RNAsubopt RNAup /Rfam/software/bin/.
#TCOFFEE installation -- test and fix
RUN cd /Rfam/software && \
git clone https://github.com/cbcrg/tcoffee.git tcoffee && \
cd tcoffee/t_coffee/src && \
make t_coffee && \
mv t_coffee /Rfam/software/bin/.
# install Bio-Easel
RUN cd /Rfam && \
git clone https://github.com/nawrockie/Bio-Easel.git && \
cd Bio-Easel && \
mkdir src && cd src && \
git clone https://github.com/EddyRivasLab/easel.git easel && \
cd easel && git checkout tags/Bio-Easel-0.06 && rm -rf .git && \
cd /Rfam/Bio-Easel && perl Makefile.PL && \
make && \
make install
# install some python tools
RUN cd /Rfam && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py && \
pip install requests
RUN apt-get install -y libclass-dbi-loader-perl
# clone Rfam repo
RUN cd /Rfam && git clone https://github.com/Rfam/rfam-family-pipeline.git && \
cp /Rfam/rfam-family-pipeline/dependencies/plot_outlist.R /Rfam/software/bin/. && \
cp /Rfam/rfam-family-pipeline/kubernetes/rfkubesub.py /Rfam/software/bin/. && \
mv /Rfam/rfam-family-pipeline/Rfam/Conf/rfam_cloud.conf /Rfam/rfam-family-pipeline/Rfam/Conf/rfam.conf
# install kubectl to establish communication with the k8s cluster
RUN cd /usr/local/bin && \
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x ./kubectl
RUN apt-get update && apt-get install -y libcatalyst-devel-perl \
libclass-dbi-mysql-perl \
libdbix-class-schema-loader-perl \
libsvn-perl
RUN cpan -f install Catalyst::Model::DBI
RUN cpan -f install DBIx::Class
RUN cpan -f install Catalyst::Devel
RUN cpan -f install DBIx::Class
RUN cpan -f install Catalyst::Model
RUN cpan -f install DBIx::Class::ResultSet
RUN apt-get install -y nano \
less
RUN apt-get install -y python3
RUN python3 /Rfam/get-pip.py && pip3 install kubernetes
# R-scape installation - release 1.5.10
RUN cd /Rfam/software && wget http://eddylab.org/software/rscape/rscape.tar.gz && \
tar -xvzf rscape.tar.gz && \
mv rscape_* rscape && \
rm rscape.tar.gz && \
cd rscape && \
./configure && make && make install
RUN apt-get install -y aspell
#emacs installation
RUN apt-get install -y software-properties-common && \
add-apt-repository ppa:kelleyk/emacs && \
apt-get install -y emacs24-lucid
# install ralee
RUN cd /Rfam/software && wget http://sgjlab.org/wp-content/uploads/2014/11/ralee-mode-0.8.tar.gz && \
tar -xzvf ralee-mode*.tar.gz
# set emacs config
#COPY ralee-emacs /workdir/.emacs
# set up user account to prevent from using root to run the scripts
RUN useradd --create-home -s /bin/bash rfam-user
WORKDIR /home/rfam-user
USER rfam-user
COPY ralee-emacs /home/rfam-user/.emacs
# add command to bashrc to move to /workdir
RUN echo "cd /workdir" >> ~/.bashrc
RUN echo "alias cd_make='cd /Rfam/rfam-family-pipeline/Rfam/Scripts/make'" >> ~/.bashrc
RUN echo "alias cd_lib='cd /Rfam/rfam-family-pipeline/Rfam/Lib/Bio/Rfam'" >> ~/.bashrc
ENV PATH=/usr/bin:$PATH:/Rfam/software/bin:/Rfam/software/rscape/bin:/Rfam/rfam-family-pipeline/Rfam/Scripts/make:/Rfam/rfam-family-pipeline/Rfam/Scripts/qc:/Rfam/rfam-family-pipeline/Rfam/Scripts/jiffies:/Rfam/rfam-family-pipeline/Rfam/Scripts/curation:/Rfam/rfam-family-pipeline/Rfam/Scripts/view:/Rfam/rfam-family-pipeline/Rfam/Scripts/svn:/Rfam/Bio-Easel/scripts
ENV PERL5LIB=/usr/bin/perl:/usr/bin/perl5:/Rfam/Bio-Easel/blib/lib:/Rfam/Bio-Easel/blib/arch:/usr/share/perl5:/usr/local/share/perl/5.24.1:/usr/bin/perl/:/usr/share/perl:/usr/share/perl5:/Rfam/rfam-family-pipeline/Rfam/Lib:/Rfam/rfam-family-pipeline/Rfam/Schemata:$PERL5LIB
ENV PERL5LIB=$PERL5LIB:/Rfam/rfam-family-pipeline/PfamLib:/usr/share/perl:/usr/share/perl5
ENV PERL5LIB=$PERL5LIB:/Rfam/rfam-family-pipeline/PfamSchemata
ENV RFAM_CONFIG=/Rfam/rfam-family-pipeline/Rfam/Conf/rfam.conf