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