forked from AlexsLemonade/OpenPBTA-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
295 lines (239 loc) · 9.77 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
FROM rocker/tidyverse:3.6.0
MAINTAINER [email protected]
WORKDIR /rocker-build/
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN apt-get install dialog apt-utils -y
# Required for installing mapview for interactive sample distribution plots
# libmagick++-dev is needed for coloblindr to install
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
libgdal-dev \
libudunits2-dev \
libmagick++-dev
# Required forinteractive sample distribution plots
# map view is needed to create HTML outputs of the interactive plots
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
--deps TRUE \
gdalUtils \
leafem \
lwgeom \
stars \
leafpop \
plainview \
sf \
mapview
# Installs packages needed for still treemap, interactive plots, and hex plots
# Rtsne and umap are required for dimension reduction analyses
# optparse is needed for passing arguments from the command line to R script
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
--deps TRUE \
R.utils \
treemap \
d3r \
hexbin \
VennDiagram \
Rtsne \
umap \
rprojroot \
optparse \
pheatmap \
RColorBrewer \
viridis \
data.table
# maftools for proof of concept in create-subset-files
RUN R -e "BiocManager::install(c('maftools'), update = FALSE)"
# This is needed for the CNV frequency and proportion aberration plots
RUN R -e "BiocManager::install(c('GenVisR'), update = FALSE)"
# These packages are for the genomic region analysis for snv-callers
RUN R -e "BiocManager::install(c('annotatr', 'TxDb.Hsapiens.UCSC.hg38.knownGene', 'org.Hs.eg.db'), update = FALSE)"
# Packages for expression normalization and batch correction
RUN R -e "BiocManager::install(c('preprocessCore', 'sva'), update = FALSE)"
## This is deprecated
# # These packages are for single-sample GSEA analysis
# RUN R -e "BiocManager::install(c('GSEABase', 'GSVA'), update = FALSE)"
# This is needed to create the interactive pie chart
RUN R -e "devtools::install_github('timelyportfolio/sunburstR', ref = 'd40d7ed71ee87ca4fbb9cb8b7cf1e198a23605a9', dependencies = TRUE)"
# This is needed to create the interactive treemap
RUN R -e "devtools::install_github('timelyportfolio/d3treeR', ref = '0eaba7f1c6438e977f8a5c082f1474408ac1fd80', dependencies = TRUE)"
# Need this package to make plots colorblind friendly
RUN R -e "devtools::install_github('clauswilke/colorblindr', ref = '1ac3d4d62dad047b68bb66c06cee927a4517d678', dependencies = TRUE)"
# Required for sex prediction from RNA-seq data
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
--deps TRUE \
glmnet \
glmnetUtils \
caret \
e1071
# Install java and rJava for some of the snv plotting comparison packages
RUN apt-get -y update && apt-get install -y \
default-jdk \
r-cran-rjava \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/
# Install for SNV comparison plots
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
--deps TRUE \
UpSetR
RUN R -e "devtools::install_github('const-ae/ggupset', ref = '7a33263cc5fafdd72a5bfcbebe5185fafe050c73', dependencies = TRUE)"
# GGally and its required packages
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
lattice \
rpart \
class \
MASS \
GGally \
Matrix
# Help display tables in R Notebooks
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
flextable
# 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
RUN tar -zxvf bedtools-2.28.0.tar.gz
RUN cd bedtools2 && \
make && \
mv bin/* /usr/local/bin
# Required for installing htslib
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
zlib1g \
libbz2-dev \
liblzma-dev
# 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
RUN tar -jxvf bedops_linux_x86_64-v2.4.37.tar.bz2
RUN cp bin/* /usr/local/bin
# HTSlib
RUN wget https://github.com/samtools/htslib/releases/download/1.9/htslib-1.9.tar.bz2
RUN tar -jxvf htslib-1.9.tar.bz2
RUN cd htslib-1.9 && \
./configure && \
make && \
make install
RUN mv bin/* /usr/local/bin
# bedr package
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
bedr
# Check to make sure the binaries are available by loading the bedr library
RUN Rscript -e "library(bedr)"
# Install for mutation signature analysis
RUN R -e "BiocManager::install(c('BSgenome.Hsapiens.UCSC.hg19', 'BSgenome.Hsapiens.UCSC.hg38'))"
# Also install for mutation signature analysis
# qdapRegex is for the fusion analysis
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
--deps TRUE \
deconstructSigs \
qdapRegex
# packages required for collapsing RNA-seq data by removing duplicated gene symbols
RUN R -e "install.packages('DT', dependencies = TRUE)"
RUN R -e "BiocManager::install(c('rtracklayer'), update = FALSE)"
# Needed to install TCGAbiolinks
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
--deps TRUE \
survival \
nlme \
cluster \
foreign \
nnet \
mgcv
# TCGAbiolinks for TMB compare analysis
RUN R -e "BiocManager::install(c('TCGAbiolinks'), update = FALSE)"
# Install python3 data science basics (pandas)
# using pip to get more current versions
RUN apt-get update -qq && apt-get -y --no-install-recommends install python3-pip python3-dev
RUN pip3 install "numpy==1.17.3" && \
pip3 install "six==1.13.0" "setuptools==41.6.0" && \
pip3 install "cycler==0.10.0" "kiwisolver==1.1.0" "pyparsing==2.4.5" "python-dateutil==2.8.1" "pytz==2019.3" && \
pip3 install "matplotlib==3.0.3" && \
pip3 install "scipy==1.3.2" && \
pip3 install "pandas==0.25.3" && \
pip3 install "snakemake==5.8.1"
# pip install for modules Ras, NF1, and TP53 Classifiers
RUN pip3 install "statsmodels==0.10.2" && \
pip3 install "plotnine==0.3.0" && \
pip3 install "scikit-learn==0.19.1" &&\
pip3 install "rpy2==2.9.3" && \
pip3 install "seaborn==0.8.1" && \
pip3 install "jupyter==1.0.0" && \
pip3 install "ipykernel==4.8.1" && \
pip3 install "widgetsnbextension==2.0.0" && \
pip3 install "tzlocal"
# Add curl
RUN apt-get update && apt-get install -y --no-install-recommends curl
# Need for survminer for doing survival analysis
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
--deps TRUE \
survival \
cmprsk \
survMisc \
survminer
# pyreadr for comparative-RNASeq-analysis
RUN pip3 install "pyreadr==0.2.1"
# ggfortify for plotting
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
--deps TRUE \
spatial \
ggfortify
# package required for immune deconvolution
RUN R -e "install.packages('remotes', dependencies = TRUE)"
RUN R -e "remotes::install_github('icbi-lab/immunedeconv', ref = '493bcaa9e1f73554ac2d25aff6e6a7925b0ea7a6', dependencies = TRUE)"
RUN R -e "install.packages('corrplot', dependencies = TRUE)"
# Install for mutation signature analysis
RUN R -e "BiocManager::install('ggbio')"
# CRAN package msigdbr needed for gene-set-enrichment-analysis
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
--deps TRUE \
msigdbr
# Bioconductor package GSVA needed for gene-set-enrichment-analysis
RUN R -e "BiocManager::install(c('GSVA'), update = FALSE)"
# remote package EXTEND needed for telomerase-activity-prediciton analysis
RUN R -e "devtools::install_github('NNoureen/EXTEND', ref = '467c2724e1324ef05ad9260c3079e5b0b0366420', dependencies = TRUE)"
# Required for installing pdftools, which is a dependency of gridGraphics
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
libpoppler-cpp-dev
# CRAN package gridGraphics needed for telomerase-activity-prediction
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
&& install2.r --error \
--deps TRUE \
gridGraphics
# 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))"
#### Please install your dependencies here
#### Add a comment to indicate what analysis it is required for
# 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
RUN mkdir /mcr-install && \
mkdir /opt/mcr && \
cd /mcr-install && \
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
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
RUN chown -R rstudio:rstudio /home/rstudio/gistic_install
RUN chmod 755 /home/rstudio/gistic_install
WORKDIR /rocker-build/