Skip to content

Commit d0b7f59

Browse files
author
Jan Winter
committed
update to V 1.40
1 parent f66800b commit d0b7f59

15 files changed

+414
-144
lines changed

docker/Dockerfile

+111-71
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM rocker/r-ver:3.3.2
1+
FROM rocker/r-ver:3.4.1
22

3-
MAINTAINER Oliver Pelz "o.pelz@dkfz.de"
3+
MAINTAINER Jan Winter "jan.winter@dkfz.de"
44

55
#### things we need for the crispranalyzer package
66
#### and for the crispr reannotator
@@ -23,22 +23,25 @@ RUN apt-get update && apt-get install -y \
2323
curl \
2424
libssl-dev \
2525
libtiff5-dev \
26-
htop
27-
28-
RUN apt-get update && apt-get install -y ghostscript
26+
htop \
27+
ghostscript \
28+
nginx \
29+
libtbb2
2930

3031
# again some more things we need to run the crispranalyzer package
3132
RUN apt-get update && apt-get -y --no-install-recommends \
3233
install texlive texlive-xetex
3334

3435
# install the shiny server debian package from r-studio
35-
COPY ./shiny-server-1.5.2.837-amd64.deb /tmp/ss.deb
36-
RUN gdebi -n /tmp/ss.deb && \
37-
rm -f /tmp/ss.deb
36+
RUN wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.3.838-amd64.deb -P /tmp/
37+
#COPY ./shiny-server-1.5.2.837-amd64.deb /tmp/ss.deb
38+
RUN gdebi -n /tmp/shiny-server-1.5.3.838-amd64.deb && \
39+
rm -f /tmp/shiny-server-1.5.3.838-amd64.deb
3840

3941
COPY ./shiny-server.sh /usr/bin/shiny-server.sh
4042
RUN chmod +x /usr/bin/shiny-server.sh
4143

44+
4245
# now to the R part...
4346

4447

