-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
290 lines (245 loc) · 7.78 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
FROM ubuntu:focal as build
#ENV CUDO_VISIBLE_DEVICES=-1
# Set locale settings
ENV LANGUAGE=en_US.en
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
RUN apt-get update && apt-get install -y locales && \
sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=$LANG
# Generate locale settings
RUN locale-gen en_US.UTF-8
RUN apt-get -y update && \
DEBIAN_FRONTEND=noninteractive \
apt-get -y install \
autoconf \
automake \
cmake \
curl \
gcc \
git \
libbz2-dev \
libcurl4-gnutls-dev \
liblzma-dev \
libncurses5-dev \
libssl-dev \
libtool \
make \
wget \
apt-utils \
zip \
zlib1g-dev \
yasm \
build-essential \
python3-dev \
python3-pip \
zlib1g-dev \
libncursesw5-dev \
gfortran \
libreadline8 \
libreadline-dev \
libx11-dev \
libxt6 \
xorg-dev \
libpcre2-posix2 \
libpcre2-dev \
&& \
apt-get clean
# downgrade numpy for deprecated np.bool
RUN pip3 install numpy==1.23.1
# Install Flye 2.9
RUN pip3 install git+https://github.com/fenderglass/[email protected]
# Install Medaka (https://github.com/nanoporetech/medaka)
# Medaka depends on bgzip, minimap2, samtools, bcftools, and tabix. Install
# those dependencies.
# Install minimap2 (https://github.com/lh3/minimap2)
RUN curl -L https://github.com/lh3/minimap2/releases/download/v2.24/minimap2-2.24_x64-linux.tar.bz2 \
| tar -jxvf - -C /usr/local \
&& ln -s /usr/local/minimap2-2.24_x64-linux/minimap2 /usr/local/bin
# Install bowtie2 (http://bowtie-bio.sourceforge.net/bowtie2/index.shtml)
RUN curl -L -o bowtie2-2.4.5-linux-x86_64.zip https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.4.5/bowtie2-2.4.5-linux-x86_64.zip/download \
&& unzip bowtie2-2.4.5-linux-x86_64.zip -d /usr/local \
&& ln -s /usr/local/bowtie2-2.4.5-linux-x86_64/bowtie2 /usr/local/bin \
&& ln -s /usr/local/bowtie2-2.4.5-linux-x86_64/bowtie2-build /usr/local/bin
# Install packages needed to build HTSlib and samtools
RUN apt-get -y install \
autoconf \
automake \
make \
gcc \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libcurl4-gnutls-dev \
libssl-dev \
libncurses5-dev \
&& \
apt-get clean
# Install HTSlib for bgzip, tabix
RUN wget https://github.com/samtools/htslib/releases/download/1.17/htslib-1.17.tar.bz2 \
&& bunzip2 -c htslib-1.17.tar.bz2 | tar xf - \
&& cd htslib-1.17 \
&& ./configure \
&& make \
&& make install
# Install samtools
RUN wget https://github.com/samtools/samtools/releases/download/1.17/samtools-1.17.tar.bz2 \
&& bunzip2 -c samtools-1.17.tar.bz2 | tar xf - \
&& cd samtools-1.17 \
&& ./configure \
&& make \
&& make install
# Install bcftools
RUN wget https://github.com/samtools/bcftools/releases/download/1.17/bcftools-1.17.tar.bz2 \
&& bunzip2 -c bcftools-1.17.tar.bz2 | tar xf - \
&& cd bcftools-1.17 \
&& ./configure \
&& make \
&& make install
# Install idna
RUN pip3 install idna
# Install Cython
RUN pip3 install --upgrade cython
# Install Setuptools
RUN pip3 install setuptools-scm==6.4.2
# Install protobuf
RUN pip3 install protobuf==4.22.1
# Install Medaka
RUN pip3 install medaka==1.7.3
# Install racon
RUN git clone --recursive https://github.com/isovic/racon.git racon \
&& cd racon \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
&& make \
&& make install
# Install Unicycler 0.4.8
RUN pip3 install git+https://github.com/rrwick/[email protected]
# Install fastq_pair
RUN curl -s -L https://github.com/linsalrob/fastq-pair/archive/v1.0.tar.gz | tar xzf - \
&& cd fastq-pair-1.0 \
&& mkdir build \
&& cd build \
&& cmake ../ \
&& make \
&& make install
# Install SPAdes for unicycler
RUN wget http://cab.spbu.ru/files/release3.15.5/SPAdes-3.15.5-Linux.tar.gz \
&& tar -xzf SPAdes-3.15.5-Linux.tar.gz \
&& cd SPAdes-3.15.5-Linux \
&& cp bin/* /usr/local/bin/ \
&& cp -r share/* /usr/local/share/
# Install seqkit v0.12.0 in /usr/local/bin
RUN curl -s -L \
https://github.com/shenwei356/seqkit/releases/download/v0.12.0/seqkit_linux_amd64.tar.gz \
| tar -xzf - -C /usr/local/bin
# Install Blast+ v2.10.0 in /usr/local
RUN curl -s -L \
https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.13.0/ncbi-blast-2.13.0+-x64-linux.tar.gz \
| tar -xzf - -C /usr/local \
&& ln -s /usr/local/ncbi-blast-2.13.0+/bin/* /usr/local/bin
# R
RUN wget -c https://cloud.r-project.org/src/base/R-4/R-4.2.3.tar.gz \
&& tar -zxf R-4.2.3.tar.gz \
&& cd R-4.2.3 \
&& ./configure \
&& make -j9 \
&& make install
# ----------------------------------------------------------------------
#
# Now construct the final docker image without all of the development
# gunk so that it is a leaner docker image.
#
# ----------------------------------------------------------------------
FROM ubuntu:focal
# Install locales package
# Set locale settings
ENV LANGUAGE=en_US.en
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
RUN apt-get update && apt-get install -y locales && \
sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=$LANG
# sorter needs pandas and biopython
RUN apt-get -y update && \
DEBIAN_FRONTEND=noninteractive \
apt-get -y --no-install-recommends install \
bowtie2 \
build-essential \
bwa \
default-jdk-headless \
gfortran \
libbz2-dev \
libcurl4-gnutls-dev \
libjpeg9-dev \
liblzma-dev \
libmariadbclient-dev \
libpng-dev \
libssl-dev \
libxml2-dev \
bedops \
python3 \
python3-biopython \
python3-idna \
python3-pandas \
python3-pymummer \
python3-pip \
bedtools \
zlib1g \
&& \
apt-get clean
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
# downgrade numpy for deprecated np.bool
RUN pip3 install numpy==1.23.1
COPY --from=build /usr/local /usr/local
# Install AliTV
# AliTV needs libyaml-perl libhash-merge-perl bioperl perl cpanm lastz
RUN apt-get -y update && \
DEBIAN_FRONTEND=noninteractive \
apt-get -y --no-install-recommends install \
libyaml-perl \
libhash-merge-perl \
bioperl \
perl \
wget \
git \
cpanminus && \
apt-get clean
#RUN cpan FindBin::Real
#RUN cpan Log::Log4perl
#RUN cpanm JSON
#RUN cpanm Bio::Perl Bio::FeatureIO
# Download, compile and install lastz
#RUN wget https://github.com/lastz/lastz/archive/1.04.22.tar.gz && \
# tar -xf 1.04.22.tar.gz && \
# cd lastz-1.04.22 && \
# make && \
# make install
# remove -Werror from Makefile to fix compile errors
# sed -i 's/-Werror //' src/Makefile && \
# make && \
# install -m 0755 src/lastz /usr/local/bin/ && \
# install -m 0755 src/lastz_D /usr/local/bin/ && \
# cd .. && rm -rf lastz-*
#WORKDIR /app
#COPY . /app
#ENV PERL5LIB="/app/lib:${PERL5LIB}"
# AliTV v1.0.6 install
#RUN git clone https://github.com/AliTVTeam/AlitTV-perl-interface && \
# cd AliTV-perl-interface \
# cpanm --installdeps .
#RUN chmod 755 AliTV-perl-interface-1.0.6/bin/alitv.pl
# Install chromoMap
RUN R -e "install.packages('chromoMap', repos = 'http://cran.us.r-project.org')"
RUN R -e "install.packages('htmltools', repos = 'http://cran.us.r-project.org')"
# pilon
ADD https://github.com/broadinstitute/pilon/releases/download/v1.23/pilon-1.23.jar /usr/local/bin/
RUN chmod 755 /usr/local/bin/pilon-1.23.jar
ADD pilon /usr/local/bin/
# Add the entrypoint script
COPY PRYMETIME /usr/local/bin/prymetime
# When the docker image is launched the resulting container runs the entrypoint script
ENTRYPOINT ["/usr/local/bin/prymetime/PRYMETIME.sh"]