forked from d3b-center/OpenPedCan-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
480 lines (398 loc) · 13.9 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
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
FROM rocker/tidyverse:3.6.0
MAINTAINER ccdl@alexslemonade.org
WORKDIR /rocker-build/
ARG github_pat=$GITHUB_PAT
ENV GITHUB_PAT=$github_pat
RUN RSPM="https://packagemanager.rstudio.com/cran/2019-07-07" \
&& echo "options(repos = c(CRAN='$RSPM'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site
COPY scripts/install_bioc.r .
### Install apt-getable packages to start
#########################################
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils dialog
# Add curl, bzip2 and some dev libs
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
curl \
bzip2 \
zlib1g \
libbz2-dev \
liblzma-dev \
libreadline-dev
# libgmp3-dev is needed for signature.tools.lib to install
RUN apt-get -y --no-install-recommends install \
libgmp3-dev
# libmagick++-dev is needed for coloblindr to install
RUN apt-get -y --no-install-recommends install \
libgdal-dev \
libudunits2-dev \
libmagick++-dev
# Required for installing pdftools, which is a dependency of gridGraphics
RUN apt-get -y --no-install-recommends install \
libpoppler-cpp-dev
# Install pip3 and low-level python installation reqs
RUN apt-get -y --no-install-recommends install \
python3-pip python3-dev
RUN pip3 install \
"Cython==0.29.15" \
"setuptools==46.3.0" \
"six==1.14.0" \
"wheel==0.34.2"
# Install java
RUN apt-get -y --no-install-recommends install \
default-jdk
# Required for running matplotlib in Python in an interactive session
RUN apt-get -y --no-install-recommends install \
python3-tk
# Standalone tools and libraries
################################
# Required for mapping segments to genes
# Add bedtools
RUN wget https://github.com/arq5x/bedtools2/releases/download/v2.28.0/bedtools-2.28.0.tar.gz && \
tar -zxvf bedtools-2.28.0.tar.gz && rm -f bedtools-2.28.0.tar.gz && \
cd bedtools2 && \
make && \
mv bin/* /usr/local/bin && \
cd .. && rm -rf bedtools2
# Add bedops per the BEDOPS documentation
RUN wget https://github.com/bedops/bedops/releases/download/v2.4.37/bedops_linux_x86_64-v2.4.37.tar.bz2 && \
tar -jxvf bedops_linux_x86_64-v2.4.37.tar.bz2 && \
rm -f bedops_linux_x86_64-v2.4.37.tar.bz2 && \
mv bin/* /usr/local/bin
# HTSlib
RUN wget https://github.com/samtools/htslib/releases/download/1.9/htslib-1.9.tar.bz2 && \
tar -jxvf htslib-1.9.tar.bz2 && rm -f htslib-1.9.tar.bz2 && \
cd htslib-1.9 && \
./configure && \
make && \
make install && \
cd .. && rm -rf htslib-1.9
#### R packages
###############
# Commonly used R packages
RUN ./install_bioc.r \
class \
cluster \
data.table \
DT \
flextable \
foreign \
GGally \
lattice \
MASS \
Matrix \
mgcv \
nlme \
nnet \
optparse \
R.utils \
RColorBrewer \
rpart \
rprojroot \
survival \
viridis
# Required for interactive sample distribution plots
# map view is needed to create HTML outputs of the interactive plots
RUN ./install_bioc.r \
gdalUtils \
leafem \
leafpop \
lwgeom \
mapview \
plainview \
sf \
stars
# Installs packages needed for plottings
# treemap, interactive plots, and hex plots
# Rtsne and umap are required for dimension reduction analyses
RUN ./install_bioc.r \
corrplot \
d3r \
ggfortify \
ggpubr \
ggrepel \
ggsci \
ggsignif \
gridGraphics \
hexbin \
pheatmap \
Rtsne \
spatial \
treemap \
umap \
UpSetR \
VennDiagram
# Install rjava
RUN ./install_bioc.r \
rJava
# Need for survminer for doing survival analysis
RUN ./install_bioc.r \
cmprsk \
survMisc \
survminer
# maftools for proof of concept in create-subset-files
RUN ./install_bioc.r \
maftools
# ComplexHeatmap
RUN ./install_bioc.r \
ComplexHeatmap
# This is needed for the CNV frequency and proportion aberration plots
RUN ./install_bioc.r \
GenVisR
# These packages are for the genomic region analysis for snv-callers
RUN ./install_bioc.r \
annotatr \
TxDb.Hsapiens.UCSC.hg38.knownGene \
org.Hs.eg.db \
BSgenome.Hsapiens.UCSC.hg19 \
BSgenome.Hsapiens.UCSC.hg38
# Packages for expression normalization and batch correction
RUN ./install_bioc.r \
preprocessCore \
sva
## This is deprecated
# # These packages are for single-sample GSEA analysis
# RUN ./install_bioc.r 'GSEABase', 'GSVA'
# Required for sex prediction from RNA-seq data
RUN ./install_bioc.r \
glmnet \
glmnetUtils \
caret \
e1071
# bedr package & check to make sure binaries are available by loading
RUN ./install_bioc.r \
bedr \
&& Rscript -e "library(bedr)"
# Also install for mutation signature analysis
# qdapRegex is for the fusion analysis
RUN ./install_bioc.r \
deconstructSigs \
qdapRegex
# packages required for collapsing RNA-seq data by removing duplicated gene symbols
RUN ./install_bioc.r \
rtracklayer
# TCGAbiolinks for TMB compare analysis
RUN R -e "remotes::install_github('RDocTaskForce/parsetools', ref = '1e682a9f4c5c7192d22e8985ce7723c09e98d62b', dependencies = TRUE)" \
&& R -e "remotes::install_github('RDocTaskForce/testextra', ref = '4e5dfac8853c08d5c2a8790a0a1f8165f293b4be', dependencies = TRUE)" \
&& R -e "remotes::install_github('halpo/purrrogress', ref = '54f2130477f161896e7b271ed3ea828c7e4ccb1c', dependencies = TRUE)" \
&& ./install_bioc.r TCGAbiolinks
# Install for mutation signature analysis
RUN ./install_bioc.r \
ggbio
# CRAN package msigdbr and GSVA for gene-set-enrichment-analysis
RUN ./install_bioc.r \
msigdbr \
GSVA
# package required for immune deconvolution
RUN R -e "remotes::install_github('icbi-lab/immunedeconv', ref = '493bcaa9e1f73554ac2d25aff6e6a7925b0ea7a6', dependencies = TRUE)"
# package to read yaml file
RUN ./install_bioc.r \
rlist
RUN R -e "remotes::install_github('const-ae/ggupset', ref = '7a33263cc5fafdd72a5bfcbebe5185fafe050c73', dependencies = TRUE)"
# This is needed to create the interactive pie chart
RUN R -e "remotes::install_github('timelyportfolio/sunburstR', ref = 'd40d7ed71ee87ca4fbb9cb8b7cf1e198a23605a9', dependencies = TRUE)"
# This is needed to create the interactive treemap
RUN R -e "remotes::install_github('timelyportfolio/d3treeR', ref = '0eaba7f1c6438e977f8a5c082f1474408ac1fd80', dependencies = TRUE)"
# Need this package to make plots colorblind friendly
RUN R -e "remotes::install_github('clauswilke/colorblindr', ref = '1ac3d4d62dad047b68bb66c06cee927a4517d678', dependencies = TRUE)"
# remote package EXTEND needed for telomerase-activity-prediciton analysis
RUN R -e "remotes::install_github('NNoureen/EXTEND', ref = '467c2724e1324ef05ad9260c3079e5b0b0366420', dependencies = TRUE)"
# package required for shatterseek
RUN R -e "withr::with_envvar(c(R_REMOTES_NO_ERRORS_FROM_WARNINGS='true'), remotes::install_github('parklab/ShatterSeek', ref = '83ab3effaf9589cc391ecc2ac45a6eaf578b5046', dependencies = TRUE))"
# Packages required for rna-seq-composition
RUN ./install_bioc.r \
EnvStats \
janitor
# Patchwork for plot compositions
RUN R -e "remotes::install_github('thomasp85/patchwork', ref = 'c67c6603ba59dd46899f17197f9858bc5672e9f4')"
# This is required for creating a treemap of the broad histology and integrated diagnoses
RUN R -e "remotes::install_github('wilkox/treemapify', ref = 'e70adf727f4d13223de8146458db9bef97f872cb', dependencies = TRUE)"
# Need this specific version of circlize so it has hg38
RUN R -e "remotes::install_github('jokergoo/circlize', ref = 'b7d86409d7f893e881980b705ba1dbc758df847d', dependencies = TRUE)"
# signature.tools.lib needed for mutational-signatures
RUN R -e "remotes::install_github('Nik-Zainal-Group/signature.tools.lib', ref = 'a54e5d904d091b90ad3b0f9663133e178c36b9aa', dependencies = TRUE)"
# Install python packages
##########################
# Install python3 tools and ALL dependencies
RUN pip3 install \
"appdirs==1.4.4" \
"attrs==20.3.0" \
"backcall==0.2.0" \
"bleach==3.3.0" \
"bx-python==0.8.8" \
"certifi==2020.12.5" \
"chardet==4.0.0" \
"ConfigArgParse==1.4" \
"CrossMap==0.3.9" \
"cycler==0.10.0" \
"datrie==0.8.2" \
"decorator==4.4.2" \
"defusedxml==0.7.1" \
"docutils==0.16" \
"entrypoints==0.3" \
"gitdb==4.0.7" \
"GitPython==3.1.14" \
"idna==2.10" \
"importlib-metadata==2.1.1" \
"ipykernel==4.8.1" \
"ipython==7.9.0" \
"ipython-genutils==0.2.0" \
"jedi==0.17.2" \
"Jinja2==2.11.3" \
"jsonschema==3.2.0" \
"jupyter-client==6.1.12" \
"jupyter-core==4.6.3" \
"kiwisolver==1.1.0" \
"MarkupSafe==1.1.1" \
"matplotlib==3.0.3" \
"mistune==0.8.4" \
"mizani==0.5.4" \
"nbconvert==5.6.1" \
"nbformat==5.1.2" \
"notebook==6.0.0" \
"numpy==1.17.3" \
"packaging==20.9" \
"palettable==3.3.0" \
"pandas==0.25.3" \
"pandocfilters==1.4.3" \
"parso==0.7.1" \
"patsy==0.5.1" \
"pexpect==4.8.0" \
"pickleshare==0.7.5" \
"plotnine==0.3.0" \
"prometheus-client==0.9.0" \
"prompt-toolkit==2.0.10" \
"psutil==5.8.0" \
"ptyprocess==0.7.0" \
"pyarrow==0.16.0" \
"pybedtools==0.8.1" \
"pyBigWig==0.3.17" \
"Pygments==2.8.1" \
"pyparsing==2.4.5" \
"pyreadr==0.2.1" \
"pyrsistent==0.17.3" \
"pysam==0.15.4" \
"python-dateutil==2.8.1" \
"pytz==2019.3" \
"PyYAML==5.3.1" \
"pyzmq==20.0.0" \
"ratelimiter==1.2.0.post0" \
"requests==2.25.1" \
"rpy2==2.9.3" \
"scikit-learn==0.19.1" \
"scipy==1.3.2" \
"seaborn==0.8.1" \
"Send2Trash==1.5.0" \
"six==1.14.0" \
"smmap==4.0.0" \
"snakemake==5.8.1" \
"statsmodels==0.10.2" \
"terminado==0.8.3" \
"testpath==0.4.4" \
"tornado==6.1" \
"traitlets==4.3.3" \
"tzlocal==2.0.0" \
"urllib3==1.26.4" \
"wcwidth==0.2.5" \
"webencodings==0.5.1" \
"widgetsnbextension==2.0.0" \
"wrapt==1.12.1" \
"zipp==1.2.0" \
&& rm -rf /root/.cache/pip/wheels
# MATLAB Compiler Runtime is required for GISTIC, MutSigCV
# Install steps are adapted from usuresearch/matlab-runtime
# https://hub.docker.com/r/usuresearch/matlab-runtime/dockerfile
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -q update && \
apt-get install -q -y --no-install-recommends \
xorg
# This is the version of MCR required to run the precompiled version of GISTIC
RUN mkdir /mcr-install-v83 && \
mkdir /opt/mcr && \
cd /mcr-install-v83 && \
wget https://www.mathworks.com/supportfiles/downloads/R2014a/deployment_files/R2014a/installers/glnxa64/MCR_R2014a_glnxa64_installer.zip && \
unzip -q MCR_R2014a_glnxa64_installer.zip && \
rm -f MCR_R2014a_glnxa64_installer.zip && \
./install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent && \
cd / && \
rm -rf mcr-install-v83
WORKDIR /home/rstudio/
# GISTIC installation
RUN mkdir -p gistic_install && \
cd gistic_install && \
wget -q ftp://ftp.broadinstitute.org/pub/GISTIC2.0/GISTIC_2_0_23.tar.gz && \
tar zxf GISTIC_2_0_23.tar.gz && \
rm -f GISTIC_2_0_23.tar.gz && \
rm -rf MCR_Installer && \
chown -R rstudio:rstudio /home/rstudio/gistic_install && \
chmod 755 /home/rstudio/gistic_install
WORKDIR /rocker-build/
# Install multipanelfigure, required for transcriptomic overview figure
# gplots for gistic comparison
RUN ./install_bioc.r \
multipanelfigure \
gplots
# Molecular subtyping MB
RUN R -e "remotes::install_github('d3b-center/medullo-classifier-package', ref = 'e3d12f64e2e4e00f5ea884f3353eb8c4b612abe8', dependencies = TRUE, upgrade = FALSE)" \
&& ./install_bioc.r MM2S
# More recent version of sva required for molecular subtyping MB
RUN R -e "remotes::install_github('jtleek/sva-devel@123be9b2b9fd7c7cd495fab7d7d901767964ce9e', dependencies = FALSE, upgrade = FALSE)"
# Packages required for de novo mutational signatures
RUN install2.r --error --deps TRUE \
lsa
# Package for kinase domain retention for fusions
RUN ./install_bioc.r \
EnsDb.Hsapiens.v86 \
ensembldb
RUN R -e "remotes::install_github('d3b-center/annoFuseData',ref = '321bc4f6db6e9a21358f0d09297142f6029ac7aa', dependencies = TRUE)"
RUN R -e "remotes::install_github('d3b-center/annoFuse',ref = '55b4b862429fe886790d087b2f1c654689c691c4', dependencies = TRUE)"
# Package for RNA-seq differential gene expression analysis
RUN ./install_bioc.r \
DESeq2
# Package for removing unwanted variation from RNA-Seq data
RUN ./install_bioc.r \
RUVSeq \
EDASeq \
edgeR \
uwot \
irlba
# Packages for RNA-seq expression boxplots (tumor-gtex-plots)
RUN ./install_bioc.r \
tidyr \
dplyr \
ggplot2
# Package for querying gene IDs and symbols
RUN ./install_bioc.r \
mygene
# Packages for focal-CN-file-prep module
RUN ./install_bioc.r \
GenomicRanges
RUN R -e 'BiocManager::install(c("AnnotationDbi", "org.Hs.eg.db"))'
# Even though apt-get section at top, add installation here to avoid re-RUN
# previous steps in docker build.
# There are other out-of-order cases.
# We can reorganize this Dockerfile when CI is available, so it is easier to
# test for reproducibility.
# Install json processor jq
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
jq
# Package for python pandas to read and write xlsx files
RUN pip3 install \
"openpyxl==2.6.4"
# Package for generating UUIDs
RUN ./install_bioc.r \
ids
WORKDIR /home/rstudio/
# AWS CLI installation
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
sudo ./aws/install && \
rm -rf aws*
# Install Desal latest release (v2.1.1)- converter for JSON, TOML, YAML, XML and CSV data formats
RUN sudo wget -qO /usr/local/bin/dasel "https://github.com/TomWright/dasel/releases/download/v2.1.1/dasel_linux_amd64" && \
sudo chmod a+x /usr/local/bin/dasel
WORKDIR /rocker-build/
# R package creating .xlsx
RUN ./install_bioc.r \
openxlsx
#### Please install your dependencies immediately above this comment.
#### Add a comment to indicate what analysis it is required for
WORKDIR /rocker-build/