annotate fastqc_site_render.R @ 2:58f3c3128fdd draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit 9285c2b8ad41a486dde2a87600a6b8267841c8b5-dirty
author mingchen0919
date Tue, 08 Aug 2017 10:40:31 -0400
parents d732d4526c6d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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(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
74 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
75 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
76
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 #----- 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
79 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
80 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
81
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 #----- 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
83 # 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
84 # 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
85 # 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
86 # 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
87
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 #----- 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
90 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
91 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
92 #---------------------------------------------------------
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 #----- 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
95 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
96 (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
97 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
98 }) %>%
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 (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
100 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
101 }) %>%
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 (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
103 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
104 }) %>%
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 (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
106 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
107 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
108 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
109 })
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 #----- 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
112 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
113 (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
114 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
115 }) %>%
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 (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
117 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
118 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
119 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
120 })
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 #----- 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
123 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
124 (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
125 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
126 }) %>%
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 (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
128 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
129 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
130 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
131 })
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 #----- 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
134 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
135 (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
136 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
137 }) %>%
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 (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
139 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
140 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
141 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
142 })
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 #----- 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
146 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
147 (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
148 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
149 }) %>%
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 (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
151 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
152 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
153 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
154 })
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 #----- 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
158 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
159 (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
160 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
161 }) %>%
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 (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
163 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
164 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
165 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
166 })
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 #----- 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
169 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
170 (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
171 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
172 }) %>%
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 (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
174 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
175 }) %>%
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 (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
177 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
178 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
179 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
180 })
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 #------ 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
185 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
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 #-------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
189 # 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
190 # 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
191 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
192 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
193 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
194
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