annotate bdss_client_sra_pe_render.R @ 17:246cb7315673 draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
author mingchen0919
date Sat, 14 Oct 2017 12:12:10 -0400
parents 206c59e498e7
children 531c00a2acbf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
1 ##============ Sink warnings and errors to a file ==============
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
2 ## use the sink() function to wrap all code within it.
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
3 ##==============================================================
0
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
4 zz = file('warnings_and_errors.txt')
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
5 sink(zz)
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
6 sink(zz, type = 'message')
17
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
7 ##---------below is the code for rendering .Rmd templates-----
0
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
8
17
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
9 ##=============STEP 1: handle command line arguments==========
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
10 ##
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
11 ##============================================================
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
12 # column 1: the long flag name
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
13 # column 2: the short flag alias. A SINGLE character string
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
14 # column 3: argument mask
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
15 # 0: no argument
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
16 # 1: argument required
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
17 # 2: argument is optional
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
18 # column 4: date type to which the flag's argument shall be cast.
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
19 # possible values: logical, integer, double, complex, character.
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
20 #-------------------------------------------------------------
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
21 #++++++++++++++++++++ Best practice ++++++++++++++++++++++++++
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
22 # 1. short flag alias should match the flag in the command section in the XML file.
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
23 # 2. long flag name can be any legal R variable names
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
24 # 3. two names in args_list can have common string but one name should not be a part of another name.
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
25 # for example, one name is "ECHO", if another name is "ECHO_XXX", it will cause problems.
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
26 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
27 ##------- 1. input data ---------------------
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
28 args_list=list()
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
29 args_list$SRA_ACCESSION = c('sra_accession', 'i', '1', 'character')
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
30 args_list$FORMAT = c('format', 'f', '1', 'character')
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
31 args_list$SRA_BOOLEAN = c('sra_boolean', 'S', '1', 'character')
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
32 args_list$ECHO = c('echo', 'e', '1', 'character')
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
33 ##--------2. output report and outputs --------------
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
34 args_list$REPORT_HTML = c('report_html', 'r', '1', 'character')
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
35 args_list$REPORT_DIR = c('report_dir', 'd', '1', 'character')
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
36 args_list$SINK_OUTPUT = c('sink_message', 's', '1', 'character')
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
37 ##--------3. Rmd templates in the tool directory ----------
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
38 args_list$bdss_client_sra_se_RMD = c('bdss_client_sra_se_rmd', 't', '1', 'character')
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
39
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
40 opt = getopt(t(as.data.frame(args_list)))
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
41
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
42 ##=============STEP 2: loading libraries=====================
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
43 ##
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
44 ##===========================================================
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
45 library(rmarkdown)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
46 library(htmltools)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
47 library(dplyr)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
48 library(RCurl)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
49
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
50 ##=======STEP 3: create report directory (optional)==========
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
51 ##
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
52 ##===========================================================
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
53 dir.create(opt$report_dir)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
54
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
55 ##=STEP 4: replace placeholders in .Rmd with argument values=
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
56 ##
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
57 ##===========================================================
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
58 #++ need to replace placeholders with args values one by one+
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
59 #----- 01 bdss_client_sra_se.Rmd -----------------------
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
60 readLines(opt$bdss_client_sra_se_rmd) %>%
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
61 (function(x) {
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
62 gsub('SRA_ACCESSION', opt$sra_accession, x)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
63 }) %>%
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
64 (function(x) {
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
65 gsub('FORMAT', opt$format, x)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
66 }) %>%
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
67 (function(x) {
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
68 gsub('SRA_BOOLEAN', opt$sra_boolean, x)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
69 }) %>%
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
70 (function(x) {
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
71 gsub('ECHO', opt$echo, x)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
72 }) %>%
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
73 (function(x) {
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
74 gsub('REPORT_DIR', opt$report_dir, x)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
75 }) %>%
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
76 (function(x) {
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
77 fileConn = file('bdss_client_sra_se.Rmd')
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
78 writeLines(x, con=fileConn)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
79 close(fileConn)
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
80 })
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
81
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
82 ##=============STEP 5: render .Rmd templates=================
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
83 ##
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
84 ##===========================================================
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
85 render('bdss_client_sra_se.Rmd', output_file = opt$report_html)
0
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
86
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
87
17
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
88 ##--------end of code rendering .Rmd templates----------------
0
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
89 sink()
17
246cb7315673 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 65f2ce692f3c46ccea55ee47f3c2cb2f8a2bb36f-dirty
mingchen0919
parents: 4
diff changeset
90 ##=========== End of sinking output=============================