Mercurial > repos > mingchen0919 > rmarkdown_fastqc_site
annotate fastqc_site_render.R @ 7:d820be692d74 draft
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
author | mingchen0919 |
---|---|
date | Tue, 08 Aug 2017 12:36:13 -0400 |
parents | |
children | 507eec497730 |
rev | line source |
---|---|
7
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
1 ##======= Handle arguments from command line ======== |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
2 # setup R error handline to go to stderr |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
3 options(show.error.messages=FALSE, |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
4 error=function(){ |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
5 cat(geterrmessage(), file=stderr()) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
6 quit("no", 1, F) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
7 }) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
8 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
9 # we need that to not crash galaxy with an UTF8 error on German LC settings. |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
10 loc = Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
11 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
12 # suppress warning |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
13 options(warn = -1) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
14 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
15 options(stringsAsFactors=FALSE, useFancyQuotes=FALSE) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
16 args = commandArgs(trailingOnly=TRUE) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
17 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
18 suppressPackageStartupMessages({ |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
19 library(getopt) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
20 library(tools) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
21 }) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
22 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
23 # column 1: the long flag name |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
24 # column 2: the short flag alias. A SINGLE character string |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
25 # column 3: argument mask |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
26 # 0: no argument |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
27 # 1: argument required |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
28 # 2: argument is optional |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
29 # column 4: date type to which the flag's argument shall be cast. |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
30 # possible values: logical, integer, double, complex, character. |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
31 spec_list=list() |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
32 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
33 ##------- 1. input data --------------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
34 spec_list$READS = c('reads', 'r', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
35 spec_list$ECHO = c('echo', 'e', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
36 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
37 ##--------2. output report and report site directory -------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
38 spec_list$FASTQC_SITE = c('fastqc_site', 'o', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
39 spec_list$FASTQC_SITE_DIR = c('fastqc_site_dir', 'd', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
40 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
41 ##--------3. Rmd templates sitting in the tool directory ---------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
42 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
43 ## _site.yml and index.Rmd files |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
44 spec_list$SITE_YML = c('site_yml', 's', 1, 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
45 spec_list$INDEX_Rmd = c('index_rmd', 'i', 1, 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
46 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
47 ## other Rmd body template files |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
48 spec_list$x01 = c('x01_evaluation_overview', 'p', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
49 spec_list$x02 = c('x02_fastqc_original_reports', 'a', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
50 spec_list$x1 = c('x1_per_base_quality_scores', 'b', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
51 spec_list$x2 = c('x2_per_base_N_content', 'c', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
52 spec_list$x3 = c('x3_per_sequence_quality_scores', 'f', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
53 spec_list$x4 = c('x4_per_sequence_GC_content', 'g', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
54 spec_list$x5 = c('x5_per_base_sequence_content', 'h', '1', 'character') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
55 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
56 ##------------------------------------------------------------------ |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
57 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
58 spec = t(as.data.frame(spec_list)) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
59 opt = getopt(spec) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
60 # arguments are accessed by long flag name (the first column in the spec matrix) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
61 # NOT by element name in the spec_list |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
62 # example: opt$help, opt$expression_file |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
63 ##====== End of arguments handling ========== |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
64 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
65 #------ Load libraries --------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
66 library(rmarkdown) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
67 library(plyr) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
68 library(stringr) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
69 library(dplyr) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
70 library(highcharter) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
71 library(DT) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
72 library(reshape2) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
73 library(plotly) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
74 library(formattable) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
75 library(htmltools) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
76 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
77 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
78 #----- 1. create the report directory ------------------------ |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
79 paste0('mkdir -p ', opt$fastqc_site_dir) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
80 system() |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
81 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
82 #----- 2. generate Rmd files with Rmd templates -------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
83 # a. templates without placeholder variables: |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
84 # copy templates from tool directory to the working directory. |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
85 # b. templates with placeholder variables: |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
86 # substitute variables with user input values and place them in the working directory. |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
87 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
88 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
89 #----- Copy index.Rmd and _site.yml files to job working direcotry ----- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
90 file.copy(opt$index_rmd, 'index.Rmd', recursive=TRUE) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
91 file.copy(opt$site_yml, '_site.yml', recursive=TRUE) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
92 #--------------------------------------------------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
93 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
94 #----- 01_evaluation_overview.Rmd ----------------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
95 readLines(opt$x01_evaluation_overview) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
96 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
97 gsub('ECHO', opt$echo, x) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
98 }) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
99 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
100 gsub('READS', opt$reads, x) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
101 }) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
102 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
103 gsub('REPORT_OUTPUT_DIR', opt$fastqc_site_dir, x) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
104 }) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
105 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
106 fileConn = file('01_evaluation_overview.Rmd') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
107 writeLines(x, con=fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
108 close(fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
109 }) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
110 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
111 #----- 1_per_base_quality_scores.Rmd -------------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
112 readLines(opt$x1_per_base_quality_scores) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
113 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
114 gsub('ECHO', opt$echo, x) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
115 }) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
116 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
117 fileConn = file('1_per_base_quality_scores.Rmd') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
118 writeLines(x, con=fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
119 close(fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
120 }) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
121 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
122 #----- 2_per_base_N_content.Rmd ------------------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
123 readLines(opt$x2_per_base_N_content) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
124 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
125 gsub('ECHO', opt$echo, x) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
126 }) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
127 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
128 fileConn = file('2_per_base_N_content.Rmd') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
129 writeLines(x, con=fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
130 close(fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
131 }) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
132 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
133 #----- 3_per_sequence_quality_scores.Rmd ---------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
134 readLines(opt$x3_per_sequence_quality_scores) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
135 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
136 gsub('ECHO', opt$echo, x) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
137 }) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
138 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
139 fileConn = file('3_per_sequence_quality_scores.Rmd') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
140 writeLines(x, con=fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
141 close(fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
142 }) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
143 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
144 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
145 #----- 4_per_sequence_GC_content.Rmd -------------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
146 readLines(opt$x4_per_sequence_GC_content) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
147 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
148 gsub('ECHO', opt$echo, x) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
149 }) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
150 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
151 fileConn = file('4_per_sequence_GC_content.Rmd') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
152 writeLines(x, con=fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
153 close(fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
154 }) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
155 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
156 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
157 #----- 5_per_base_sequence_content.Rmd ------------------ |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
158 readLines(opt$x5_per_base_sequence_content) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
159 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
160 gsub('ECHO', opt$echo, x) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
161 }) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
162 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
163 fileConn = file('5_per_base_sequence_content.Rmd') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
164 writeLines(x, con=fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
165 close(fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
166 }) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
167 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
168 #----- 02_fastqc_original_reports.Rmd ------------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
169 readLines(opt$x02_fastqc_original_reports) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
170 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
171 gsub('ECHO', opt$echo, x) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
172 }) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
173 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
174 gsub('REPORT_OUTPUT_DIR', opt$fastqc_site_dir, x) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
175 }) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
176 (function(x) { |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
177 fileConn = file('02_fastqc_original_reports.Rmd') |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
178 writeLines(x, con=fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
179 close(fileConn) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
180 }) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
181 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
182 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
183 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
184 #------ 3. render all Rmd files with render_site() -------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
185 render_site() |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
186 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
187 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
188 #-------4. manipulate outputs ----------------------------- |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
189 # a. copy index.html to the report output path |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
190 # b. copy all files in 'my_site' to the report output directory |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
191 file.copy('my_site/index.html', opt$fastqc_site, recursive=TRUE) |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
192 paste0('cp -r my_site/* ', opt$fastqc_site_dir) %>% |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
193 system() |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
194 |
d820be692d74
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit d91f269e8bc09a488ed2e005122bbb4a521f44a0-dirty
mingchen0919
parents:
diff
changeset
|
195 |