-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
342 lines (288 loc) · 10.7 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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
#### THIS DOCKERFILE HAS BEEN ADAPTER FROM TRINITYRNASEQ/TRINITYRNASEQ DOCKER FILE
#### All credit goes to TrinityRNASEQ/TrinityRNASEQ / brianjohnhaas @ github.com/trinityrnaseq/trinityrnaseq
FROM ubuntu:20.04
MAINTAINER [email protected]
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update && apt-get -qq -y install \
automake \
build-essential \
bzip2 \
cmake \
curl \
default-jre \
fort77 \
ftp \
g++ \
gcc \
gfortran \
git \
libblas-dev \
libbz2-dev \
libcairo2-dev \
libcurl4-openssl-dev \
libdb-dev \
libghc-zlib-dev \
libjpeg-dev \
liblzma-dev \
libncurses-dev \
libncurses5-dev \
libpcre3-dev \
libpng-dev \
libreadline-dev \
libreadline-dev \
libssl-dev \
libtbb-dev \
libx11-dev \
libxml2-dev \
libxt-dev \
libzmq3-dev \
make \
nano \
perl \
pkg-config \
python2 \
python3 \
python3-dev \
python3-distutils \
python3-pip \
python3-setuptools \
rsync \
texlive-latex-base \
tzdata \
unzip \
wget \
x11-common \
zlib1g-dev \
openjdk-17-jdk \
openjdk-17-demo \
openjdk-17-doc \
openjdk-17-jre-headless \
openjdk-17-source \
autoconf
## Perl stuff
RUN curl -L https://cpanmin.us | perl - App::cpanminus
RUN cpanm install DB_File
RUN cpanm install URI::Escape
## set up tool config and deployment area:
ENV SRC /usr/local/src
ENV BIN /usr/local/bin
#####
# Install R
WORKDIR $SRC
RUN apt-get install -y texlive texlive-latex-extra
ENV R_VERSION=R-4.2.0
RUN curl https://cran.r-project.org/src/base/R-4/$R_VERSION.tar.gz -o $R_VERSION.tar.gz && \
tar xvf $R_VERSION.tar.gz && \
cd $R_VERSION && \
./configure && make && make install
RUN R -e 'install.packages("BiocManager", repos="http://cran.us.r-project.org")'
RUN R -e 'BiocManager::install("tidyverse")'
RUN R -e 'BiocManager::install("edgeR")'
RUN R -e 'BiocManager::install("DESeq2")'
RUN R -e 'BiocManager::install("ape")'
RUN R -e 'BiocManager::install("ctc")'
RUN R -e 'BiocManager::install("gplots")'
RUN R -e 'BiocManager::install("Biobase")'
RUN R -e 'BiocManager::install("qvalue")'
RUN R -e 'BiocManager::install("goseq")'
RUN R -e 'BiocManager::install("Glimma")'
RUN R -e 'BiocManager::install("ROTS")'
RUN R -e 'BiocManager::install("GOplot")'
RUN R -e 'BiocManager::install("argparse")'
RUN R -e 'BiocManager::install("fastcluster")'
RUN R -e 'BiocManager::install("DEXSeq")'
RUN R -e 'BiocManager::install("tximport")'
RUN R -e 'BiocManager::install("tximportData")'
RUN R -e 'install.packages("ggplot2", repos="https://cloud.r-project.org")'
ENV LD_LIBRARY_PATH=/usr/local/lib
## Python 3 stuff
RUN apt-get install -y cython3
RUN ln -sf /usr/bin/python3 /usr/bin/python
## some python modules
RUN pip3 install numpy
RUN pip3 install git+https://github.com/ewels/MultiQC.git
RUN pip3 install HTSeq
############################# SOFTWARE INSTALLATION #############################
## Fastp
WORKDIR $SRC
RUN wget http://opengene.org/fastp/fastp && \
chmod a+x ./fastp && \
mv ./fastp $BIN
## RNASpades
WORKDIR $SRC
ENV SPADES_VERSION 3.15.5
RUN wget http://cab.spbu.ru/files/release${SPADES_VERSION}/SPAdes-${SPADES_VERSION}-Linux.tar.gz && \
tar -xzf SPAdes-${SPADES_VERSION}-Linux.tar.gz && \
ln -s $SRC/SPAdes-${SPADES_VERSION}-Linux/bin/spades.py $BIN/.
# cd ../../
# cd SPAdes-${SPADES_VERSION}-Linux/bin/ && \
# rm -r SPAdes-3.15.5-Linux
## bowtie
WORKDIR $SRC
RUN wget https://sourceforge.net/projects/bowtie-bio/files/bowtie/1.2.1.1/bowtie-1.2.1.1-linux-x86_64.zip/download -O bowtie-1.2.1.1-linux-x86_64.zip && \
unzip bowtie-1.2.1.1-linux-x86_64.zip && \
mv bowtie-1.2.1.1/bowtie* $BIN
## RSEM
RUN mkdir /usr/local/lib/site_perl
WORKDIR $SRC
RUN wget https://github.com/deweylab/RSEM/archive/v1.3.3.tar.gz && \
tar xvf v1.3.3.tar.gz && \
cd RSEM-1.3.3 && \
make && \
cp rsem-* convert-sam-for-rsem $BIN && \
cp rsem_perl_utils.pm /usr/local/lib/site_perl/ && \
cd ../ && rm -r RSEM-1.3.3
## Kallisto
WORKDIR $SRC
RUN wget https://github.com/pachterlab/kallisto/releases/download/v0.46.1/kallisto_linux-v0.46.1.tar.gz && \
tar xvf kallisto_linux-v0.46.1.tar.gz && \
mv kallisto/kallisto $BIN
## FASTQC
ENV FASTQC_VERSION 0.11.9
WORKDIR $SRC
RUN wget http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v${FASTQC_VERSION}.zip && \
unzip fastqc_v${FASTQC_VERSION}.zip && \
chmod 755 /usr/local/src/FastQC/fastqc && \
ln -s /usr/local/src/FastQC/fastqc $BIN/.
# blast
WORKDIR $SRC
ENV BLASTPLUS_VERSION 2.12.0
RUN wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${BLASTPLUS_VERSION}/ncbi-blast-${BLASTPLUS_VERSION}+-x64-linux.tar.gz && \
tar xvf ncbi-blast-${BLASTPLUS_VERSION}+-x64-linux.tar.gz && \
cp ncbi-blast-${BLASTPLUS_VERSION}+/bin/* $BIN && \
rm -r ncbi-blast-${BLASTPLUS_VERSION}+
## Bowtie2
WORKDIR $SRC
ENV BOWTIE2_VERSION 2.4.4
RUN wget https://sourceforge.net/projects/bowtie-bio/files/bowtie2/${BOWTIE2_VERSION}/bowtie2-${BOWTIE2_VERSION}-linux-x86_64.zip/download -O bowtie2-${BOWTIE2_VERSION}-linux-x86_64.zip && \
unzip bowtie2-${BOWTIE2_VERSION}-linux-x86_64.zip && \
mv bowtie2-${BOWTIE2_VERSION}-linux-x86_64/bowtie2* $BIN && \
rm *.zip && \
rm -r bowtie2-${BOWTIE2_VERSION}-linux-x86_64
## Samtools
ENV SAMTOOLS_VERSION 1.17
RUN wget https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2 && \
tar xvf samtools-${SAMTOOLS_VERSION}.tar.bz2 && \
cd samtools-${SAMTOOLS_VERSION} && \
./configure && make && make install
## Jellyfish
ENV JELLYFISH_VERSION 2.3.0
RUN wget https://github.com/gmarcais/Jellyfish/releases/download/v${JELLYFISH_VERSION}/jellyfish-${JELLYFISH_VERSION}.tar.gz && \
tar xvf jellyfish-${JELLYFISH_VERSION}.tar.gz && \
cd jellyfish-${JELLYFISH_VERSION}/ && \
./configure && make && make install
## FeatureCounts
ENV SUBREAD_VERSION 2.0.6
RUN wget https://sourceforge.net/projects/subread/files/subread-${SUBREAD_VERSION}/subread-${SUBREAD_VERSION}-Linux-x86_64.tar.gz/download -O subread-${SUBREAD_VERSION}-Linux-x86_64.tar.gz && \
tar xvf subread-${SUBREAD_VERSION}-Linux-x86_64.tar.gz && \
cp -r subread-${SUBREAD_VERSION}-Linux-x86_64/bin/* $BIN/
## Hisat2
RUN wget https://cloud.biohpc.swmed.edu/index.php/s/oTtGWbWjaxsQ2Ho/download -O hisat2-2.2.1-Linux_x86_64.zip && \
unzip hisat2-2.2.1-Linux_x86_64.zip && \
cp hisat2-2.2.1/hisat2* $BIN/
# Not using GMAP in our pipeline, and it takes a long time to install
# Instead we use other aligners
# ## GMAP
# ENV GSNAP_VER 2021-07-23
# WORKDIR $SRC
# RUN GMAP_URL="http://research-pub.gene.com/gmap/src/gmap-gsnap-$GSNAP_VER.tar.gz" && \
# wget $GMAP_URL && \
# tar xvf gmap-gsnap-$GSNAP_VER.tar.gz && \
# cd gmap-$GSNAP_VER && ./configure --prefix=`pwd` && make && make install && \
# cp bin/* $BIN/
#
# blat
RUN wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/blat/blat -P $BIN && \
chmod a+x $BIN/blat
## Picard tools
WORKDIR $SRC
RUN wget https://github.com/broadinstitute/picard/releases/download/2.25.7/picard.jar
ENV PICARD_HOME $SRC
####
## GATK4 installation
WORKDIR $SRC
# ENV GATK_VERSION=4.2.1.0
ENV GATK_VERSION=4.4.0.0
RUN wget https://github.com/broadinstitute/gatk/releases/download/${GATK_VERSION}/gatk-${GATK_VERSION}.zip && \
unzip gatk-${GATK_VERSION}.zip && \
ln -s $SRC/gatk-${GATK_VERSION}/gatk $BIN/.
ENV GATK_HOME $SRC/gatk-${GATK_VERSION}
## STAR
# was 2.7.8a
ENV STAR_VERSION=2.7.10b
RUN STAR_URL="https://github.com/alexdobin/STAR/archive/${STAR_VERSION}.tar.gz" && \
wget -P $SRC $STAR_URL && \
tar -xvf $SRC/${STAR_VERSION}.tar.gz -C $SRC && \
mv $SRC/STAR-${STAR_VERSION}/bin/Linux_x86_64_static/STAR $BIN
## Salmon
WORKDIR $SRC
ENV SALMON_VERSION=1.5.2
RUN wget https://github.com/COMBINE-lab/salmon/releases/download/v${SALMON_VERSION}/Salmon-${SALMON_VERSION}_linux_x86_64.tar.gz && \
tar xvf Salmon-${SALMON_VERSION}_linux_x86_64.tar.gz && \
ln -s $SRC/salmon-${SALMON_VERSION}_linux_x86_64/bin/salmon $BIN/.
## Gradle (for building MUSIAL)
WORKDIR $SRC
ENV GRADLE_VERSION=8.2.1
RUN wget https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip && \
unzip gradle-${GRADLE_VERSION}-bin.zip && \
ln -s $SRC/gradle-${GRADLE_VERSION}/bin/gradle $BIN/.
## MUSIAL
# WORKDIR $SRC
# ENV MUSIAL_VERSION=2.1
# RUN git clone https://github.com/Integrative-Transcriptomics/MUSIAL.git && \
# cd MUSIAL && \
# git checkout v${MUSICAL_VERSION} && \
# gradle clean build && \
# ln -s $SRC/MUSIAL/build/libs/MUSIAL-${MUSICAL_VERSION}.jar $BIN/.
# Alternatively
WORKDIR $SRC
ENV MUSIAL_VERSION=2.1
RUN wget https://github.com/Integrative-Transcriptomics/MUSIAL/releases/download/v2.1/MUSIAL-v2.1.jar && \
ln -s $SRC/MUSIAL-v${MUSIAL_VERSION}.jar $BIN/.
## Trinity
WORKDIR $SRC
ENV TRINITY_VERSION="2.15.1"
ENV TRINITY_CO=8f0c44bccc321170b0994b2196f5be27f9c49b10
# ENV TRINITY_CO=12e47979162b4ca2dec5231c7ffde0a42a01ad71
WORKDIR $SRC
#
# RUN git clone --recursive https://github.com/trinityrnaseq/trinityrnaseq.git && \
# cd trinityrnaseq && \
# git checkout ${TRINITY_CO} && \
# git submodule init && git submodule update && \
# git submodule foreach --recursive git submodule init && \
# git submodule foreach --recursive git submodule update && \
# rm -rf ./trinity_ext_sample_data && \
# make && make plugins && \
# make install && \
# cd ../ && rm -r trinityrnaseq
#
# add branch = devel to bamsifter submodule - fixed htslib compilation errors
#sed -i -E 's/(.*bamsifter.git)/\1\n\tbranch = devel/g' ./.gitmodules && \
#git submodule update --remote && \
#cd trinity-plugins/bamsifter && sed -i 's/^#\(.*\)/\1/' ./build_htslib.sh && cd ../../ \
RUN git clone --recursive https://github.com/trinityrnaseq/trinityrnaseq.git && \
cd trinityrnaseq && \
git checkout ${TRINITY_CO} && \
sed -i -E 's/(.*bamsifter.git)/\1\n\tbranch = devel/g' ./.gitmodules && \
git submodule update --remote && \
cd trinity-plugins/bamsifter && sed -i 's/^#\(.*\)/\1/' ./build_htslib.sh && cd ../../ \
git submodule init && git submodule update && \
git submodule foreach --recursive git submodule init && \
git submodule foreach --recursive git submodule update && \
rm -rf ./trinity_ext_sample_data && \
make && make plugins && \
make install && \
cd ../ && rm -r trinityrnaseq
ENV TRINITY_HOME /usr/local/bin
ENV PATH=${TRINITY_HOME}:${PATH}
# some cleanup
WORKDIR $SRC
RUN rm -r ${R_VERSION} *.tar.gz *.zip *.bz2
RUN apt-get -qq -y remove git && \
apt-get -qq -y autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/log/dpkg.log
################################################
## be sure this is last!
# COPY ./Dockerfile $SRC/Dockerfile.$TRINITY_VERSION