# HG changeset patch # User mingchen0919 # Date 1528554439 14400 # Node ID b3ea48ff4fe3416ce65c9c29b09442f5a0cb050e # Parent 16b2b7c3606e86534abc3e0703e1cf81fc5158a1 planemo upload commit 9d7c251123a0111cb00bb7c38e58231ea707d21d-dirty diff -r 16b2b7c3606e -r b3ea48ff4fe3 rmarkdown_report_render.R --- a/rmarkdown_report_render.R Mon May 14 14:30:55 2018 -0400 +++ b/rmarkdown_report_render.R Sat Jun 09 10:27:19 2018 -0400 @@ -13,10 +13,12 @@ library('getopt') library('rmarkdown') library('htmltools') -library('ggplot2') +library('plyr') +library('dplyr') +library('stringr') +library('DT') +library('reshape2') library('plotly') -library('DESeq2') -library('pheatmap') #------------------------------------------------------------------ options(stringsAsFactors = FALSE) @@ -94,7 +96,7 @@ lapply(dirs, function(x) { path_end = tail(strsplit(x, '/')[[1]], 1) # hide vakata-jstree-3.3.5 folder - if (path_end != 'vakata-jstree-3.3.5') { + if ( !(path_end %in% c('vakata-jstree-3.3.5', 'rmarkdown_report_files'))) { # x_path = strsplit(x, paste0(output_dir, '/'))[[1]][2] li_item = tags$li(path_end, file_tree(x)) li_item$attribs = list('data-jstree' = '{"icon":"jstree-folder"}') @@ -135,12 +137,14 @@ # 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 = ' + jstree_lines = +' ## Outputs ```{r, echo=FALSE} tags$div(id="jstree", file_tree(Sys.getenv(\'REPORT_FILES_PATH\'))) -```' +``` +' write( x = jstree_lines, append = TRUE,