@@ -63,16 +66,16 @@ RUN R -e 'source("http://bioconductor.org/biocLite.R");biocLite("DESeq2")'
6366
RUN R -e 'source("http://bioconductor.org/biocLite.R");biocLite("edgeR")'
6467
RUN R -e 'source("http://bioconductor.org/biocLite.R");biocLite("Gviz")'
6568
RUN R -e 'source("http://bioconductor.org/biocLite.R");biocLite("STRINGdb")'
66-
RUN R -e 'devtools::install_version("dplyr", version = "0.5.0", repos = "http://cloud.r-project.org/")'
69+
RUN R -e 'devtools::install_version("dplyr", version = "0.7.2", repos = "http://cloud.r-project.org/")'
6770
RUN R -e 'devtools::install_github("jyyu/ScreenBEAM", ref = "d6204b3")'
68-
RUN R -e 'devtools::install_version("readr", version = "1.0.0", repos = "http://cloud.r-project.org/")'
71+
RUN R -e 'devtools::install_version("readr", version = "1.1.1", repos = "http://cloud.r-project.org/")'
6972
RUN R -e 'devtools::install_version("shinydashboard", version = "0.5.3", repos = "http://cloud.r-project.org/")'
7073
RUN R -e 'devtools::install_version("jsonlite", version = "1.1", repos = "http://cloud.r-project.org/")'
7174
RUN R -e 'devtools::install_version("shinyBS", version = "0.61", repos = "http://cloud.r-project.org/")'
72-
#RUN R -e 'devtools::install_version("highcharter", version = "0.5.0", repos = "http://cloud.r-project.org/")'
73-
RUN R -e 'devtools::install_github("jbkunst/highcharter", ref = "cc5f1e0157c50fc67233bc1bad6c3ad906d418c8")'
75+
RUN R -e 'devtools::install_version("highcharter", version = "0.5.0", repos = "http://cloud.r-project.org/")'
76+
#RUN R -e 'devtools::install_github("jbkunst/highcharter", ref = "cc5f1e0157c50fc67233bc1bad6c3ad906d418c8")'
7477
RUN R -e 'devtools::install_version("seqinr", version = "3.3-6", repos = "http://cloud.r-project.org/")'
75-
RUN R -e 'devtools::install_version("openxlsx", version = "4.0.0", repos = "http://cloud.r-project.org/")'
78+
RUN R -e 'devtools::install_version("openxlsx", version = "4.0.17", repos = "http://cloud.r-project.org/")'
7679
#RUN R -e 'devtools::install_github("awalker89/openxlsx", ref = "6d0fed9")'
7780
RUN R -e 'devtools::install_version("caTools", version = "1.17.1", repos = "http://cloud.r-project.org/")'
7881
RUN R -e 'devtools::install_version("reshape2", version = "1.4.2", repos = "http://cloud.r-project.org/")'
@@ -86,19 +89,19 @@ RUN R -e 'devtools::install_version("httr", version = "1.2.1", repos = "http://c
8689
RUN R -e 'devtools::install_version("sgRSEA", version = "0.1", repos = "http://cloud.r-project.org/")'
8790
RUN R -e 'devtools::install_version("plyr", version = "1.8.4", repos = "http://cloud.r-project.org/")'
8891
RUN R -e 'devtools::install_version("VennDiagram", version = "1.6.17", repos = "http://cloud.r-project.org/")'
89-
RUN R -e 'devtools::install_version("tidyverse", version = "1.0.0", repos = "http://cloud.r-project.org/")'
90-
RUN R -e 'devtools::install_version("htmltools", version = "0.3.5", repos = "http://cloud.r-project.org/")'
92+
RUN R -e 'devtools::install_version("tidyverse", version = "1.1.1", repos = "http://cloud.r-project.org/")'
93+
RUN R -e 'devtools::install_version("htmltools", version = "0.3.6", repos = "http://cloud.r-project.org/")'
9194
RUN R -e 'devtools::install_version("DT", version = "0.2", repos = "http://cloud.r-project.org/")'
92-
RUN R -e 'devtools::install_version("tidyr", version = "0.6.1", repos = "http://cloud.r-project.org/")'
95+
RUN R -e 'devtools::install_version("tidyr", version = "0.6.3", repos = "http://cloud.r-project.org/")'
9396
RUN R -e 'devtools::install_version("sm", version = "2.2-5.4", repos = "http://cloud.r-project.org/")'
94-
RUN R -e 'devtools::install_version("shinyjs", version = "0.9", repos = "http://cloud.r-project.org/")'
95-
RUN R -e 'devtools::install_version("ggplot2", version = "2.2.0", repos = "http://cloud.r-project.org/")'
97+
RUN R -e 'devtools::install_version("shinyjs", version = "0.9.1", repos = "http://cloud.r-project.org/")'
98+
RUN R -e 'devtools::install_version("ggplot2", version = "2.2.1", repos = "http://cloud.r-project.org/")'
9699
RUN R -e 'devtools::install_version("markdown", repos = "http://cloud.r-project.org/")'
97-
RUN R -e 'devtools::install_version("knitr", version = "1.15.1", repos = "http://cloud.r-project.org/")'
98-
RUN R -e 'devtools::install_version("shiny", version = "1.0.2", repos = "http://cloud.r-project.org/")'
99-
RUN R -e 'devtools::install_version("bookdown", version = "0.3", repos = "http://cloud.r-project.org/")'
100+
RUN R -e 'devtools::install_version("knitr", version = "1.16", repos = "http://cloud.r-project.org/")'
101+
RUN R -e 'devtools::install_version("shiny", version = "1.0.4", repos = "http://cloud.r-project.org/")'
102+
RUN R -e 'devtools::install_version("bookdown", version = "0.4", repos = "http://cloud.r-project.org/")'
100103
RUN R -e 'devtools::install_version("R.utils", version = "2.5.0", repos = "http://cloud.r-project.org/")'
101-
RUN R -e 'devtools::install_version("htmltools", version = "0.3.5", repos = "http://cloud.r-project.org/")'
104+
RUN R -e 'devtools::install_version("shinyWidgets", repos = "http://cloud.r-project.org/")'
102105

