-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
252 lines (179 loc) · 7.66 KB
/
Dockerfile
File metadata and controls
252 lines (179 loc) · 7.66 KB
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
#uncomment below for possibly better stability
#FROM ubuntu@sha256:bace9fb0d5923a675c894d5c815da75ffe35e24970166a48a4460a48ae6e0d19
FROM ubuntu:latest
MAINTAINER Samantha Klasfeld <sjk314@gmail.com>
ENV DEBIAN_FRONTEND=noninteractive
#install dependencies
RUN apt-get update --fix-missing && \
apt-get install -y --no-install-recommends \
bash-completion ca-certificates file \
fonts-texgyre g++ gfortran gsfonts \
libblas-dev libcurl3-dev libcurl4 \
liblapack-dev liblzma5 liblzma-dev libncurses5-dev \
libopenblas-dev libpangocairo-1.0-0 libpcre3 libpng16-16 \
libssl-dev libssl-doc libtiff5 librsvg2-dev \
libxml2-dev locales make tar unzip wget curl zip \
zlib1g zlib1g-dev && \
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.utf8 \
&& /usr/sbin/update-locale LANG=en_US.UTF-8 \
> /dev/null
RUN apt-get update && \
apt-get install -y --no-install-recommends \
default-jdk libbz2-dev \
libcairo2-dev libcurl4-openssl-dev \
libpango1.0-dev libjpeg-dev \
libicu-dev libpcre3-dev \
libpng-dev libreadline-dev libtiff5-dev \
liblzma-dev libx11-dev librsvg2-bin libv8-dev \
libxt-dev perl tcl8.6-dev tk8.6-dev \
texinfo texlive-extra-utils texlive-fonts-recommended \
texlive-fonts-extra texlive-latex-recommended \
texlive-latex-base texlive-latex-extra \
x11proto-core-dev xauth xfonts-base \
xvfb zlib1g-dev >> /dev/null
# install R
WORKDIR /tmp
RUN wget https://cran.r-project.org/src/base/R-4/R-4.0.0.tar.gz
RUN tar -xf R-4.0.0.tar.gz
WORKDIR /tmp/R-4.0.0
## set R compiler flags
RUN R_PAPERSIZE=letter \
R_BATCHSAVE="--no-save --no-restore" \
R_BROWSER=xdg-open \
PAGER=/usr/bin/pager \
PERL=/usr/bin/perl \
R_UNZIPCMD=/usr/bin/unzip \
R_ZIPCMD=/usr/bin/zip \
R_PRINTCMD=/usr/bin/lpr \
LIBnn=lib \
AWK=/usr/bin/awk \
CFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g" \
CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g"
RUN /tmp/R-4.0.0/configure --enable-R-shlib \
--enable-memory-profiling \
--with-readline \
--with-blas \
--with-tcltk \
--disable-nls \
--with-recommended-packages \
--with-x=no \
&& make \
&& make install
RUN apt-get clean && apt-get purge && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
>> /dev/null
# install R libraries
RUN R -e "install.packages('rsvg', dependencies=TRUE, repos='https://cran.r-project.org')"
RUN R -e "install.packages('BiocManager', dependencies=TRUE, repos='http://cran.us.r-project.org')"
RUN wget https://cran.r-project.org/src/contrib/Archive/locfit/locfit_1.5-9.4.tar.gz && \
tar -xzvf locfit_1.5-9.4.tar.gz
RUN R -e "install.packages('locfit', repos = NULL, type='source')"
RUN Rscript -e "BiocManager::install()"
RUN Rscript -e "BiocManager::install('ShortRead', force=TRUE, ask=FALSE)"
RUN Rscript -e "BiocManager::install('edgeR', force=TRUE, ask=FALSE)"
RUN Rscript -e "BiocManager::install('DESeq2', force=TRUE, ask=FALSE)"
RUN Rscript -e "BiocManager::install('GOstats', force=TRUE, ask=FALSE)"
RUN Rscript -e "BiocManager::install('amap', force=TRUE, ask=FALSE)"
RUN Rscript -e "BiocManager::install('systemPipeR', force=TRUE, ask=FALSE)"
RUN Rscript -e "BiocManager::install('ChIPQC', force=TRUE, ask=FALSE)"
RUN Rscript -e "BiocManager::install('GenomicFeatures', force=TRUE, ask=FALSE)"
RUN Rscript -e "BiocManager::install('GenomicRanges', force=TRUE, ask=FALSE)"
# import python & other useful software
RUN apt-get update --fix-missing && \
apt-get install -y --no-install-recommends \
build-essential gzip git \
default-jre bedtools \
python3.6 python3-pip python3-setuptools python3-dev \
vim nano less rsync && \
apt-get clean && apt-get purge && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# install python libraries
COPY requirements.txt ./
RUN pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir -r requirements.txt
RUN pip install --upgrade numpy
# destination to install specific softwares
ENV DEST=/usr/src
WORKDIR $DEST
# install KentUtils
RUN mkdir kentUtils
WORKDIR $DEST/kentUtils
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedCoverage ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedExtendRanges ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedGraphToBigWig ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedIntersect ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedSort ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedToBigBed ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bigWigAverageOverBed ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bigWigMerge ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bigWigSummary ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bigWigToBedGraph ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bigWigToWig ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/faAlign ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/faCount ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/faOneRecord ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/faSize ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/faSplit ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/fetchChromSizes ./
RUN rsync -aP \
rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/wigToBigWig ./
ENV PATH=${PATH}:/usr/src/kentUtils
# install SRA toolkit
WORKDIR $DEST
RUN wget http://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/current/sratoolkit.current-ubuntu64.tar.gz && \
tar -xzvf sratoolkit.current-ubuntu64.tar.gz
ENV PATH=${PATH}:/usr/src/sratoolkit.2.11.1-ubuntu64/bin
# install FASTQC
RUN wget https://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.9.zip -O FastQC-0.11.9.zip && \
unzip FastQC-0.11.9.zip
RUN chmod +x /usr/src/FastQC/fastqc
ENV PATH=${PATH}:/usr/src/FastQC
# install trimmomatic
RUN wget http://www.usadellab.org/cms/uploads/supplementary/Trimmomatic/Trimmomatic-0.39.zip -O Trimmomatic-0.39.zip && \
unzip Trimmomatic-0.39.zip
# install bowtie2
RUN wget https://github.com/BenLangmead/bowtie2/releases/download/v2.4.4/bowtie2-2.4.4-linux-x86_64.zip -O bowtie2-2.4.4-linux-x86_64.zip && \
unzip bowtie2-2.4.4-linux-x86_64.zip
ENV PATH=${PATH}:/usr/src/bowtie2-2.4.4-linux-x86_64
# install samtools
RUN wget https://github.com/samtools/samtools/releases/download/1.9/samtools-1.9.tar.bz2 && \
tar jxf samtools-1.9.tar.bz2 && \
rm samtools-1.9.tar.bz2 && \
cd samtools-1.9 && \
./configure --prefix $(pwd) && \
make
ENV PATH=${PATH}:/usr/src/samtools-1.9
# install PICARD
RUN git clone https://github.com/broadinstitute/picard.git
WORKDIR $DEST/picard
RUN $DEST/picard/gradlew shadowJar
ENV PATH=${PATH}:/usr/src/picard/build/libs
# install biostar145820 (for shuffling bam files)
WORKDIR $DEST
RUN git clone --branch dev "https://github.com/lindenb/jvarkit.git"
WORKDIR $DEST/jvarkit
RUN $DEST/jvarkit/gradlew biostar145820
ENV PATH=${PATH}:/usr/src/jvarkit/dist
# reset working directory
WORKDIR /
# report done
CMD ["echo", "docker", "image", "built"]
WORKDIR /home