comparison fastq_dump_pe_render.R @ 13:66bc1016ec2a draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
author mingchen0919
date Wed, 27 Sep 2017 16:54:07 -0400
parents d4a9c31d0046
children 627c487d22e3
comparison
equal deleted inserted replaced
12:d330ce2d4663 13:66bc1016ec2a
36 ##------- 1. input data --------------------- 36 ##------- 1. input data ---------------------
37 spec_list=list() 37 spec_list=list()
38 spec_list$SRA_ACCESSION = c('sra_accession', 'i', '1', 'character') 38 spec_list$SRA_ACCESSION = c('sra_accession', 'i', '1', 'character')
39 spec_list$FORMAT = c('format', 'f', '1', 'character') 39 spec_list$FORMAT = c('format', 'f', '1', 'character')
40 spec_list$ECHO = c('echo', 'e', '1', 'character') 40 spec_list$ECHO = c('echo', 'e', '1', 'character')
41 spec_list$SPLIT_FILES = c('split_files', 'p', '1', 'character')
42 ##--------2. output report and outputs -------------- 41 ##--------2. output report and outputs --------------
43 spec_list$REPORT_HTML = c('report_html', 'r', '1', 'character') 42 spec_list$REPORT_HTML = c('report_html', 'r', '1', 'character')
44 spec_list$OUTPUT_DIR = c('output_dir', 'd', '1', 'character') 43 spec_list$OUTPUT_DIR = c('output_dir', 'd', '1', 'character')
45 spec_list$SINK_OUTPUT = c('sink_output', 's', '1', 'character') 44 spec_list$SINK_OUTPUT = c('sink_message', 's', '1', 'character')
46 ##--------3. Rmd templates in the tool directory ---------- 45 ##--------3. Rmd templates in the tool directory ----------
47 spec_list$FASTQ_DUMP_SE_RMD = c('fastq_dump_pe_rmd', 't', '1', 'character') 46 spec_list$FASTQ_DUMP_SE_RMD = c('fastq_dump_pe_rmd', 't', '1', 'character')
48 47
49 spec = t(as.data.frame(spec_list)) 48 spec = t(as.data.frame(spec_list))
50 opt = getopt(spec) 49 opt = getopt(spec)
73 }) %>% 72 }) %>%
74 (function(x) { 73 (function(x) {
75 gsub('ECHO', opt$echo, x) 74 gsub('ECHO', opt$echo, x)
76 }) %>% 75 }) %>%
77 (function(x) { 76 (function(x) {
78 gsub('SPLIT_FILES', opt$split_files, x)
79 }) %>%
80 (function(x) {
81 gsub('OUTPUT_DIR', opt$output_dir, x) 77 gsub('OUTPUT_DIR', opt$output_dir, x)
82 }) %>% 78 }) %>%
83 (function(x) { 79 (function(x) {
84 fileConn = file('fastq_dump_pe.Rmd') 80 fileConn = file('fastq_dump_pe.Rmd')
85 writeLines(x, con=fileConn) 81 writeLines(x, con=fileConn)