103106

104107

@@ -107,8 +110,10 @@ RUN apt-get -qq clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
107110

108111
# now install the reannotate-crispr PERL package
109112
# for CPAN to auto say yes to every question
113+
110114
ENV PERL_MM_USE_DEFAULT=1
111115
RUN perl -MCPAN -e 'CPAN::Shell->install("Bundle::CPAN")'
116+
112117
# now install all the modules we need for crispr reannotator
113118
RUN perl -MCPAN -e 'CPAN::Shell->install("Bio::DB::Fasta")'
114119
RUN perl -MCPAN -e 'CPAN::Shell->install("Bio::SeqIO")'
@@ -128,7 +133,7 @@ RUN perl -MCPAN -e 'CPAN::Shell->install("File::Grep")'
128133
RUN perl -MCPAN -e 'CPAN::Shell->install("Text::Wrap")'
129134
RUN perl -MCPAN -e 'CPAN::Shell->install("Unix::Processors")'
130135
RUN git clone https://github.com/boutroslab/Supplemental-Material.git /tmp/Supplemental-Material
131-
RUN cp -r /tmp/Supplemental-Material/crispr-reannotation /opt/
136+
RUN cp -r /tmp/Supplemental-Material/Rauscher\&Heigwer_2016/crispr-reannotation /opt/
132137
RUN chmod +x /opt/crispr-reannotation/reannotate_crispr.pl
133138
env PATH /opt/crispr-reannotation:$PATH
134139
RUN rm -rf /tmp/Supplemental-Material
@@ -138,98 +143,133 @@ RUN cd /opt/crispr-reannotation/depends/Set-IntervalTree-0.10-OD; perl Makefile.
138143
# Install Python NumPy and SciPy required for BAGEL
139144
RUN apt-get update && apt-get install -y python-numpy python-scipy python-sympy
140145

141-
# install software package bowtie 2 which has a difficult license and therefore cannot be packaged or shipped in a docker image
146+
## Install Software packages and download them
147+
148+
# install software package bowtie2 which has a difficult license and therefore cannot be packaged or shipped in a docker image
142149
# TODO: check if this can be used in open source packages at all
143-
COPY ./bowtie2-2.2.9-linux-x86_64.zip /tmp/
150+
RUN wget http://www.dkfz.de/signaling/crispranalyzer/bowtie2-2.2.9-linux-x86_64.zip -P /tmp/
151+
#COPY ./bowtie2-2.3.2-linux-x86_64.zip /tmp/
144152
RUN unzip /tmp/bowtie2-2.2.9-linux-x86_64.zip -d /opt
145-
#ENV PATH /opt/bowtie2-2.2.9:$PATH
153+
ENV PATH=/opt/bowtie2-2.2.9:$PATH
146154
RUN echo 'export PATH=/opt/bowtie2-2.2.9/:$PATH' >> /etc/profile
147155

148156
# install bowtie
149-
COPY ./bowtie-1.2-linux-legacy-x86_64.zip /tmp/
150-
RUN unzip /tmp/bowtie-1.2-linux-legacy-x86_64.zip -d /opt
151-
RUN echo 'export PATH=/opt/bowtie-1.2-legacy/:$PATH' >> /etc/profile
157+
RUN wget http://www.dkfz.de/signaling/crispranalyzer/bowtie-1.2.1.1-linux-x86_64.zip -P /tmp/
158+
#COPY ./bowtie-1.2-linux-legacy-x86_64.zip /tmp/
159+
RUN unzip /tmp/bowtie-1.2.1.1-linux-x86_64.zip -d /opt
160+
ENV PATH=/opt/bowtie-1.2.1.1/:$PATH
161+
RUN echo 'export PATH=/opt/bowtie-1.2.1.1/:$PATH' >> /etc/profile
152162

