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