# HG changeset patch # User mingchen0919 # Date 1525147425 14400 # Node ID df6f86eb057e023b1915de8220c709bc04c6387e # Parent 85351cdd4f1994ac1f60c287aab1d6b847433946 planemo upload commit 61448862dc9016969191967aeefb7f7acce1e1f9-dirty diff -r 85351cdd4f19 -r df6f86eb057e expose-outputs-to-galaxy-history.sh --- a/expose-outputs-to-galaxy-history.sh Mon Apr 30 16:40:21 2018 -0400 +++ b/expose-outputs-to-galaxy-history.sh Tue May 01 00:03:45 2018 -0400 @@ -2,4 +2,10 @@ cd ${REPORT_FILES_PATH} # copy outputs from tool outputs directory to corresponding galaxy output path -cp fastqc.html ${REPORT} \ No newline at end of file +if [ -e "rmarkdown_report.html" ]; then + cp rmarkdown_report.html ${REPORT} +fi + +if [ -e "index.html" ]; then + cp index.html ${REPORT} +fi diff -r 85351cdd4f19 -r df6f86eb057e rmarkdown_report.Rmd --- a/rmarkdown_report.Rmd Mon Apr 30 16:40:21 2018 -0400 +++ b/rmarkdown_report.Rmd Tue May 01 00:03:45 2018 -0400 @@ -1,11 +1,16 @@ --- -title: 'Short reads evaluation with [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)' +title: '[FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) report' output: html_document: highlight: pygments --- -```{css} + +```{r setup, include=FALSE, warning=FALSE, message=FALSE} +knitr::opts_chunk$set(error = TRUE, echo = FALSE) +``` + +```{css, echo=FALSE} pre code, pre, code { white-space: pre !important; overflow-x: scroll !important; @@ -14,11 +19,6 @@ } ``` -```{r setup, include=FALSE, warning=FALSE, message=FALSE} -knitr::opts_knit$set(progress = FALSE) -knitr::opts_chunk$set(error = TRUE, echo = FALSE) -``` - ```{r, echo=FALSE} # to make the css theme to work, tags cannot be added directly # as tags as below. diff -r 85351cdd4f19 -r df6f86eb057e rmarkdown_report.xml --- a/rmarkdown_report.xml Mon Apr 30 16:40:21 2018 -0400 +++ b/rmarkdown_report.xml Tue May 01 00:03:45 2018 -0400 @@ -35,8 +35,6 @@ export REPORT='$report' && export REPORT_FILES_PATH='$report.files_path' && - ############ copy jstree directory cp -r ${__tool_directory__}/vakata-jstree-3.3.5 ./ && - ############ create a hidden file to store r markdown rendering log touch $report.files_path/.r_rendering.log.txt && diff -r 85351cdd4f19 -r df6f86eb057e rmarkdown_report_render.R --- a/rmarkdown_report_render.R Mon Apr 30 16:40:21 2018 -0400 +++ b/rmarkdown_report_render.R Tue May 01 00:03:45 2018 -0400 @@ -13,6 +13,12 @@ library('getopt') library('rmarkdown') library('htmltools') +library('plyr') +library('dplyr') +library('stringr') +library('DT') +library('reshape2') +library('plotly') #------------------------------------------------------------------ options(stringsAsFactors = FALSE) @@ -104,7 +110,7 @@ # import getopt specification matrix from a csv file -opt = getopt(getopt_specification_matrix('command_line_arguments.csv', +opt = getopt(getopt_specification_matrix('command-line-arguments.csv', tool_dir = Sys.getenv('TOOL_INSTALL_DIR'))) # define environment variables for all input values. this is useful when we # want to use input values by other programming language in r markdown @@ -131,28 +137,26 @@ # render a single html system(command = 'cp -r ${TOOL_INSTALL_DIR}/rmarkdown_report.Rmd ${REPORT_FILES_PATH}') # add a few lines to 'rmarkdown_report.Rmd' to generate file tree outputs - jstree_lines = ' - - ## Outputs + jstree_lines = +' +## Outputs - ```{r, echo=FALSE} - # create a div container to store the file tree interface - library(htmltools) - tags$div( - id="jstree", - file_tree(Sys.getenv(\'REPORT_FILES_PATH\')) +```{r, echo=FALSE} +tags$div(id="jstree", file_tree(Sys.getenv(\'REPORT_FILES_PATH\'))) +``` +' + write( + x = jstree_lines, + append = TRUE, + file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/rmarkdown_report.Rmd') ) - ``` - ' - write(x = jstree_lines, append = TRUE, - file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/rmarkdown_report.Rmd')) render(input = paste0(Sys.getenv('REPORT_FILES_PATH'), '/rmarkdown_report.Rmd')) } #=============================================================== #============== expose outputs to galaxy history =============== -system(command = 'sh ${TOOL_INSTALL_DIR}/expose-outputs.sh') +system(command = 'sh ${TOOL_INSTALL_DIR}/expose-outputs-to-galaxy-history.sh') #===============================================================