Mercurial > repos > mingchen0919 > rmarkdown_fastqc_report
comparison fastqc_report_render.R @ 15:d1d20f341632 draft
fastqc_report v2.0.0
author | mingchen0919 |
---|---|
date | Thu, 19 Oct 2017 00:11:14 -0400 |
parents | 2efa46ce2c4c |
children | 1710b0e874f1 |
comparison
equal
deleted
inserted
replaced
14:2efa46ce2c4c | 15:d1d20f341632 |
---|---|
38 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 38 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
39 args_list=list() | 39 args_list=list() |
40 ##------- 1. input data --------------------- | 40 ##------- 1. input data --------------------- |
41 args_list$ECHO = c('echo', 'e', '1', 'character') | 41 args_list$ECHO = c('echo', 'e', '1', 'character') |
42 args_list$READS = c('reads', 'r', '1', 'character') | 42 args_list$READS = c('reads', 'r', '1', 'character') |
43 args_list$NAMES = c('names', 'n', '1', 'character') | |
43 ##--------2. output report and outputs -------------- | 44 ##--------2. output report and outputs -------------- |
44 args_list$REPORT_HTML = c('report_html', 'r', '1', 'character') | 45 args_list$REPORT_HTML = c('report_html', 'o', '1', 'character') |
45 args_list$REPORT_DIR = c('report_dir', 'd', '1', 'character') | 46 args_list$REPORT_DIR = c('report_dir', 'd', '1', 'character') |
46 args_list$SINK_MESSAGE = c('sink_message', 's', '1', 'character') | 47 args_list$SINK_MESSAGE = c('sink_message', 's', '1', 'character') |
47 ##--------3. .Rmd templates in the tool directory ---------- | 48 ##--------3. .Rmd templates in the tool directory ---------- |
48 args_list$FASTQC_REPORT_RMD = c('fastqc_report_rmd', 't', '1', 'character') | 49 args_list$FASTQC_REPORT_RMD = c('fastqc_report_rmd', 'p', '1', 'character') |
49 ##----------------------------------------------------------- | 50 ##----------------------------------------------------------- |
50 opt = getopt(t(as.data.frame(args_list))) | 51 opt = getopt(t(as.data.frame(args_list))) |
51 | 52 |
52 | 53 |
53 | 54 |
66 }) %>% | 67 }) %>% |
67 (function(x) { | 68 (function(x) { |
68 gsub('READS', opt$reads, x) | 69 gsub('READS', opt$reads, x) |
69 }) %>% | 70 }) %>% |
70 (function(x) { | 71 (function(x) { |
71 gsub('REPORT_DIR', opt$output_dir, x) | 72 gsub('REPORT_DIR', opt$report_dir, x) |
72 }) %>% | 73 }) %>% |
73 (function(x) { | 74 (function(x) { |
74 fileConn = file('fastqc_report.Rmd') | 75 fileConn = file('fastqc_report.Rmd') |
75 writeLines(x, con=fileConn) | 76 writeLines(x, con=fileConn) |
76 close(fileConn) | 77 close(fileConn) |