changeset 46:8dacd341b8b7 draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit b15eec6b208c8a41b8ad8969ab9c6046d7f0b73c-dirty
author mingchen0919
date Tue, 26 Sep 2017 12:10:20 -0400
parents 335e9eb25532
children fb05ca474127
files collection_list.xml collection_list_paired.xml collection_paired.Rmd collection_paired.xml collection_paired_render.R
diffstat 5 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/collection_list.xml	Tue Sep 26 12:04:54 2017 -0400
+++ b/collection_list.xml	Tue Sep 26 12:10:20 2017 -0400
@@ -7,7 +7,7 @@
         <requirement type="package" version="0.5.0">r-dplyr</requirement>
     </requirements>
     <description>
-        Create a 'list' dataset collection from a set of files in Galaxy history.
+        Create a list of datasets collection from files in history.
     </description>
     <stdio>
         <regex match="Execution halted"
--- a/collection_list_paired.xml	Tue Sep 26 12:04:54 2017 -0400
+++ b/collection_list_paired.xml	Tue Sep 26 12:10:20 2017 -0400
@@ -7,7 +7,7 @@
         <requirement type="package" version="0.5.0">r-dplyr</requirement>
     </requirements>
     <description>
-        Create a 'list:paired' dataset collection from a set of files in Galaxy history.
+        Create a list of paired dataset collection from files in history.
     </description>
     <stdio>
         <regex match="Execution halted"
--- a/collection_paired.Rmd	Tue Sep 26 12:04:54 2017 -0400
+++ b/collection_paired.Rmd	Tue Sep 26 12:10:20 2017 -0400
@@ -23,7 +23,7 @@
 # Rename files
 
 ```{r}
-file.copy("FORWARD_INPUT", './files_directory/forward.FORMAT')
-file.copy("REVERSE_INPUT", './files_directory/reverse.FORMAT')
+file.copy("FORWARD_INPUT", './OUTPUT_DIR/forward.FORMAT')
+file.copy("REVERSE_INPUT", './OUTPUT_DIR/reverse.FORMAT')
 ```
 
--- a/collection_paired.xml	Tue Sep 26 12:04:54 2017 -0400
+++ b/collection_paired.xml	Tue Sep 26 12:10:20 2017 -0400
@@ -7,7 +7,7 @@
         <requirement type="package" version="0.5.0">r-dplyr</requirement>
     </requirements>
     <description>
-        Create a 'paired' dataset collection from a set of files in Galaxy history.
+        Create a paired dataset collection from files in history.
     </description>
     <stdio>
         <regex match="Execution halted"
--- a/collection_paired_render.R	Tue Sep 26 12:04:54 2017 -0400
+++ b/collection_paired_render.R	Tue Sep 26 12:10:20 2017 -0400
@@ -35,8 +35,8 @@
 spec_list$ECHO = c('echo', 'e', '1', 'character')
 spec_list$FORMAT = c('format', 'f', '1', 'character')
 ##--------2. output report and outputs --------------
-spec_list$OUTPUT_HTML = c('list_paired_collection_html', 'r', '1', 'character')
-spec_list$OUTPUT_DIR = c('list_paired_collection_dir', 'd', '1', 'character')
+spec_list$OUTPUT_HTML = c('paired_collection_html', 'r', '1', 'character')
+spec_list$OUTPUT_DIR = c('paired_collection_dir', 'd', '1', 'character')
 ##--------3. Rmd templates in the tool directory ----------
 spec_list$LIST_COLLECTION_RMD = c('list_collection_rmd', 't', '1', 'character')
 
@@ -50,7 +50,7 @@
 library(dplyr)
 
 #----- 1. create the report directory ------------------------
-system(paste0('mkdir -p ', opt$list_paired_collection_dir))
+system(paste0('mkdir -p ', opt$paired_collection_dir))
 
 #----- 2. generate Rmd files with Rmd templates --------------
 #   a. templates without placeholder variables:
@@ -73,13 +73,16 @@
     gsub('REVERSE_INPUT', opt$reverse_forward_input, x)
   }) %>%
   (function(x) {
-    fileConn = file('list_paired_collection.Rmd')
+    gsub('OUTPUT_DIR', opt$reverse_forward_input, x)
+  }) %>%
+  (function(x) {
+    fileConn = file('paired_collection.Rmd')
     writeLines(x, con=fileConn)
     close(fileConn)
   })
 
 #------ 3. render all Rmd files --------
-render('list_paired_collection.Rmd', output_file = opt$list_paired_collection_html)
+render('paired_collection.Rmd', output_file = opt$paired_collection_html)
 
 
 #-------4. manipulate outputs -----------------------------