-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan Winter
committed
Nov 2, 2017
1 parent
f66800b
commit d0b7f59
Showing
15 changed files
with
414 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM rocker/r-ver:3.3.2 | ||
FROM rocker/r-ver:3.4.1 | ||
|
||
MAINTAINER Oliver Pelz "o.pelz@dkfz.de" | ||
MAINTAINER Jan Winter "jan.winter@dkfz.de" | ||
|
||
#### things we need for the crispranalyzer package | ||
#### and for the crispr reannotator | ||
|
@@ -23,22 +23,25 @@ RUN apt-get update && apt-get install -y \ | |
curl \ | ||
libssl-dev \ | ||
libtiff5-dev \ | ||
htop | ||
|
||
RUN apt-get update && apt-get install -y ghostscript | ||
htop \ | ||
ghostscript \ | ||
nginx \ | ||
libtbb2 | ||
|
||
# again some more things we need to run the crispranalyzer package | ||
RUN apt-get update && apt-get -y --no-install-recommends \ | ||
install texlive texlive-xetex | ||
|
||
# install the shiny server debian package from r-studio | ||
COPY ./shiny-server-1.5.2.837-amd64.deb /tmp/ss.deb | ||
RUN gdebi -n /tmp/ss.deb && \ | ||
rm -f /tmp/ss.deb | ||
RUN wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.3.838-amd64.deb -P /tmp/ | ||
#COPY ./shiny-server-1.5.2.837-amd64.deb /tmp/ss.deb | ||
RUN gdebi -n /tmp/shiny-server-1.5.3.838-amd64.deb && \ | ||
rm -f /tmp/shiny-server-1.5.3.838-amd64.deb | ||
|
||
COPY ./shiny-server.sh /usr/bin/shiny-server.sh | ||
RUN chmod +x /usr/bin/shiny-server.sh | ||
|
||
|
||
# now to the R part... | ||
|
||
|
||
|
@@ -63,16 +66,16 @@ RUN R -e 'source("http://bioconductor.org/biocLite.R");biocLite("DESeq2")' | |
RUN R -e 'source("http://bioconductor.org/biocLite.R");biocLite("edgeR")' | ||
RUN R -e 'source("http://bioconductor.org/biocLite.R");biocLite("Gviz")' | ||
RUN R -e 'source("http://bioconductor.org/biocLite.R");biocLite("STRINGdb")' | ||
RUN R -e 'devtools::install_version("dplyr", version = "0.5.0", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("dplyr", version = "0.7.2", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_github("jyyu/ScreenBEAM", ref = "d6204b3")' | ||
RUN R -e 'devtools::install_version("readr", version = "1.0.0", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("readr", version = "1.1.1", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("shinydashboard", version = "0.5.3", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("jsonlite", version = "1.1", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("shinyBS", version = "0.61", repos = "http://cloud.r-project.org/")' | ||
#RUN R -e 'devtools::install_version("highcharter", version = "0.5.0", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_github("jbkunst/highcharter", ref = "cc5f1e0157c50fc67233bc1bad6c3ad906d418c8")' | ||
RUN R -e 'devtools::install_version("highcharter", version = "0.5.0", repos = "http://cloud.r-project.org/")' | ||
#RUN R -e 'devtools::install_github("jbkunst/highcharter", ref = "cc5f1e0157c50fc67233bc1bad6c3ad906d418c8")' | ||
RUN R -e 'devtools::install_version("seqinr", version = "3.3-6", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("openxlsx", version = "4.0.0", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("openxlsx", version = "4.0.17", repos = "http://cloud.r-project.org/")' | ||
#RUN R -e 'devtools::install_github("awalker89/openxlsx", ref = "6d0fed9")' | ||
RUN R -e 'devtools::install_version("caTools", version = "1.17.1", repos = "http://cloud.r-project.org/")' | ||
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 | |
RUN R -e 'devtools::install_version("sgRSEA", version = "0.1", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("plyr", version = "1.8.4", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("VennDiagram", version = "1.6.17", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("tidyverse", version = "1.0.0", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("htmltools", version = "0.3.5", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("tidyverse", version = "1.1.1", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("htmltools", version = "0.3.6", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("DT", version = "0.2", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("tidyr", version = "0.6.1", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("tidyr", version = "0.6.3", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("sm", version = "2.2-5.4", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("shinyjs", version = "0.9", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("ggplot2", version = "2.2.0", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("shinyjs", version = "0.9.1", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("ggplot2", version = "2.2.1", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("markdown", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("knitr", version = "1.15.1", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("shiny", version = "1.0.2", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("bookdown", version = "0.3", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("knitr", version = "1.16", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("shiny", version = "1.0.4", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("bookdown", version = "0.4", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("R.utils", version = "2.5.0", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("htmltools", version = "0.3.5", repos = "http://cloud.r-project.org/")' | ||
RUN R -e 'devtools::install_version("shinyWidgets", repos = "http://cloud.r-project.org/")' | ||
|
||
|
||
|
||
|
@@ -107,8 +110,10 @@ RUN apt-get -qq clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
|
||
# now install the reannotate-crispr PERL package | ||
# for CPAN to auto say yes to every question | ||
|
||
ENV PERL_MM_USE_DEFAULT=1 | ||
RUN perl -MCPAN -e 'CPAN::Shell->install("Bundle::CPAN")' | ||
|
||
# now install all the modules we need for crispr reannotator | ||
RUN perl -MCPAN -e 'CPAN::Shell->install("Bio::DB::Fasta")' | ||
RUN perl -MCPAN -e 'CPAN::Shell->install("Bio::SeqIO")' | ||
|
@@ -128,7 +133,7 @@ RUN perl -MCPAN -e 'CPAN::Shell->install("File::Grep")' | |
RUN perl -MCPAN -e 'CPAN::Shell->install("Text::Wrap")' | ||
RUN perl -MCPAN -e 'CPAN::Shell->install("Unix::Processors")' | ||
RUN git clone https://github.com/boutroslab/Supplemental-Material.git /tmp/Supplemental-Material | ||
RUN cp -r /tmp/Supplemental-Material/crispr-reannotation /opt/ | ||
RUN cp -r /tmp/Supplemental-Material/Rauscher\&Heigwer_2016/crispr-reannotation /opt/ | ||
RUN chmod +x /opt/crispr-reannotation/reannotate_crispr.pl | ||
env PATH /opt/crispr-reannotation:$PATH | ||
RUN rm -rf /tmp/Supplemental-Material | ||
|
@@ -138,98 +143,133 @@ RUN cd /opt/crispr-reannotation/depends/Set-IntervalTree-0.10-OD; perl Makefile. | |
# Install Python NumPy and SciPy required for BAGEL | ||
RUN apt-get update && apt-get install -y python-numpy python-scipy python-sympy | ||
|
||
# install software package bowtie 2 which has a difficult license and therefore cannot be packaged or shipped in a docker image | ||
## Install Software packages and download them | ||
|
||
# install software package bowtie2 which has a difficult license and therefore cannot be packaged or shipped in a docker image | ||
# TODO: check if this can be used in open source packages at all | ||
COPY ./bowtie2-2.2.9-linux-x86_64.zip /tmp/ | ||
RUN wget http://www.dkfz.de/signaling/crispranalyzer/bowtie2-2.2.9-linux-x86_64.zip -P /tmp/ | ||
#COPY ./bowtie2-2.3.2-linux-x86_64.zip /tmp/ | ||
RUN unzip /tmp/bowtie2-2.2.9-linux-x86_64.zip -d /opt | ||
#ENV PATH /opt/bowtie2-2.2.9:$PATH | ||
ENV PATH=/opt/bowtie2-2.2.9:$PATH | ||
RUN echo 'export PATH=/opt/bowtie2-2.2.9/:$PATH' >> /etc/profile | ||
|
||
# install bowtie | ||
COPY ./bowtie-1.2-linux-legacy-x86_64.zip /tmp/ | ||
RUN unzip /tmp/bowtie-1.2-linux-legacy-x86_64.zip -d /opt | ||
RUN echo 'export PATH=/opt/bowtie-1.2-legacy/:$PATH' >> /etc/profile | ||
RUN wget http://www.dkfz.de/signaling/crispranalyzer/bowtie-1.2.1.1-linux-x86_64.zip -P /tmp/ | ||
#COPY ./bowtie-1.2-linux-legacy-x86_64.zip /tmp/ | ||
RUN unzip /tmp/bowtie-1.2.1.1-linux-x86_64.zip -d /opt | ||
ENV PATH=/opt/bowtie-1.2.1.1/:$PATH | ||
RUN echo 'export PATH=/opt/bowtie-1.2.1.1/:$PATH' >> /etc/profile | ||
|
||
|
||
# install MAGeCK from Sourceforge | ||
COPY ./mageck-0.5.5.tar.gz /tmp/ | ||
RUN wget http://www.dkfz.de/signaling/crispranalyzer/mageck-0.5.5.tar.gz -P /tmp/ | ||
#COPY ./mageck-0.5.5.tar.gz /tmp/ | ||
RUN cd /tmp/; tar xvf ./mageck-0.5.5.tar.gz; cd /tmp/mageck-0.5.5; python setup.py install | ||
RUN rm -rf /tmp/mageck-0.5.5 /tmp/mageck-0.5.5.tar.gz | ||
|
||
# Cloning CRISPRAnalyzeR | ||
RUN git clone [email protected]:boutroslab/CRISPRAnalyzeR.git /tmp/ | ||
|
||
# Copy to the shiny-server | ||
COPY /tmp/CRISPRAnalyzeR-master/source/ /srv/shiny-server/CRISPRAnalyzeR | ||
|
||
# we will run crispranalyzer as user | ||
RUN chown -R shiny:shiny /srv/shiny-server/CRISPRAnalyzeR | ||
|
||
|
||
|
||
# add R profile options | ||
|
||
RUN echo 'setwd("/srv/shiny-server/CRISPRAnalyzeR")' >> /usr/local/lib/R/etc/Rprofile.site | ||
RUN echo 'options(download.file.method = "libcurl")' >> /usr/local/lib/R/etc/Rprofile.site | ||
|
||
|
||
# BEGIN RUST CODE | ||
# install RUST compiler with mapper and extractor components | ||
# INSTALL RUST-based FASTQ-Extraction and SAM-Extraction | ||
# install RUST compiler | ||
RUN \ | ||
curl https://sh.rustup.rs > /tmp/sh.rustup.rs && \ | ||
chmod +x /tmp/sh.rustup.rs && \ | ||
/tmp/sh.rustup.rs -y && \ | ||
rm /tmp/sh.rustup.rs | ||
|
||
chmod +x /tmp/sh.rustup.rs && \ | ||
/tmp/sh.rustup.rs -y && \ | ||
rm /tmp/sh.rustup.rs | ||
ENV PATH=/root/.cargo/bin:$PATH | ||
|
||
# compile CRISPRAnalyzer mapper and extractor | ||
RUN \ | ||
git clone https://github.com/OliPelz/fastq_extractor_proof_of_principle.git \ | ||
/tmp/crispranalyzer-rust-tools | ||
git clone https://github.com/OliPelz/fastq_extractor_proof_of_principle.git \ | ||
/tmp/crispranalyzer-rust-tools | ||
# target dir for compiled executables | ||
RUN \ | ||
mkdir -p /opt/crispranalyzer-tools | ||
|
||
mkdir -p /opt/crispranalyzer-tools | ||
# source cargo env file so we can use it | ||
RUN \ | ||
cd /tmp/crispranalyzer-rust-tools/extractor_in_RUST/fastq_parser && \ | ||
cargo build --release && \ | ||
cp ./target/release/fastq_parser /opt/crispranalyzer-tools/ && \ | ||
chmod +x /opt/crispranalyzer-tools/fastq_parser | ||
|
||
cd /tmp/crispranalyzer-rust-tools/extractor_in_RUST/fastq_parser && \ | ||
cargo build --release && \ | ||
cp ./target/release/fastq_parser /opt/crispranalyzer-tools/ && \ | ||
chmod +x /opt/crispranalyzer-tools/fastq_parser | ||
RUN \ | ||
cd /tmp/crispranalyzer-rust-tools/sam_mapper_in_RUST/sam_mapper/ && \ | ||
cargo build --release && \ | ||
cp ./target/release/sam_mapper /opt/crispranalyzer-tools/ && \ | ||
chmod +x /opt/crispranalyzer-tools/sam_mapper | ||
|
||
cd /tmp/crispranalyzer-rust-tools/sam_mapper_in_RUST/sam_mapper/ && \ | ||
cargo build --release && \ | ||
cp ./target/release/sam_mapper /opt/crispranalyzer-tools/ && \ | ||
chmod +x /opt/crispranalyzer-tools/sam_mapper | ||
|
||
ENV PATH=/opt/crispranalyzer-tools:$PATH | ||
ENV PATH=/opt/crispranalyzer-tools:$PATH | ||
RUN echo 'export PATH=/opt/crispranalyzer-tools/:$PATH' >> /etc/profile | ||
|
||
##### end of RUST CODE | ||
|
||
## Now we add CRISPRAnalyzeR code directly from Github Repository | ||
ARG CACHEBUST=1 | ||
# We use CACHEBUST=1 arg to FORCE docker to start from here without caching | ||
# This can be achieved by a build argument as described here : https://github.com/moby/moby/issues/1996#issuecomment-185872769 | ||
# docker build --rm --label crispranalyzer --build-arg CACHEBUST=$(date +%s) -t boutroslab/crispranalyzer:latest | ||
|
||
# install CRISPRAnalyzeR | ||
RUN mkdir /srv/shiny-server/CRISPRAnalyzeR | ||
RUN git clone https://github.com/boutroslab/CRISPRAnalyzeR.git /tmp/CRISPRAnalyzeR | ||
RUN cp -r /tmp/CRISPRAnalyzeR/source/* /srv/shiny-server/CRISPRAnalyzeR/ | ||
|
||
# Generate Directories | ||
RUN mkdir /srv/shiny-server/CRISPRAnalyzeR2 \ | ||
/srv/shiny-server/CRISPRAnalyzeR3 \ | ||
/srv/shiny-server/CRISPRAnalyzeR4 \ | ||
/srv/shiny-server/CRISPRAnalyzeR5 | ||
|
||
RUN cp -r /srv/shiny-server/CRISPRAnalyzeR/multiuser/* /srv/shiny-server/CRISPRAnalyzeR2 && \ | ||
cp -r /srv/shiny-server/CRISPRAnalyzeR/multiuser/* /srv/shiny-server/CRISPRAnalyzeR3 && \ | ||
cp -r /srv/shiny-server/CRISPRAnalyzeR/multiuser/* /srv/shiny-server/CRISPRAnalyzeR4 && \ | ||
cp -r /srv/shiny-server/CRISPRAnalyzeR/multiuser/* /srv/shiny-server/CRISPRAnalyzeR5 | ||
|
||
# take CSS and web files | ||
RUN cp -r /srv/shiny-server/CRISPRAnalyzeR/www /srv/shiny-server/CRISPRAnalyzeR2 && \ | ||
cp -r /srv/shiny-server/CRISPRAnalyzeR/www /srv/shiny-server/CRISPRAnalyzeR3 && \ | ||
cp -r /srv/shiny-server/CRISPRAnalyzeR/www /srv/shiny-server/CRISPRAnalyzeR4 && \ | ||
cp -r /srv/shiny-server/CRISPRAnalyzeR/www /srv/shiny-server/CRISPRAnalyzeR5 | ||
|
||
# we will run crispranalyzer as user shiny, so not as root! | ||
RUN chown -R shiny:shiny /srv/shiny-server/CRISPRAnalyzeR | ||
RUN chown -R shiny:shiny /srv/shiny-server/CRISPRAnalyzeR/userdata | ||
|
||
|
||
# add R profile options | ||
RUN echo 'setwd("/srv/shiny-server/CRISPRAnalyzeR")' >> /usr/local/lib/R/etc/Rprofile.site | ||
RUN echo 'options(download.file.method = "libcurl")' >> /usr/local/lib/R/etc/Rprofile.site | ||
|
||
|
||
# NGINX (copy the config) | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
# shiny-server.conf | ||
# shiny-server.conf will be automatically created with default values, which is totally fine | ||
|
||
# Copy docker entrypoint and shiny-server.sh, in which is stated how we start shiny and nginx | ||
# Moreover we copy the index.html to do a forward of the base directory to ./CRISPRAnalyzeR/, from which NGINX will do the rest | ||
COPY docker-entrypoint.sh / | ||
COPY index.html /srv/shiny-server | ||
RUN chmod +x /docker-entrypoint.sh | ||
RUN chmod +x /srv/shiny-server/index.html | ||
|
||
EXPOSE 3838 | ||
EXPOSE 8000 | ||
|
||
# Add ENV for KiteMatic | ||
# this ENV vars are required to be able to change these settings using Kitematic | ||
|
||
ENV websockets_behind_proxy=FALSE | ||
ENV verbose_logfiles=TRUE | ||
ENV verbose_logfiles=FALSE | ||
ENV COSMIC_database="CosmicMutantExport.tsv" | ||
ENV EnrichR_URL="http://amp.pharm.mssm.edu/Enrichr/ | ||
ENV EnrichR_URL="http://amp.pharm.mssm.edu/Enrichr/" | ||
ENV EnrichR=TRUE | ||
ENV bowtie_threads=2 | ||
ENV proxy_url= | ||
ENV proxy_port= | ||
ENV max_upload=4096 | ||
ENV downloadlogs=TRUE | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
# finally run | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<meta http-equiv="refresh" content="0; url=./CRISPRAnalyzeR" /> | ||
<meta http-equiv="refresh" content="0; url=./CRISPRAnalyzeR/" /> |
Oops, something went wrong.