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