# HG changeset patch
# User mingchen0919
# Date 1506370754 14400
# Node ID ff1cb127967ead1e4fc39c929c0989688a1a3a30
# Parent f5b1f7d4db5364376e7b334cebc75ef45bbe7ff7
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
diff -r f5b1f7d4db53 -r ff1cb127967e collection_list.Rmd
--- a/collection_list.Rmd Mon Sep 25 16:10:27 2017 -0400
+++ b/collection_list.Rmd Mon Sep 25 16:19:14 2017 -0400
@@ -16,22 +16,12 @@
# Command line arguments
-```{r}
+```{r 'command line arguments'}
str(opt)
```
-```{bash 'copy data to working directory'}
-mkdir files_directory
-# Copy uploaded data to the working directory
-for f in $(echo FILE_LIST | sed "s/,/ /g")
-do
- sed "s/.dat/"
- cp $f ./files_directory
-done
-```
-
-```{r}
+```{r 'rename files'}
# create directory
dir.create('./files_directory')
# get full paths of original files
@@ -41,9 +31,10 @@
# get original file names
original_files = list.files('./files_directory')
# create new files names from original file names
-new_files = gsub('\\.dat', '\\.fastqsanger', original_files)
+new_files = gsub('\\.dat', '\\.FORMAT', original_files)
# rename files
file.copy(paste0('./files_directory/', original_files),
paste0('./files_directory/', new_files))
```
+# End
diff -r f5b1f7d4db53 -r ff1cb127967e collection_list.xml
--- a/collection_list.xml Mon Sep 25 16:10:27 2017 -0400
+++ b/collection_list.xml Mon Sep 25 16:19:14 2017 -0400
@@ -14,6 +14,7 @@
Rscript '${__tool_directory__}/collection_list_render.R'
-l $file_list
-e $echo
+ -f $format
-r $report
-d $report.files_path
@@ -24,6 +25,7 @@
+
diff -r f5b1f7d4db53 -r ff1cb127967e collection_list_render.R
--- a/collection_list_render.R Mon Sep 25 16:10:27 2017 -0400
+++ b/collection_list_render.R Mon Sep 25 16:19:14 2017 -0400
@@ -32,6 +32,7 @@
spec_list=list()
spec_list$FILE_LIST = c('file_list', 'l', '1', 'character')
spec_list$ECHO = c('echo', 'e', '1', 'character')
+spec_list$FORMAT = c('echo', 'f', '1', 'character')
##--------2. output report and outputs --------------
spec_list$REPORT = c('report', 'r', '1', 'character')
spec_list$OUTPUT_DIR = c('list_collection_dir', 'd', '1', 'character')
@@ -62,6 +63,9 @@
gsub('ECHO', opt$echo, x)
}) %>%
(function(x) {
+ gsub('FORMAT', opt$echo, x)
+ }) %>%
+ (function(x) {
gsub('FILE_LIST', opt$file_list, x)
}) %>%
(function(x) {