annotate fastq_dump_pe_render.R @ 15:627c487d22e3 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 17:05:22 -0400
parents 66bc1016ec2a
children 883f102eb227
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
1 ##======= Handle arguments from command line ========
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
2 # setup R error handline to go to stderr
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
3 options(show.error.messages=FALSE,
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
4 error=function(){
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
5 cat(geterrmessage(), file=stderr())
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
6 quit("no", 1, F)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
7 })
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
8
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
9 # we need that to not crash galaxy with an UTF8 error on German LC settings.
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
10 loc = Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
11
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
12 # suppress warning
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
13 options(warn = -1)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
14
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
15 options(stringsAsFactors=FALSE, useFancyQuotes=FALSE)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
16 args = commandArgs(trailingOnly=TRUE)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
17
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
18 suppressPackageStartupMessages({
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
19 library(getopt)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
20 library(tools)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
21 })
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
22
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
23 #/////////////////////// SINK WARNINGS AND ERRORS TO A FILE FOR DEBUGGING ///////////
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
24 zz = file('warnings_and_errors.txt')
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
25 sink(zz)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
26 sink(zz, type = 'message')
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
27
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
28 # column 1: the long flag name
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
29 # column 2: the short flag alias. A SINGLE character string
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
30 # column 3: argument mask
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
31 # 0: no argument
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
32 # 1: argument required
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
33 # 2: argument is optional
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
34 # column 4: date type to which the flag's argument shall be cast.
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
35 # possible values: logical, integer, double, complex, character.
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
36 ##------- 1. input data ---------------------
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
37 spec_list=list()
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
38 spec_list$SRA_ACCESSION = c('sra_accession', 'i', '1', 'character')
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
39 spec_list$FORMAT = c('format', 'f', '1', 'character')
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
40 spec_list$ECHO = c('echo', 'e', '1', 'character')
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
41 ##--------2. output report and outputs --------------
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
42 spec_list$REPORT_HTML = c('report_html', 'r', '1', 'character')
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
43 spec_list$OUTPUT_DIR = c('output_dir', 'd', '1', 'character')
13
66bc1016ec2a planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 11
diff changeset
44 spec_list$SINK_OUTPUT = c('sink_message', 's', '1', 'character')
11
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
45 ##--------3. Rmd templates in the tool directory ----------
15
627c487d22e3 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 13
diff changeset
46 spec_list$FASTQ_DUMP_PE_RMD = c('fastq_dump_pe_rmd', 't', '1', 'character')
11
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
47
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
48 spec = t(as.data.frame(spec_list))
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
49 opt = getopt(spec)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
50
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
51 #------ Load libraries ---------
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
52 library(rmarkdown)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
53 library(htmltools)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
54 library(dplyr)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
55
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
56 #----- 1. create the report directory ------------------------
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
57 system(paste0('mkdir -p ', opt$output_dir))
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
58
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
59 #----- 2. generate Rmd files with Rmd templates --------------
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
60 # a. templates without placeholder variables:
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
61 # copy templates from tool directory to the working directory.
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
62 # b. templates with placeholder variables:
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
63 # substitute variables with user input values and place them in the working directory.
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
64
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
65 #----- 01 fastq_dump_pe.Rmd -----------------------
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
66 readLines(opt$fastq_dump_pe_rmd) %>%
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
67 (function(x) {
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
68 gsub('SRA_ACCESSION', opt$sra_accession, x)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
69 }) %>%
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
70 (function(x) {
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
71 gsub('FORMAT', opt$format, x)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
72 }) %>%
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
73 (function(x) {
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
74 gsub('ECHO', opt$echo, x)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
75 }) %>%
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
76 (function(x) {
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
77 gsub('OUTPUT_DIR', opt$output_dir, x)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
78 }) %>%
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
79 (function(x) {
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
80 fileConn = file('fastq_dump_pe.Rmd')
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
81 writeLines(x, con=fileConn)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
82 close(fileConn)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
83 })
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
84
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
85 #------ 3. render all Rmd files --------
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
86 render('fastq_dump_pe.Rmd', output_file = opt$report_html)
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
87
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
88
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
89 #-------4. manipulate outputs -----------------------------
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
90
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
91
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
92
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
93
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
94
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
95 sink()
d4a9c31d0046 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit affb362adeb095389646b0c51738d24c2de3838d-dirty
mingchen0919
parents: 0
diff changeset
96 #/////////// END OF SINK OUTPUT ///////////////////////////