comparison dynamic_tool_render.R @ 0:d79569f269c7 draft

planemo upload
author mingchen0919
date Fri, 23 Mar 2018 01:53:24 -0400
parents
children a9579c344a90
comparison
equal deleted inserted replaced
-1:000000000000 0:d79569f269c7
1 ##============ Sink warnings and errors to a file ==============
2 ## use the sink() function to wrap all code within it.
3 ##==============================================================
4 zz = file(Sys.getenv('TOOL_LOG'))
5 sink(zz)
6 sink(zz, type = 'message')
7
8 #------------import libraries--------------------
9 options(stringsAsFactors = FALSE)
10
11 library(getopt)
12 library(rmarkdown)
13 #------------------------------------------------
14
15 #------------------------------------------------
16 options_and_arguments = read.table(paste0(Sys.getenv('REPORT_FILES_PATH'), '/options_and_arguments.txt'),
17 sep = '|', header = TRUE)
18
19
20 #-----------------render Rmd--------------
21 render(paste0(Sys.getenv('TOOL_INSTALL_DIR'), '/dynamic_tool.Rmd'),
22 output_file = Sys.getenv('REPORT'))
23 #------------------------------------------
24
25
26 ##--------end of code rendering .Rmd templates----------------
27 sink()
28 ##=========== End of sinking output=============================