153163

154164
# install MAGeCK from Sourceforge
155-
COPY ./mageck-0.5.5.tar.gz /tmp/
165+
RUN wget http://www.dkfz.de/signaling/crispranalyzer/mageck-0.5.5.tar.gz -P /tmp/
166+
#COPY ./mageck-0.5.5.tar.gz /tmp/
156167
RUN cd /tmp/; tar xvf ./mageck-0.5.5.tar.gz; cd /tmp/mageck-0.5.5; python setup.py install
157168
RUN rm -rf /tmp/mageck-0.5.5 /tmp/mageck-0.5.5.tar.gz
158169

159-
# Cloning CRISPRAnalyzeR
160-
RUN git clone [email protected]:boutroslab/CRISPRAnalyzeR.git /tmp/
161-
162-
# Copy to the shiny-server
163-
COPY /tmp/CRISPRAnalyzeR-master/source/ /srv/shiny-server/CRISPRAnalyzeR
164-
165-
# we will run crispranalyzer as user
166-
RUN chown -R shiny:shiny /srv/shiny-server/CRISPRAnalyzeR
167-
168-
169-
170-
# add R profile options
171-
172-
RUN echo 'setwd("/srv/shiny-server/CRISPRAnalyzeR")' >> /usr/local/lib/R/etc/Rprofile.site
173-
RUN echo 'options(download.file.method = "libcurl")' >> /usr/local/lib/R/etc/Rprofile.site
174-
175170

176-
# BEGIN RUST CODE
177-
# install RUST compiler with mapper and extractor components
171+
# INSTALL RUST-based FASTQ-Extraction and SAM-Extraction
172+
# install RUST compiler
178173
RUN \
179174
curl https://sh.rustup.rs > /tmp/sh.rustup.rs && \
180-
chmod +x /tmp/sh.rustup.rs && \
181-
/tmp/sh.rustup.rs -y && \
182-
rm /tmp/sh.rustup.rs
183-
175+
chmod +x /tmp/sh.rustup.rs && \
176+
/tmp/sh.rustup.rs -y && \
177+
rm /tmp/sh.rustup.rs
178+
184179
ENV PATH=/root/.cargo/bin:$PATH
185-
180+
186181
# compile CRISPRAnalyzer mapper and extractor
187182
RUN \
188-
git clone https://github.com/OliPelz/fastq_extractor_proof_of_principle.git \
189-
/tmp/crispranalyzer-rust-tools
183+
git clone https://github.com/OliPelz/fastq_extractor_proof_of_principle.git \
184+
/tmp/crispranalyzer-rust-tools
190185
# target dir for compiled executables
191186
RUN \
192-
mkdir -p /opt/crispranalyzer-tools
193-
187+
mkdir -p /opt/crispranalyzer-tools
188+
194189
# source cargo env file so we can use it
195190
RUN \
196-
cd /tmp/crispranalyzer-rust-tools/extractor_in_RUST/fastq_parser && \
197-
cargo build --release && \
198-
cp ./target/release/fastq_parser /opt/crispranalyzer-tools/ && \
199-
chmod +x /opt/crispranalyzer-tools/fastq_parser
200-
191+
cd /tmp/crispranalyzer-rust-tools/extractor_in_RUST/fastq_parser && \
192+
cargo build --release && \
193+
cp ./target/release/fastq_parser /opt/crispranalyzer-tools/ && \
194+
chmod +x /opt/crispranalyzer-tools/fastq_parser
195+
201196
RUN \
202-
cd /tmp/crispranalyzer-rust-tools/sam_mapper_in_RUST/sam_mapper/ && \
203-
cargo build --release && \
204-
cp ./target/release/sam_mapper /opt/crispranalyzer-tools/ && \
205-
chmod +x /opt/crispranalyzer-tools/sam_mapper
206-
197+
cd /tmp/crispranalyzer-rust-tools/sam_mapper_in_RUST/sam_mapper/ && \
198+
cargo build --release && \
199+
cp ./target/release/sam_mapper /opt/crispranalyzer-tools/ && \
200+
chmod +x /opt/crispranalyzer-tools/sam_mapper
207201

