Mercurial > repos > mingchen0919 > rmarkdown_samtools_flagstat
diff rmarkdown_samtools_flagstat_render.R @ 4:ec39bfeaf496 draft
update
author | mingchen0919 |
---|---|
date | Wed, 27 Dec 2017 15:14:47 -0500 |
parents | a0f0effea707 |
children | 1c16536c70f5 |
line wrap: on
line diff
--- a/rmarkdown_samtools_flagstat_render.R Wed Dec 27 12:03:33 2017 -0500 +++ b/rmarkdown_samtools_flagstat_render.R Wed Dec 27 15:14:47 2017 -0500 @@ -2,6 +2,7 @@ library(rmarkdown) library(htmltools) library(dplyr) +library(stringr) ##============ Sink warnings and errors to a file ============== ## use the sink() function to wrap all code within it. @@ -58,10 +59,10 @@ gsub('ECHO', opt$echo, x) }) %>% (function(x) { - gsub('REPORT_DIR', opt$output_dir, x) + gsub('REPORT_DIR', opt$report_dir, x) }) %>% (function(x) { - fileConn = file('tool_template.Rmd') + fileConn = file('rmarkdown_samtools_flagstat.Rmd') writeLines(x, con=fileConn) close(fileConn) }) @@ -70,7 +71,7 @@ ##=============STEP 4: render .Rmd templates================= ## ##=========================================================== - render('tool_template.Rmd', output_file = opt$report_html) + render('rmarkdown_samtools_flagstat.Rmd', output_file = opt$report_html) ##--------end of code rendering .Rmd templates----------------