From 9219fb3e31bbb8fc326f0e624c0a05fbe4f95ebe Mon Sep 17 00:00:00 2001 From: Jens Preussner Date: Thu, 5 Sep 2019 11:28:59 +0200 Subject: [PATCH 1/6] Cleaned up repository; Updated README --- .gitignore | 2 + README.md | 123 ++++++------------ docker/1.0/Dockerfile | 46 ------- docker/1.1/Dockerfile | 46 ------- docker/1.2/Dockerfile | 50 ------- docker/1.2/wilson-key.sh | 39 ------ docker/1.3/Dockerfile | 50 ------- docker/1.3/wilson-key.sh | 39 ------ docker/1.4/Dockerfile | 50 ------- docker/1.4/wilson-key.sh | 41 ------ docker/1.5.1/Dockerfile | 60 --------- docker/1.5.1/entrypoint.sh | 41 ------ docker/1.5.2/Dockerfile | 72 ---------- docker/1.5.2/entrypoint.sh | 41 ------ docker/1.5.3/Dockerfile | 72 ---------- docker/1.5.3/entrypoint.sh | 41 ------ docker/1.5.4/Dockerfile | 82 ------------ docker/1.5.4/entrypoint.sh | 41 ------ docker/1.5/Dockerfile | 60 --------- docker/1.5/entrypoint.sh | 41 ------ docker/demo/Dockerfile | 65 --------- docker/demo/entrypoint.sh | 41 ------ .../rtools_install.png => rtools_install.png | Bin 23 files changed, 39 insertions(+), 1104 deletions(-) create mode 100644 .gitignore delete mode 100644 docker/1.0/Dockerfile delete mode 100644 docker/1.1/Dockerfile delete mode 100644 docker/1.2/Dockerfile delete mode 100644 docker/1.2/wilson-key.sh delete mode 100644 docker/1.3/Dockerfile delete mode 100644 docker/1.3/wilson-key.sh delete mode 100644 docker/1.4/Dockerfile delete mode 100644 docker/1.4/wilson-key.sh delete mode 100644 docker/1.5.1/Dockerfile delete mode 100644 docker/1.5.1/entrypoint.sh delete mode 100644 docker/1.5.2/Dockerfile delete mode 100644 docker/1.5.2/entrypoint.sh delete mode 100644 docker/1.5.3/Dockerfile delete mode 100644 docker/1.5.3/entrypoint.sh delete mode 100644 docker/1.5.4/Dockerfile delete mode 100644 docker/1.5.4/entrypoint.sh delete mode 100644 docker/1.5/Dockerfile delete mode 100644 docker/1.5/entrypoint.sh delete mode 100644 docker/demo/Dockerfile delete mode 100644 docker/demo/entrypoint.sh rename images/rtools_install.png => rtools_install.png (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e188c17 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*/logs +.Rhistory \ No newline at end of file diff --git a/README.md b/README.md index 5ec5eb0..d239f61 100644 --- a/README.md +++ b/README.md @@ -1,110 +1,61 @@ -# WIlsON: Webbased Interactive Omics visualizatioN - The Application -## Abstract -This repository contains the reference application of the [WIlsON R package]( https://github.molgen.mpg.de/loosolab/wilson). It is primarily intended to empower screening platforms to offer access to pre-calculated HT screen results to the non-computational scientist or enduser. Facilitated by an [open file format](#clarion), WIlsON supports all types of omics screens, serves results via a web-based dashboard, and enables end-users to perform analyses and generate publication-ready plots without any programming skills. - -## Availability -The WIlsON app can be applied either via a [centralized R Shiny server](#shiny), via applications such as [Rstudio](#studio), or as a virtualized Docker container for offline usage (Please refer to [that repository](https://hub.docker.com/r/loosolab/wilson/) for a more detailed description). - - -WIlsON can be tested on our [official demonstration server](http://loosolab.mpi-bn.mpg.de/apps/wilson/). - -The underlying WIlsON R package can be downloaded [here](https://github.molgen.mpg.de/loosolab/wilson). - -Please make sure to check our other projects at [loosolab](http://loosolab.mpi-bn.mpg.de/). +# WIlsON: Webbased Interactive Omics visualizatioN - Applications -## How to use it? -A detailed description of the WIlsON app can be found in the [manual](https://github.molgen.mpg.de/loosolab/wilson-apps/wiki). For a quick start without further reading, a set of [tutorial use cases](https://github.molgen.mpg.de/loosolab/wilson-apps/wiki#use_cases) are available. - - -## Data import and our data format CLARION - -CLARION: generiC fiLe formAt foR quantItative cOmparsions of high throughput screeNs - -CLARION is a data format especially developed to be used with WIlsON, which relies on a tab-delimited table with a metadata header to describe the following columns. It is based on the Summarized Experiment format and supports all types of data which can be reduced to features and their annotation (e.g. genes, transcripts, proteins, probes) with assigned numerical values (e.g. count, score, log2foldchange, z-score, p-value). Most result tables derived from RNA-Seq, ChIP/ATAC-Seq, Proteomics, Microarrays, and many other analyses can thus be easily reformatted to become compatible without having to modify the code of WIlsON for each specific experiment. +## Abstract -Please check the following link for details considering the [CLARION format](https://github.molgen.mpg.de/loosolab/wilson-apps/wiki/CLARION-Format). +This repository contains reference applications that utilize functions from the [WIlsON R package]( https://github.molgen.mpg.de/loosolab/wilson). It is primarily intended to empower high-throughput service platforms to offer access to pre-calculated high-throughput screening results to non-computational scientist. Facilitated by an [open file format](https://github.molgen.mpg.de/loosolab/wilson-apps/wiki/CLARION-Format), WIlsON supports all types of -omics screens, serves results via a web-based dashboard, and enables users to perform analyses and generate publication-ready visualizations without programming skills. -### Folder structure and data location -The R Shiny WIlsON application consists of the following components. -``` -app.R -> R code -/data -> Folder with input file(s) (CLARION format) -/introduction -> Introduction / Data Format web pages -/www -> WIlsON logo -``` +## Application deployment +A WIlsON application typically consists of the following components: +- an `app.R` file, containing all R code of the application. +- a `data` directory, containing input file(s) in CLARION format. +- an `introduction` directory, containing markdown documents of the landing page. +- a `www` directory, containing images and logos. -### How do I load my own data? -Add the file suffix *.clarion* or *.se*, and place it/them into the /data folder. Then you reload the app or the R Shiny server. The new dataset can be selected from the apps drop down menue in the feature selection pane! -``` -cp mydata.clarion /srv/shiny-server/sample-apps/data -sudo systemctl stop shiny-server -sudo systemctl daemon-reload -sudo systemctl start shiny-server -``` +Applications described here can easily be deployed [locally](#using-rstudio), on a [centralized R Shiny server](#using-a-shiny-server), or anywhere using [Docker containers](#using-docker-containers): -For an overview, see also [here](https://github.molgen.mpg.de/loosolab/wilson-apps/wiki/CLARION-Format#import-data-into-the-app). +### Using RStudio +1. On Windows-based systems, install [RTools](https://cran.r-project.org/bin/windows/Rtools/). +2. Install all prerequisites using `install.packages("BiocManager", "webshot"); BiocManager::install(c("shinyBS", "shinydashboard", "shinythemes", "htmltools", "wilson"))`. +3. Download the WIlsON applications from the [Releases](https://github.molgen.mpg.de/loosolab/wilson-apps/releases) page and extract them on your local disk. +4. Set the working directory to the extracted release using `setwd("file/to/extracted_release")`. +5. Run an app, e.g. `shiny::runApp("wilson-basic/")`. - -## Installation of R Shiny server in “virgin” Debian 9 Linux -Update and install the following Debian packages. -``` -sudo apt-get update -sudo apt-get upgrade -sudo apt-get install r-base libnlopt-dev wget libssl-dev libxml2-dev libcurl4-openssl-dev git gdebi-core -``` +### Using a Shiny server -Install **R Shiny server** according to the manual found here https://www.rstudio.com/products/shiny/download-server/ (make sure to install to global R library, NOT personal!). +1. Similar to the local usage, install all prerequisites using `install.packages("BiocManager", "webshot"); BiocManager::install(c("shinyBS", "shinydashboard", "shinythemes", "htmltools", "wilson"))`. +2. Download the WIlsON applications from the [Releases](https://github.molgen.mpg.de/loosolab/wilson-apps/releases) page and extract them on the shiny servers disk. +3. Move the application folder(s) into the shiny servers application folder (e.g. to `/srv/shiny-server/wilson-basic`). +4. Restart your shiny server. -Start R and install the **WIlsON R** package and dependencies (make sure to install to global R library, NOT personal!). -``` -R -install.packages("devtools") -devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3", auth_token = NULL) -``` +### Using Docker Containers -Download the **WIlsON R application** archive from https://github.molgen.mpg.de/loosolab/wilson-apps and unzip. Move wilson-basic folder into R Shiny server apps folder (e.g. /srv/shiny-server/sample-apps/wilson-basic). +1. Pull one of [WIlsONs application images](#available-images) using e.g. `docker pull loosolab/wilson-basic:2.1.0`. +2. Rund the application image using `docker run -d loosolab/wilson-basic:2.1.0`. -Change the owner of the R Shiny apps folder to be the “shiny” user. -``` -sudo chown –R shiny:shiny /srv/shiny-server/sample-apps -``` +#### Available images -Restart R Shiny server. -``` -sudo systemctl stop shiny-server -sudo systemctl daemon-reload -sudo systemctl start shiny-server -``` +Currently, the following application images are available: +* [WIlsON basic](https://hub.docker.com/r/loosolab/wilson-basic/tags) - -## Run app in RStudio -To run this app in your local RStudio you have to install the **WIlsON R package** and it's dependencies. -(NOTE: in case you use MS based OS, [Rtools](https://cran.r-project.org/bin/windows/Rtools/) is needed for downloading plots. Make sure to add Rtools to Systempath during installation.) +## Loading custom data -![rtools install](images/rtools_install.png) +For deployments using (RStudio)[#using-rstudio] and [Shiny Server](#using-a-shiny-server), it is sufficient to add [CLARION](#clarion) files to the `/data` folder and reload the app/server. +The new dataset can be selected from the within the app, using the drop down menu in the feature selection panel. -``` -install.packages("devtools") -devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3", auth_token = NULL) -``` -Now either clone the repository and use ``runApp()``: -``` -# Switch with setwd into the main folder e.g. wilson-apps. -setwd('yourPath'/wilson-apps) -# Use runApp to run the desired app. E.g. for wilson-basic -shiny::runApp("wilson-basic/") -``` -Or use ``runUrl()``: -``` -shiny::runUrl("https://github.molgen.mpg.de/loosolab/wilson-apps/archive/master.zip", subdir = "/wilson-basic") -``` +For the Docker deployment, mount a directory with the [CLARION](https://github.molgen.mpg.de/loosolab/wilson-apps/wiki/CLARION-Format) files to `srv/shiny-server/external_data/` using Dockers `-v /path/to/files:/srv/shiny-server/external_data`. ## How to cite * Schultheis H, Kuenne C, Preussner J, Wiegandt R, Fust A, Bentsen M, Looso M. WIlsON: Webbased Interactive Omics VisualizatioN. (2018), doi: https://doi.org/10.1093/bioinformatics/bty711 +## Further information + +* WIlsON can be tested on our [official demonstration server](http://loosolab.mpi-bn.mpg.de/apps/wilson/). +* The underlying WIlsON R package can be installed from [CRAN](https://cran.r-project.org/web/packages/wilson/index.html). +* Please make sure to check our other projects at [loosolab](http://loosolab.mpi-bn.mpg.de/). + ## License This project is licensed under the MIT license. diff --git a/docker/1.0/Dockerfile b/docker/1.0/Dockerfile deleted file mode 100644 index 04705e1..0000000 --- a/docker/1.0/Dockerfile +++ /dev/null @@ -1,46 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER P. Hofmann / MPI-BN / IT Service Group / peter.hofmann@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -gdebi-core && \ -apt-get clean && \ - -#Installs DEVTOOLS -Rscript -e "install.packages(c('devtools'), \ -repos='https://cran.rstudio.com/')" && \ - -#Installs BIOCONDUCTOR/BiocInstaller -Rscript -e 'source("https://bioconductor.org/biocLite.R")' && \ - -#Install Shiny-Server -wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.5.872-amd64.deb && \ -gdebi -n shiny-server-1.5.5.872-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps && \ - -#Install WILSON -Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3")' && \ - -#Install WILSON App -git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp && \ -rm -rf /srv/shiny-server/data && \ -mkdir /srv/shiny-server/data && \ -chown -R shiny:shiny /srv/shiny-server/ - -EXPOSE 3838 - -CMD ["shiny-server"] diff --git a/docker/1.1/Dockerfile b/docker/1.1/Dockerfile deleted file mode 100644 index a2ae3fe..0000000 --- a/docker/1.1/Dockerfile +++ /dev/null @@ -1,46 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER P. Hofmann / MPI-BN / IT Service Group / peter.hofmann@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -gdebi-core && \ -apt-get clean && \ - -#Installs DEVTOOLS -Rscript -e "install.packages(c('devtools'), \ -repos='https://cran.rstudio.com/')" && \ - -#Installs BIOCONDUCTOR/BiocInstaller -Rscript -e 'source("https://bioconductor.org/biocLite.R")' && \ - -#Install Shiny-Server -wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb && \ -gdebi -n shiny-server-1.5.6.875-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps && \ - -#Install WILSON -Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3")' && \ - -#Install WILSON App -git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp && \ -rm -rf /srv/shiny-server/data && \ -mkdir /srv/shiny-server/data && \ -chown -R shiny:shiny /srv/shiny-server/ - -EXPOSE 3838 - -CMD ["shiny-server"] diff --git a/docker/1.2/Dockerfile b/docker/1.2/Dockerfile deleted file mode 100644 index cd45393..0000000 --- a/docker/1.2/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER P. Hofmann / MPI-BN / IT Service Group / peter.hofmann@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -gdebi-core && \ -apt-get clean && \ - -#Installs DEVTOOLS -Rscript -e "install.packages(c('devtools'), \ -repos='https://cran.rstudio.com/')" && \ - -#Installs BIOCONDUCTOR/BiocInstaller -Rscript -e 'source("https://bioconductor.org/biocLite.R")' && \ - -#Install Shiny-Server -wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb && \ -gdebi -n shiny-server-1.5.6.875-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps && \ - -#Install WILSON -Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3")' && \ - -#Install WILSON App -git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp && \ -rm -rf /srv/shiny-server/data && \ -mkdir /srv/shiny-server/data && \ -chown -R shiny:shiny /srv/shiny-server/ - -EXPOSE 3838 - -ADD wilson-key.sh / - -RUN chmod +x /wilson-key.sh - -ENTRYPOINT ["/bin/bash", "-c", "/wilson-key.sh"] diff --git a/docker/1.2/wilson-key.sh b/docker/1.2/wilson-key.sh deleted file mode 100644 index 6f90a50..0000000 --- a/docker/1.2/wilson-key.sh +++ /dev/null @@ -1,39 +0,0 @@ -#/bin/bash - -#this script is run when the container is started -#optionally adds $CONTAINERKEY to shiny server url by modifying shiny-server.conf -# -#example: -#http://: -#-> -#http://:/ -# -#to use this add the "-e" parameter when starting a container: -#docker run ... -e CONTAINERKEY=${container_key} ... -#example: -#docker run --name='sav1' -d -p 50000:3838 -v '/mnt/agnerds/docker/projects/sav1':'/srv/shiny-server/data' -e CONTAINERKEY=sav1 loosolab/wilson:1.2" -#-> http://:50000/sav1 - -conf="/etc/shiny-server/shiny-server.conf" - -#create backup of original shiny-server.conf -if [[ ! -f "${conf}.old" ]]; then - cp ${conf} ${conf}.old -fi - -#add parameter(s) at top of .conf -param="preserve_logs true;" -sed -i "1i $param" ${conf} - -param="sanitize_errors off;" -sed -i "1i $param" ${conf} - -#if environment variable given -> add key to url -if [[ ! -z "$CONTAINERKEY" ]]; then - CONTAINERKEY=$(echo -e $CONTAINERKEY | sed 's/\//\\\//g') #to escape "/" - cat ${conf} | sed "s/location \//location \/$CONTAINERKEY/g" >${conf}.1 - mv ${conf}.1 ${conf} -fi - -#start shiny server -shiny-server >/var/log/shiny-server.log diff --git a/docker/1.3/Dockerfile b/docker/1.3/Dockerfile deleted file mode 100644 index cd45393..0000000 --- a/docker/1.3/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER P. Hofmann / MPI-BN / IT Service Group / peter.hofmann@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -gdebi-core && \ -apt-get clean && \ - -#Installs DEVTOOLS -Rscript -e "install.packages(c('devtools'), \ -repos='https://cran.rstudio.com/')" && \ - -#Installs BIOCONDUCTOR/BiocInstaller -Rscript -e 'source("https://bioconductor.org/biocLite.R")' && \ - -#Install Shiny-Server -wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb && \ -gdebi -n shiny-server-1.5.6.875-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps && \ - -#Install WILSON -Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3")' && \ - -#Install WILSON App -git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp && \ -rm -rf /srv/shiny-server/data && \ -mkdir /srv/shiny-server/data && \ -chown -R shiny:shiny /srv/shiny-server/ - -EXPOSE 3838 - -ADD wilson-key.sh / - -RUN chmod +x /wilson-key.sh - -ENTRYPOINT ["/bin/bash", "-c", "/wilson-key.sh"] diff --git a/docker/1.3/wilson-key.sh b/docker/1.3/wilson-key.sh deleted file mode 100644 index 6f90a50..0000000 --- a/docker/1.3/wilson-key.sh +++ /dev/null @@ -1,39 +0,0 @@ -#/bin/bash - -#this script is run when the container is started -#optionally adds $CONTAINERKEY to shiny server url by modifying shiny-server.conf -# -#example: -#http://: -#-> -#http://:/ -# -#to use this add the "-e" parameter when starting a container: -#docker run ... -e CONTAINERKEY=${container_key} ... -#example: -#docker run --name='sav1' -d -p 50000:3838 -v '/mnt/agnerds/docker/projects/sav1':'/srv/shiny-server/data' -e CONTAINERKEY=sav1 loosolab/wilson:1.2" -#-> http://:50000/sav1 - -conf="/etc/shiny-server/shiny-server.conf" - -#create backup of original shiny-server.conf -if [[ ! -f "${conf}.old" ]]; then - cp ${conf} ${conf}.old -fi - -#add parameter(s) at top of .conf -param="preserve_logs true;" -sed -i "1i $param" ${conf} - -param="sanitize_errors off;" -sed -i "1i $param" ${conf} - -#if environment variable given -> add key to url -if [[ ! -z "$CONTAINERKEY" ]]; then - CONTAINERKEY=$(echo -e $CONTAINERKEY | sed 's/\//\\\//g') #to escape "/" - cat ${conf} | sed "s/location \//location \/$CONTAINERKEY/g" >${conf}.1 - mv ${conf}.1 ${conf} -fi - -#start shiny server -shiny-server >/var/log/shiny-server.log diff --git a/docker/1.4/Dockerfile b/docker/1.4/Dockerfile deleted file mode 100644 index e7962bc..0000000 --- a/docker/1.4/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER P. Hofmann / MPI-BN / IT Service Group / peter.hofmann@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -gdebi-core && \ -apt-get clean && \ - -#Installs DEVTOOLS -Rscript -e "install.packages(c('devtools'), \ -repos='https://cran.rstudio.com/')" && \ - -#Installs BIOCONDUCTOR/BiocInstaller -Rscript -e 'source("https://bioconductor.org/biocLite.R")' && \ - -#Install Shiny-Server -wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb && \ -gdebi -n shiny-server-1.5.6.875-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps && \ - -#Install WILSON -Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3")' && \ - -#Install WILSON App -git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp && \ -rm -rf /srv/shiny-server/data && \ -mkdir /srv/shiny-server/data && \ -chown -R shiny:shiny /srv/shiny-server/ - -EXPOSE 3838 - -ADD wilson-key.sh /usr/bin/wilson-key.sh - -RUN chmod +x /usr/bin/wilson-key.sh - -CMD ["/usr/bin/wilson-key.sh"] diff --git a/docker/1.4/wilson-key.sh b/docker/1.4/wilson-key.sh deleted file mode 100644 index 1c24e19..0000000 --- a/docker/1.4/wilson-key.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -#this script is run when the container is started -#optionally adds $CONTAINERKEY to shiny server url by modifying shiny-server.conf -# -#example: -#http://: -#-> -#http://:/ -# -#to use this add the "-e" parameter when starting a container: -#docker run ... -e CONTAINERKEY=${container_key} ... -#example: -#docker run --name='sav1' -d -p 50000:3838 -v '/mnt/agnerds/docker/projects/sav1':'/srv/shiny-server/data' -e CONTAINERKEY=sav1 loosolab/wilson:1.2" -#-> http://:50000/sav1 - -conf="/etc/shiny-server/shiny-server.conf" - -#create backup of original shiny-server.conf -if [[ ! -f "${conf}.old" ]]; then - cp ${conf} ${conf}.old -else - cp ${conf}.old ${conf} -fi - -#add parameter(s) at top of .conf -param="preserve_logs true;" -sed -i "1i $param" ${conf} - -param="sanitize_errors off;" -sed -i "1i $param" ${conf} - -#if environment variable given -> add key to url -if [[ ! -z "$CONTAINERKEY" ]]; then - CONTAINERKEY=$(echo -e $CONTAINERKEY | sed 's/\//\\\//g') #to escape "/" - cat ${conf} | sed "s/location \//location \/$CONTAINERKEY/g" >${conf}.1 - mv ${conf}.1 ${conf} -fi - -#start shiny server -exec shiny-server 2>&1 >>/var/log/shiny-server.log diff --git a/docker/1.5.1/Dockerfile b/docker/1.5.1/Dockerfile deleted file mode 100644 index 242108d..0000000 --- a/docker/1.5.1/Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER C. Kuenne / MPI-BN / Bioinformatics Core Unit / carsten.kuenne@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -procps \ -gdebi-core && \ -apt-get clean - -#Installs DEVTOOLS -RUN Rscript -e "install.packages(c('devtools'), \ -repos='https://cran.rstudio.com/')" - -#Installs BIOCONDUCTOR/BiocInstaller -RUN Rscript -e 'source("https://bioconductor.org/biocLite.R")' - -#Install Shiny-Server -RUN wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb && \ -gdebi -n shiny-server-1.5.6.875-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps - -#Install WILSON -RUN Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3")' - -#Install stackdump -RUN Rscript -e 'devtools::install_github(repo = "jcheng5/stackdump")' - -#Install WILSON App -#RUN git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -RUN git clone -b stackdump https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp - -RUN rm -rf /srv/shiny-server/data && \ -mkdir /srv/shiny-server/data - -EXPOSE 3838 - -ADD entrypoint.sh /usr/bin/entrypoint.sh -RUN chmod +x /usr/bin/entrypoint.sh - -#switch shiny user uid to 1000 (previously docker user); set permissions -RUN usermod -u 1000 shiny && \ -chown -R shiny:shiny /srv/shiny-server/ && \ -mkdir -p /srv/shiny-server/logs && \ -chmod ugo+wrX /srv/shiny-server/logs - -CMD ["/usr/bin/entrypoint.sh"] diff --git a/docker/1.5.1/entrypoint.sh b/docker/1.5.1/entrypoint.sh deleted file mode 100644 index 1c24e19..0000000 --- a/docker/1.5.1/entrypoint.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -#this script is run when the container is started -#optionally adds $CONTAINERKEY to shiny server url by modifying shiny-server.conf -# -#example: -#http://: -#-> -#http://:/ -# -#to use this add the "-e" parameter when starting a container: -#docker run ... -e CONTAINERKEY=${container_key} ... -#example: -#docker run --name='sav1' -d -p 50000:3838 -v '/mnt/agnerds/docker/projects/sav1':'/srv/shiny-server/data' -e CONTAINERKEY=sav1 loosolab/wilson:1.2" -#-> http://:50000/sav1 - -conf="/etc/shiny-server/shiny-server.conf" - -#create backup of original shiny-server.conf -if [[ ! -f "${conf}.old" ]]; then - cp ${conf} ${conf}.old -else - cp ${conf}.old ${conf} -fi - -#add parameter(s) at top of .conf -param="preserve_logs true;" -sed -i "1i $param" ${conf} - -param="sanitize_errors off;" -sed -i "1i $param" ${conf} - -#if environment variable given -> add key to url -if [[ ! -z "$CONTAINERKEY" ]]; then - CONTAINERKEY=$(echo -e $CONTAINERKEY | sed 's/\//\\\//g') #to escape "/" - cat ${conf} | sed "s/location \//location \/$CONTAINERKEY/g" >${conf}.1 - mv ${conf}.1 ${conf} -fi - -#start shiny server -exec shiny-server 2>&1 >>/var/log/shiny-server.log diff --git a/docker/1.5.2/Dockerfile b/docker/1.5.2/Dockerfile deleted file mode 100644 index 583b49c..0000000 --- a/docker/1.5.2/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER C. Kuenne / MPI-BN / Bioinformatics Core Unit / carsten.kuenne@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -procps \ -gdebi-core && \ -apt-get clean - -#Installs DEVTOOLS -RUN Rscript -e "install.packages(c('devtools'), \ -repos='https://cran.rstudio.com/')" - -#Installs BIOCONDUCTOR/BiocInstaller -RUN Rscript -e 'source("https://bioconductor.org/biocLite.R")' - -#Install Shiny-Server -#RUN wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb && \ -#gdebi -n shiny-server-1.5.6.875-amd64.deb && \ -RUN wget https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-1.5.7.907-amd64.deb && \ -gdebi -n shiny-server-1.5.7.907-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps - -#Install WILSON -RUN Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3")' - -#Install stackdump -#RUN Rscript -e 'devtools::install_github(repo = "jcheng5/stackdump")' - -#Install WILSON App -#RUN git clone -b stackdump https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -RUN git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp - -RUN rm -rf /srv/shiny-server/data && \ -mkdir /srv/shiny-server/data - -#Install webshot/phantomjs to permit download of interactive plots -RUN Rscript -e 'install.packages("webshot", repos="http://cran.wustl.edu")' -RUN Rscript -e 'webshot::install_phantomjs()' -RUN cp /root/bin/phantomjs /usr/local/bin - -EXPOSE 3838 - -#check current directory for the presence of clarion input files (*.se, *.clarion) -> include in container -#add pointless additional copy of entrypoint.sh because otherwise the building will fail if no clarion files exist -ADD entrypoint.sh *.se *.clarion /srv/shiny-server/data -RUN rm /srv/shiny-server/data/entrypoint.sh - -ADD entrypoint.sh /usr/bin/entrypoint.sh -RUN chmod +x /usr/bin/entrypoint.sh - -#switch shiny user uid to 1000 (previously docker user); set permissions -RUN usermod -u 1000 shiny && \ -chown -R shiny:shiny /srv/shiny-server/ && \ -mkdir -p /srv/shiny-server/logs && \ -chmod ugo+wrX /srv/shiny-server/logs - -CMD ["/usr/bin/entrypoint.sh"] diff --git a/docker/1.5.2/entrypoint.sh b/docker/1.5.2/entrypoint.sh deleted file mode 100644 index 1c24e19..0000000 --- a/docker/1.5.2/entrypoint.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -#this script is run when the container is started -#optionally adds $CONTAINERKEY to shiny server url by modifying shiny-server.conf -# -#example: -#http://: -#-> -#http://:/ -# -#to use this add the "-e" parameter when starting a container: -#docker run ... -e CONTAINERKEY=${container_key} ... -#example: -#docker run --name='sav1' -d -p 50000:3838 -v '/mnt/agnerds/docker/projects/sav1':'/srv/shiny-server/data' -e CONTAINERKEY=sav1 loosolab/wilson:1.2" -#-> http://:50000/sav1 - -conf="/etc/shiny-server/shiny-server.conf" - -#create backup of original shiny-server.conf -if [[ ! -f "${conf}.old" ]]; then - cp ${conf} ${conf}.old -else - cp ${conf}.old ${conf} -fi - -#add parameter(s) at top of .conf -param="preserve_logs true;" -sed -i "1i $param" ${conf} - -param="sanitize_errors off;" -sed -i "1i $param" ${conf} - -#if environment variable given -> add key to url -if [[ ! -z "$CONTAINERKEY" ]]; then - CONTAINERKEY=$(echo -e $CONTAINERKEY | sed 's/\//\\\//g') #to escape "/" - cat ${conf} | sed "s/location \//location \/$CONTAINERKEY/g" >${conf}.1 - mv ${conf}.1 ${conf} -fi - -#start shiny server -exec shiny-server 2>&1 >>/var/log/shiny-server.log diff --git a/docker/1.5.3/Dockerfile b/docker/1.5.3/Dockerfile deleted file mode 100644 index 8fd10da..0000000 --- a/docker/1.5.3/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER C. Kuenne / MPI-BN / Bioinformatics Core Unit / carsten.kuenne@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -procps \ -gdebi-core && \ -apt-get clean - -#Installs DEVTOOLS -RUN Rscript -e "install.packages(c('devtools'), \ -repos='https://cran.rstudio.com/')" - -#Installs BIOCONDUCTOR/BiocInstaller -RUN Rscript -e 'source("https://bioconductor.org/biocLite.R")' - -#Install Shiny-Server -#RUN wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb && \ -#gdebi -n shiny-server-1.5.6.875-amd64.deb && \ -RUN wget https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-1.5.7.907-amd64.deb && \ -gdebi -n shiny-server-1.5.7.907-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps - -#Install WILSON -RUN Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3")' - -#Install stackdump -#RUN Rscript -e 'devtools::install_github(repo = "jcheng5/stackdump")' - -#Install WILSON App -#RUN git clone -b stackdump https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -RUN git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp - -#Install webshot/phantomjs to permit download of interactive plots with plot.ly -RUN Rscript -e 'install.packages("webshot", repos="http://cran.wustl.edu")' -RUN Rscript -e 'webshot::install_phantomjs()' -RUN cp /root/bin/phantomjs /usr/local/bin - -EXPOSE 3838 - -RUN rm -rf /srv/shiny-server/data && \ -mkdir /srv/shiny-server/data - -#check current directory for the presence of clarion input files (*.se, *.clarion) -> include in container -#add pointless additional copy of entrypoint.sh because otherwise the building will fail if no clarion files exist (yuck!) -ADD entrypoint.sh *.se *.clarion /srv/shiny-server/data/ -RUN rm /srv/shiny-server/data/entrypoint.sh - -ADD entrypoint.sh /usr/bin/entrypoint.sh -RUN chmod +x /usr/bin/entrypoint.sh - -#switch shiny user uid to 1000 (previously docker user); set permissions -RUN usermod -u 1000 shiny && \ -chown -R shiny:shiny /srv/shiny-server/ && \ -mkdir -p /srv/shiny-server/logs && \ -chmod ugo+wrX /srv/shiny-server/logs - -CMD ["/usr/bin/entrypoint.sh"] diff --git a/docker/1.5.3/entrypoint.sh b/docker/1.5.3/entrypoint.sh deleted file mode 100644 index 5a9bf30..0000000 --- a/docker/1.5.3/entrypoint.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -#this script is run when the container is started -#optionally adds $CONTAINERKEY to shiny server url by modifying shiny-server.conf -# -#example: -#http://: -#-> -#http://:/ -# -#to use this add the "-e" parameter when starting a container: -#docker run ... -e CONTAINERKEY=${container_key} ... -#example: -#docker run --name='sav1' -d -p 50000:3838 -v '/mnt/agnerds/docker/projects/sav1':'/srv/shiny-server/external_data' -e CONTAINERKEY=sav1 loosolab/wilson:1.2" -#-> http://:50000/sav1 - -conf="/etc/shiny-server/shiny-server.conf" - -#create backup of original shiny-server.conf -if [[ ! -f "${conf}.old" ]]; then - cp ${conf} ${conf}.old -else - cp ${conf}.old ${conf} -fi - -#add parameter(s) at top of .conf -param="preserve_logs true;" -sed -i "1i $param" ${conf} - -param="sanitize_errors off;" -sed -i "1i $param" ${conf} - -#if environment variable given -> add key to url -if [[ ! -z "$CONTAINERKEY" ]]; then - CONTAINERKEY=$(echo -e $CONTAINERKEY | sed 's/\//\\\//g') #to escape "/" - cat ${conf} | sed "s/location \//location \/$CONTAINERKEY/g" >${conf}.1 - mv ${conf}.1 ${conf} -fi - -#start shiny server -exec shiny-server 2>&1 >>/var/log/shiny-server.log diff --git a/docker/1.5.4/Dockerfile b/docker/1.5.4/Dockerfile deleted file mode 100644 index 2f86256..0000000 --- a/docker/1.5.4/Dockerfile +++ /dev/null @@ -1,82 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER C. Kuenne / MPI-BN / Bioinformatics / carsten.kuenne@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -procps \ -gdebi-core && \ -apt-get clean - -#Installs DEVTOOLS -RUN Rscript -e "install.packages(c('devtools'), repos='https://cran.rstudio.com/')" - -#Installs BIOCONDUCTOR/BiocInstaller -RUN Rscript -e 'source("https://bioconductor.org/biocLite.R")' - -#Install Shiny-Server -#RUN wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb && \ -#gdebi -n shiny-server-1.5.6.875-amd64.deb && \ -#RUN wget https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-1.5.7.907-amd64.deb && \ -#gdebi -n shiny-server-1.5.7.907-amd64.deb && \ -RUN wget https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-1.5.9.923-amd64.deb && \ -gdebi -n shiny-server-1.5.9.923-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps - -#install shinythemes -RUN Rscript -e 'install.packages("shinythemes", repos="http://cran.wustl.edu/")' - -#install shinyBS -RUN Rscript -e 'install.packages("shinyBS", repos="http://cran.wustl.edu/")' - -#install old mvtnorm package (1.0-8), because the current 1.0-10 needs r 3.5 (current debian r is 3.3) -RUN Rscript -e 'devtools::install_version(repos="http://cran.wustl.edu/", package = "mvtnorm", version = "1.0-8")' - -#Install WILSON -RUN Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3", auth_token = NULL, upgrade = "never")' - -#Install stackdump -#RUN Rscript -e 'devtools::install_github(repo = "jcheng5/stackdump")' - -#Install WILSON App -#RUN git clone -b stackdump https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -RUN git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp - -#Install webshot/phantomjs to permit download of interactive plots with plot.ly -RUN Rscript -e 'install.packages("webshot", repos="http://cran.wustl.edu")' -RUN Rscript -e 'webshot::install_phantomjs()' -RUN cp /root/bin/phantomjs /usr/local/bin - -EXPOSE 3838 - -RUN rm -rf /srv/shiny-server/data && \ -mkdir /srv/shiny-server/data - -#check current directory for the presence of clarion input files (*.se, *.clarion) -> include in container -#add pointless additional copy of entrypoint.sh because otherwise the building will fail if no clarion files exist (yuck!) -ADD entrypoint.sh *.se *.clarion /srv/shiny-server/data/ -RUN rm /srv/shiny-server/data/entrypoint.sh - -ADD entrypoint.sh /usr/bin/entrypoint.sh -RUN chmod +x /usr/bin/entrypoint.sh - -#switch shiny user uid to 1000 (previously docker user); set permissions -RUN usermod -u 1000 shiny && \ -chown -R shiny:shiny /srv/shiny-server/ && \ -mkdir -p /srv/shiny-server/logs && \ -chmod ugo+wrX /srv/shiny-server/logs - -CMD ["/usr/bin/entrypoint.sh"] diff --git a/docker/1.5.4/entrypoint.sh b/docker/1.5.4/entrypoint.sh deleted file mode 100644 index 1c24e19..0000000 --- a/docker/1.5.4/entrypoint.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -#this script is run when the container is started -#optionally adds $CONTAINERKEY to shiny server url by modifying shiny-server.conf -# -#example: -#http://: -#-> -#http://:/ -# -#to use this add the "-e" parameter when starting a container: -#docker run ... -e CONTAINERKEY=${container_key} ... -#example: -#docker run --name='sav1' -d -p 50000:3838 -v '/mnt/agnerds/docker/projects/sav1':'/srv/shiny-server/data' -e CONTAINERKEY=sav1 loosolab/wilson:1.2" -#-> http://:50000/sav1 - -conf="/etc/shiny-server/shiny-server.conf" - -#create backup of original shiny-server.conf -if [[ ! -f "${conf}.old" ]]; then - cp ${conf} ${conf}.old -else - cp ${conf}.old ${conf} -fi - -#add parameter(s) at top of .conf -param="preserve_logs true;" -sed -i "1i $param" ${conf} - -param="sanitize_errors off;" -sed -i "1i $param" ${conf} - -#if environment variable given -> add key to url -if [[ ! -z "$CONTAINERKEY" ]]; then - CONTAINERKEY=$(echo -e $CONTAINERKEY | sed 's/\//\\\//g') #to escape "/" - cat ${conf} | sed "s/location \//location \/$CONTAINERKEY/g" >${conf}.1 - mv ${conf}.1 ${conf} -fi - -#start shiny server -exec shiny-server 2>&1 >>/var/log/shiny-server.log diff --git a/docker/1.5/Dockerfile b/docker/1.5/Dockerfile deleted file mode 100644 index 242108d..0000000 --- a/docker/1.5/Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER C. Kuenne / MPI-BN / Bioinformatics Core Unit / carsten.kuenne@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -procps \ -gdebi-core && \ -apt-get clean - -#Installs DEVTOOLS -RUN Rscript -e "install.packages(c('devtools'), \ -repos='https://cran.rstudio.com/')" - -#Installs BIOCONDUCTOR/BiocInstaller -RUN Rscript -e 'source("https://bioconductor.org/biocLite.R")' - -#Install Shiny-Server -RUN wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb && \ -gdebi -n shiny-server-1.5.6.875-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps - -#Install WILSON -RUN Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3")' - -#Install stackdump -RUN Rscript -e 'devtools::install_github(repo = "jcheng5/stackdump")' - -#Install WILSON App -#RUN git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -RUN git clone -b stackdump https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp - -RUN rm -rf /srv/shiny-server/data && \ -mkdir /srv/shiny-server/data - -EXPOSE 3838 - -ADD entrypoint.sh /usr/bin/entrypoint.sh -RUN chmod +x /usr/bin/entrypoint.sh - -#switch shiny user uid to 1000 (previously docker user); set permissions -RUN usermod -u 1000 shiny && \ -chown -R shiny:shiny /srv/shiny-server/ && \ -mkdir -p /srv/shiny-server/logs && \ -chmod ugo+wrX /srv/shiny-server/logs - -CMD ["/usr/bin/entrypoint.sh"] diff --git a/docker/1.5/entrypoint.sh b/docker/1.5/entrypoint.sh deleted file mode 100644 index 1c24e19..0000000 --- a/docker/1.5/entrypoint.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -#this script is run when the container is started -#optionally adds $CONTAINERKEY to shiny server url by modifying shiny-server.conf -# -#example: -#http://: -#-> -#http://:/ -# -#to use this add the "-e" parameter when starting a container: -#docker run ... -e CONTAINERKEY=${container_key} ... -#example: -#docker run --name='sav1' -d -p 50000:3838 -v '/mnt/agnerds/docker/projects/sav1':'/srv/shiny-server/data' -e CONTAINERKEY=sav1 loosolab/wilson:1.2" -#-> http://:50000/sav1 - -conf="/etc/shiny-server/shiny-server.conf" - -#create backup of original shiny-server.conf -if [[ ! -f "${conf}.old" ]]; then - cp ${conf} ${conf}.old -else - cp ${conf}.old ${conf} -fi - -#add parameter(s) at top of .conf -param="preserve_logs true;" -sed -i "1i $param" ${conf} - -param="sanitize_errors off;" -sed -i "1i $param" ${conf} - -#if environment variable given -> add key to url -if [[ ! -z "$CONTAINERKEY" ]]; then - CONTAINERKEY=$(echo -e $CONTAINERKEY | sed 's/\//\\\//g') #to escape "/" - cat ${conf} | sed "s/location \//location \/$CONTAINERKEY/g" >${conf}.1 - mv ${conf}.1 ${conf} -fi - -#start shiny server -exec shiny-server 2>&1 >>/var/log/shiny-server.log diff --git a/docker/demo/Dockerfile b/docker/demo/Dockerfile deleted file mode 100644 index ef08b26..0000000 --- a/docker/demo/Dockerfile +++ /dev/null @@ -1,65 +0,0 @@ -# Pulls debian:latest from dockerhub -FROM debian - -# Dockerfile questions go to -MAINTAINER C. Kuenne / MPI-BN / Bioinformatics Core Unit / carsten.kuenne@mpi-bn.mpg.de - -#Some basic packages, updates and cleanup -RUN apt-get -y update && apt-get -y upgrade && \ -apt-get -y install \ -r-base \ -wget \ -libnlopt-dev \ -libssl-dev \ -libxml2-dev \ -libcurl4-openssl-dev \ -git \ -procps \ -gdebi-core && \ -apt-get clean - -#Installs DEVTOOLS -RUN Rscript -e "install.packages(c('devtools'), \ -repos='https://cran.rstudio.com/')" - -#Installs BIOCONDUCTOR/BiocInstaller -RUN Rscript -e 'source("https://bioconductor.org/biocLite.R")' - -#Install Shiny-Server -#RUN wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.5.6.875-amd64.deb && \ -#gdebi -n shiny-server-1.5.6.875-amd64.deb && \ -RUN wget https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-1.5.7.907-amd64.deb && \ -gdebi -n shiny-server-1.5.7.907-amd64.deb && \ -rm /srv/shiny-server/index.html && \ -rm -rf /srv/shiny-server/sample-apps - -#Install WILSON -RUN Rscript -e 'devtools::install_github(repo = "loosolab/wilson", host="github.molgen.mpg.de/api/v3")' - -#Install stackdump -#RUN Rscript -e 'devtools::install_github(repo = "jcheng5/stackdump")' - -#Install WILSON App -#RUN git clone -b stackdump https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -RUN git clone https://github.molgen.mpg.de/loosolab/wilson-apps /srv/shiny-server/tmp && \ -cp -a /srv/shiny-server/tmp/wilson-basic/. /srv/shiny-server/ && \ -rm -rf /srv/shiny-server/tmp - - -EXPOSE 3838 - -#check current directory for the presence of clarion input files (*.se, *.clarion) -> include in container -#add pointless additional copy of entrypoint.sh because otherwise the building will fail if no clarion files exist -ADD entrypoint.sh *.se *.clarion /srv/shiny-server/data -RUN rm /srv/shiny-server/data/entrypoint.sh - -ADD entrypoint.sh /usr/bin/entrypoint.sh -RUN chmod +x /usr/bin/entrypoint.sh - -#switch shiny user uid to 1000 (previously docker user); set permissions -RUN usermod -u 1000 shiny && \ -chown -R shiny:shiny /srv/shiny-server/ && \ -mkdir -p /srv/shiny-server/logs && \ -chmod ugo+wrX /srv/shiny-server/logs - -CMD ["/usr/bin/entrypoint.sh"] diff --git a/docker/demo/entrypoint.sh b/docker/demo/entrypoint.sh deleted file mode 100644 index 1c24e19..0000000 --- a/docker/demo/entrypoint.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -#this script is run when the container is started -#optionally adds $CONTAINERKEY to shiny server url by modifying shiny-server.conf -# -#example: -#http://: -#-> -#http://:/ -# -#to use this add the "-e" parameter when starting a container: -#docker run ... -e CONTAINERKEY=${container_key} ... -#example: -#docker run --name='sav1' -d -p 50000:3838 -v '/mnt/agnerds/docker/projects/sav1':'/srv/shiny-server/data' -e CONTAINERKEY=sav1 loosolab/wilson:1.2" -#-> http://:50000/sav1 - -conf="/etc/shiny-server/shiny-server.conf" - -#create backup of original shiny-server.conf -if [[ ! -f "${conf}.old" ]]; then - cp ${conf} ${conf}.old -else - cp ${conf}.old ${conf} -fi - -#add parameter(s) at top of .conf -param="preserve_logs true;" -sed -i "1i $param" ${conf} - -param="sanitize_errors off;" -sed -i "1i $param" ${conf} - -#if environment variable given -> add key to url -if [[ ! -z "$CONTAINERKEY" ]]; then - CONTAINERKEY=$(echo -e $CONTAINERKEY | sed 's/\//\\\//g') #to escape "/" - cat ${conf} | sed "s/location \//location \/$CONTAINERKEY/g" >${conf}.1 - mv ${conf}.1 ${conf} -fi - -#start shiny server -exec shiny-server 2>&1 >>/var/log/shiny-server.log diff --git a/images/rtools_install.png b/rtools_install.png similarity index 100% rename from images/rtools_install.png rename to rtools_install.png From 89a021166218fc7261e1f1644d571fc8a1856675 Mon Sep 17 00:00:00 2001 From: Jens Preussner Date: Thu, 5 Sep 2019 15:30:19 +0200 Subject: [PATCH 2/6] Added files for container --- wilson-basic/.dockerignore | 3 ++ wilson-basic/Dockerfile | 51 +++++++++++++++++++++++++++++++ wilson-basic/entrypoint.sh | 4 +++ wilson-basic/shiny-server.conf.j2 | 29 ++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 wilson-basic/.dockerignore create mode 100644 wilson-basic/Dockerfile create mode 100755 wilson-basic/entrypoint.sh create mode 100644 wilson-basic/shiny-server.conf.j2 diff --git a/wilson-basic/.dockerignore b/wilson-basic/.dockerignore new file mode 100644 index 0000000..f872fe2 --- /dev/null +++ b/wilson-basic/.dockerignore @@ -0,0 +1,3 @@ +.dockerignore +Dockerfile +.DS_Store \ No newline at end of file diff --git a/wilson-basic/Dockerfile b/wilson-basic/Dockerfile new file mode 100644 index 0000000..622a18f --- /dev/null +++ b/wilson-basic/Dockerfile @@ -0,0 +1,51 @@ +FROM rocker/shiny:3.6.1 +LABEL maintainer="Jens Preussner " +LABEL maintainer="Hendrik Schultheis " +LABEL maintainer="Carsten Kuenne " +LABEL version="2.1.0" + +# +# Configuration +# +ENV \ + # Define the default location from which the app is served + WILSON_LOCATION=/ \ + # Define the landing page for the app + WILSON_LANDING_PAGE=introduction + +# +# Move app and data to container +# +COPY . /srv/shiny-server + +# +# Installation procedure +# +RUN apt-get update && apt-get install -y \ + libnlopt-dev \ + libssl-dev \ + libxml2-dev \ + libcurl4-openssl-dev \ + git \ + procps \ + python-pip && \ + apt-get clean && \ + # Install jinja2 templating engine + pip install j2cli && \ + # Install R infrastructure + R -e "install.packages(c('BiocManager', 'webshot'), repos = c(CRAN = 'https://cloud.r-project.org/'))" && \ + R -e "webshot::install_phantomjs()" && \ + R -e "BiocManager::install(c('shinyBS', 'shinydashboard', 'shinythemes', 'htmltools', 'wilson'))" && \ + cp /root/bin/phantomjs /usr/local/bin && \ + # Move entrypoint, create log directory + mv /srv/shiny-server/entrypoint.sh / && \ + mkdir /srv/shiny-server/logs && \ + # Change ownerships + chmod -R ugo+wrX /var/log/shiny-server/ && \ + chown -R shiny:shiny /srv/shiny-server/ && \ + # Clean up existing sample apps + rm -rf /srv/shiny-server/[0-9][0-9]_* /srv/shiny-server/index.html /srv/shiny-server/sample-apps + +# Start container +USER shiny +ENTRYPOINT ["/entrypoint.sh", "/usr/bin/shiny-server.sh"] diff --git a/wilson-basic/entrypoint.sh b/wilson-basic/entrypoint.sh new file mode 100755 index 0000000..b77656d --- /dev/null +++ b/wilson-basic/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/bash -e +j2 /srv/shiny-server/shiny-server.conf.j2 > /srv/shiny-server/shiny-server.conf + +exec "$@" \ No newline at end of file diff --git a/wilson-basic/shiny-server.conf.j2 b/wilson-basic/shiny-server.conf.j2 new file mode 100644 index 0000000..f12c510 --- /dev/null +++ b/wilson-basic/shiny-server.conf.j2 @@ -0,0 +1,29 @@ +# Define the user we should use when spawning R Shiny processes +run_as shiny; + +# Preserve logging, although the main process exits with status 0 +preserve_logs true; + +# Enable detailed error messages for users +sanitize_errors off; + +# Define a top-level server which will listen on a port +server { + # Instruct this server to listen on port 3838 + listen 3838; + + # Define the location available at the base URL + location {{ "WILSON_LOCATION"|env("/") }} { + + # Run this location in 'site_dir' mode, which hosts the entire directory + # tree at '/srv/shiny-server' + site_dir /srv/shiny-server; + + # Define where we should put the log files for this location + log_dir /var/log/shiny-server; + + # Should we list the contents of a (non-Shiny-App) directory when the user + # visits the corresponding URL? + directory_index on; + } +} From 6f4c7449d099836aa91ca221d0e9f5141ed84903 Mon Sep 17 00:00:00 2001 From: Jens Preussner Date: Fri, 6 Sep 2019 16:01:39 +0200 Subject: [PATCH 3/6] Pass environmental variables via ~/.Renviron --- wilson-basic/.Renviron.j2 | 8 ++++++++ wilson-basic/entrypoint.sh | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 wilson-basic/.Renviron.j2 diff --git a/wilson-basic/.Renviron.j2 b/wilson-basic/.Renviron.j2 new file mode 100644 index 0000000..8740f67 --- /dev/null +++ b/wilson-basic/.Renviron.j2 @@ -0,0 +1,8 @@ +# Define default landing page. Can be "introduction" or "feature_selection" +WILSON_LANDING_PAGE={{ "WILSON_LANDING_PAGE"|env("introduction") }} + +# Define width of the side panel +WILSON_SIDEPANELWIDTH={{ "WILSON_SIDEPANELWIDTH"|env("2") }} + +# Define with of the main panel +WILSON_MAINPANELWIDTH={{ "WILSON_MAINPANELWIDTH"|env("10") }} diff --git a/wilson-basic/entrypoint.sh b/wilson-basic/entrypoint.sh index b77656d..54002cd 100755 --- a/wilson-basic/entrypoint.sh +++ b/wilson-basic/entrypoint.sh @@ -1,4 +1,9 @@ #!/bin/bash -e + +# Render shiny-server configuration file template j2 /srv/shiny-server/shiny-server.conf.j2 > /srv/shiny-server/shiny-server.conf +# Render .Renviron file template +j2 /srv/shiny-server/.Renviron.j2 > /home/shiny/.Renviron + exec "$@" \ No newline at end of file From 676eb8886480ca02070569547287694a668c3e49 Mon Sep 17 00:00:00 2001 From: Jens Preussner Date: Mon, 14 Oct 2019 12:39:23 +0200 Subject: [PATCH 4/6] Exchanged ENTRYPOINT with CMD --- wilson-basic/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wilson-basic/Dockerfile b/wilson-basic/Dockerfile index 622a18f..76a8a10 100644 --- a/wilson-basic/Dockerfile +++ b/wilson-basic/Dockerfile @@ -2,7 +2,7 @@ FROM rocker/shiny:3.6.1 LABEL maintainer="Jens Preussner " LABEL maintainer="Hendrik Schultheis " LABEL maintainer="Carsten Kuenne " -LABEL version="2.1.0" +LABEL version="2.1.1" # # Configuration @@ -48,4 +48,4 @@ RUN apt-get update && apt-get install -y \ # Start container USER shiny -ENTRYPOINT ["/entrypoint.sh", "/usr/bin/shiny-server.sh"] +CMD ["/entrypoint.sh", "/usr/bin/shiny-server.sh"] From d7911c3ec10d3632cdba92d8b99264aeaef85890 Mon Sep 17 00:00:00 2001 From: Jens Preussner Date: Mon, 14 Oct 2019 13:02:08 +0200 Subject: [PATCH 5/6] Add possibility to remove example; bump version --- wilson-basic/.Renviron.j2 | 3 +++ wilson-basic/app.R | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/wilson-basic/.Renviron.j2 b/wilson-basic/.Renviron.j2 index 8740f67..0bb19a6 100644 --- a/wilson-basic/.Renviron.j2 +++ b/wilson-basic/.Renviron.j2 @@ -6,3 +6,6 @@ WILSON_SIDEPANELWIDTH={{ "WILSON_SIDEPANELWIDTH"|env("2") }} # Define with of the main panel WILSON_MAINPANELWIDTH={{ "WILSON_MAINPANELWIDTH"|env("10") }} + +# Remove examples from data source +WILSON_BLACKLIST_EXAMPLES={{ "WILSON_BLACKLIST_EXAMPLES"|env("false") }} diff --git a/wilson-basic/app.R b/wilson-basic/app.R index ba37a02..18b56d6 100755 --- a/wilson-basic/app.R +++ b/wilson-basic/app.R @@ -11,7 +11,7 @@ if(!requireNamespace("shinyBS", quietly = TRUE)) { stop("The package shinyBS nee if(!requireNamespace("htmltools", quietly = TRUE)) { stop("The package htmltools needs to be installed in order to use this app.")} # Set versions -wilson_app_version <- "WIlsON basic 2.1.0" +wilson_app_version <- "WIlsON basic 2.1.1" wilson_package_version <- as.character(packageVersion("wilson")) # @@ -52,12 +52,16 @@ wilson_auto_reload_pattern <- ".*\\.(r|se|R|clarion)$" wilson_auto_reload_interval <- 3000 # Sets the max file upload size in mb -# This value only changes upload size of the shiny-server preceeding services (e.g. reverse proxy) must be altered aswell. +# This value only changes upload size of the shiny-server. Other services (e.g. a reverse proxy) must be configured properly as well. wilson_max_upload_size <- 100 # Allow logging of uploaded files for debugging purposes wilson_log_upload <- TRUE +# Remove example files from data selection +example_files <- c("A_RNAseq_Zhang_2015.se", "B_Methylation_Hautefort_Oncot_2017.se", "C_Proteomics_Worzfeld_MCP_2017.se") +wilson_blacklist_examples <- as.logical(Sys.getenv("WILSON_BLACKLIST_EXAMPLES", unset = FALSE)) + # # WIlsON application logic # @@ -142,7 +146,7 @@ ui <- dashboardPage(header = dashboardHeader(disable = TRUE), sidebar = dashboar tags$h6("Highlighted Features"), verbatimTextOutput("filter_h1"), tags$h3("Global Parameters"), - radioButtons(inputId = "data_origin", label = "Choose data origin:", choices = c("Examples", "Upload")), + radioButtons(inputId = "data_origin", label = "Choose data source:", choices = c("Select from list", "Upload file")), uiOutput(outputId = "fileLoader"), bsButton("filter_log_b", label = "Toggle log", style = "default", size = "small"), hidden(verbatimTextOutput("filter_log")) @@ -536,6 +540,11 @@ server <- function(session, input, output) { # Use all .se and .clarion files specified in data load <- sapply(list.files(path = "data", pattern = "\\.se$|\\.clarion$"), function(x){ file.path("data", x)}) + # Remove example files if requested + if (wilson_blacklist_examples) { + load <- load[setdiff(names(load), example_files)] + } + # check for additional data if (dir.exists("external_data")) { # use all .se and .clarion files specified in external_data From 0693ff2123feed88a1bb76627e0bdcf53a976cd8 Mon Sep 17 00:00:00 2001 From: Jens Preussner Date: Mon, 14 Oct 2019 13:54:47 +0200 Subject: [PATCH 6/6] Fixed bugs from changed wording --- wilson-basic/app.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wilson-basic/app.R b/wilson-basic/app.R index 18b56d6..283fe57 100755 --- a/wilson-basic/app.R +++ b/wilson-basic/app.R @@ -563,9 +563,9 @@ server <- function(session, input, output) { output$fileLoader <- renderUI({ shiny::req(input$data_origin) - if (input$data_origin == "Examples") { + if (input$data_origin == "Select from list") { return(selectizeInput(inputId = "fileLoader", label = "Select data set", choices = load, selected = input$fileLoader)) - } else if (input$data_origin == "Upload") { + } else if (input$data_origin == "Upload file") { return(fileInput(inputId = "fileLoader2", label = "Upload clarion file", accept = c(".se", ".clarion"))) } }) @@ -574,19 +574,19 @@ server <- function(session, input, output) { last_upload <- reactiveVal(value = "") # returns filepath file_path <- eventReactive({ - if (isTruthy(input$fileLoader) && input$data_origin == "Examples") { + if (isTruthy(input$fileLoader) && input$data_origin == "Select from list") { return(TRUE) - } else if (isTruthy(input$fileLoader2$datapath) && input$data_origin == "Upload" && input$fileLoader2$datapath != isolate(last_upload())) { + } else if (isTruthy(input$fileLoader2$datapath) && input$data_origin == "Upload file" && input$fileLoader2$datapath != isolate(last_upload())) { last_upload(input$fileLoader2$datapath) return(TRUE) } }, { - if (input$data_origin == "Examples") { + if (input$data_origin == "Select from list") { shiny::req(input$fileLoader) return(list(path = input$fileLoader, name = input$fileLoader)) - } else if (input$data_origin == "Upload") { + } else if (input$data_origin == "Upload file") { shiny::req(input$fileLoader2$datapath) # copy for debugging