208-
ENV PATH=/opt/crispranalyzer-tools:$PATH
202+
ENV PATH=/opt/crispranalyzer-tools:$PATH
209203
RUN echo 'export PATH=/opt/crispranalyzer-tools/:$PATH' >> /etc/profile
210204

211205
##### end of RUST CODE
212206

207+
## Now we add CRISPRAnalyzeR code directly from Github Repository
208+
ARG CACHEBUST=1
209+
# We use CACHEBUST=1 arg to FORCE docker to start from here without caching
210+
# This can be achieved by a build argument as described here : https://github.com/moby/moby/issues/1996#issuecomment-185872769
211+
# docker build --rm --label crispranalyzer --build-arg CACHEBUST=$(date +%s) -t boutroslab/crispranalyzer:latest
212+
213+
# install CRISPRAnalyzeR
214+
RUN mkdir /srv/shiny-server/CRISPRAnalyzeR
215+
RUN git clone https://github.com/boutroslab/CRISPRAnalyzeR.git /tmp/CRISPRAnalyzeR
216+
RUN cp -r /tmp/CRISPRAnalyzeR/source/* /srv/shiny-server/CRISPRAnalyzeR/
217+
218+
# Generate Directories
219+
RUN mkdir /srv/shiny-server/CRISPRAnalyzeR2 \
220+
/srv/shiny-server/CRISPRAnalyzeR3 \
221+
/srv/shiny-server/CRISPRAnalyzeR4 \
222+
/srv/shiny-server/CRISPRAnalyzeR5
223+
224+
RUN cp -r /srv/shiny-server/CRISPRAnalyzeR/multiuser/* /srv/shiny-server/CRISPRAnalyzeR2 && \
225+
cp -r /srv/shiny-server/CRISPRAnalyzeR/multiuser/* /srv/shiny-server/CRISPRAnalyzeR3 && \
226+
cp -r /srv/shiny-server/CRISPRAnalyzeR/multiuser/* /srv/shiny-server/CRISPRAnalyzeR4 && \
227+
cp -r /srv/shiny-server/CRISPRAnalyzeR/multiuser/* /srv/shiny-server/CRISPRAnalyzeR5
228+
229+
# take CSS and web files
230+
RUN cp -r /srv/shiny-server/CRISPRAnalyzeR/www /srv/shiny-server/CRISPRAnalyzeR2 && \
231+
cp -r /srv/shiny-server/CRISPRAnalyzeR/www /srv/shiny-server/CRISPRAnalyzeR3 && \
232+
cp -r /srv/shiny-server/CRISPRAnalyzeR/www /srv/shiny-server/CRISPRAnalyzeR4 && \
233+
cp -r /srv/shiny-server/CRISPRAnalyzeR/www /srv/shiny-server/CRISPRAnalyzeR5
234+
235+
# we will run crispranalyzer as user shiny, so not as root!
236+
RUN chown -R shiny:shiny /srv/shiny-server/CRISPRAnalyzeR
237+
RUN chown -R shiny:shiny /srv/shiny-server/CRISPRAnalyzeR/userdata
213238

214239

240+
# add R profile options
241+
RUN echo 'setwd("/srv/shiny-server/CRISPRAnalyzeR")' >> /usr/local/lib/R/etc/Rprofile.site
242+
RUN echo 'options(download.file.method = "libcurl")' >> /usr/local/lib/R/etc/Rprofile.site
243+
215244

245+
# NGINX (copy the config)
246+
COPY nginx.conf /etc/nginx/nginx.conf
247+
248+
# shiny-server.conf
249+
# shiny-server.conf will be automatically created with default values, which is totally fine
250+
251+
# Copy docker entrypoint and shiny-server.sh, in which is stated how we start shiny and nginx
252+
# Moreover we copy the index.html to do a forward of the base directory to ./CRISPRAnalyzeR/, from which NGINX will do the rest
216253
COPY docker-entrypoint.sh /
217254
COPY index.html /srv/shiny-server
218255
RUN chmod +x /docker-entrypoint.sh
219256
RUN chmod +x /srv/shiny-server/index.html
220257

221-
EXPOSE 3838
258+
EXPOSE 8000
222259

223260
# Add ENV for KiteMatic
261+
# this ENV vars are required to be able to change these settings using Kitematic
262+
224263
ENV websockets_behind_proxy=FALSE
225-
ENV verbose_logfiles=TRUE
264+
ENV verbose_logfiles=FALSE
226265
ENV COSMIC_database="CosmicMutantExport.tsv"
227-
ENV EnrichR_URL="http://amp.pharm.mssm.edu/Enrichr/
266+
ENV EnrichR_URL="http://amp.pharm.mssm.edu/Enrichr/"
228267
ENV EnrichR=TRUE
229268
ENV bowtie_threads=2
230269
ENV proxy_url=
231270
ENV proxy_port=
232271
ENV max_upload=4096
272+
ENV downloadlogs=TRUE
233273

234274
ENTRYPOINT ["/docker-entrypoint.sh"]
235275
# finally run

docker/docker-entrypoint.sh

+13-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ CRISPR_CFG=/srv/shiny-server/CRISPRAnalyzeR/config.r
77
# subs definition go here
88

99
# usage: key_value_to_cfg key value
10-
# ie: file_env 'car_proxy_url' 'www-int2.dkfz-heidelberg.de'
11-
# (will write the key/value pair car_proxy_url www-int2.dkfz-heidelberg.de
1210
# to the crispranalyzer config file
1311
# example: key_value_to_cfg "car.proxy" "'value'" "/srv/shiny-server/CRISPRAnalyzeR/config.r"
1412
key_value_to_cfg() {
@@ -74,5 +72,18 @@ if [ "$1" = 'crispranalyzer' ]; then
7472
echo "[CUSTOM] setting PROXY PORT"
7573
key_value_to_cfg "car.proxy.port" "$proxy_port" "$CRISPR_CFG"
7674
fi
75+
if [ "$downloadlogs" ]; then
76+
echo "[CUSTOM] setting Logs"
77+
key_value_to_cfg "downloadlogs" "$downloadlogs" "$CRISPR_CFG"
78+
fi
79+
# Copy config.r to all copies
80+
cp /srv/shiny-server/CRISPRAnalyzeR/config.r /srv/shiny-server/CRISPRAnalyzeR2/config.r
81+
cp /srv/shiny-server/CRISPRAnalyzeR/config.r /srv/shiny-server/CRISPRAnalyzeR3/config.r
82+
cp /srv/shiny-server/CRISPRAnalyzeR/config.r /srv/shiny-server/CRISPRAnalyzeR4/config.r
83+
cp /srv/shiny-server/CRISPRAnalyzeR/config.r /srv/shiny-server/CRISPRAnalyzeR5/config.r
84+
85+
echo "Starting Shiny-Server"
86+
echo "As a default, please navigate to http://localhost:8000/CRISPRAnalyzeR/ to access CRISPRAnalyzeR"
7787
exec /usr/bin/shiny-server.sh
88+
echo "Shiny-Server started"
7889
fi

docker/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<meta http-equiv="refresh" content="0; url=./CRISPRAnalyzeR" />
1+
<meta http-equiv="refresh" content="0; url=./CRISPRAnalyzeR/" />

0 commit comments

Comments
 (0)