annotate collection_list.Rmd @ 3:cb6efa0f0cb6 draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 93b036c66fd754a7af459fa80d3f7f143a68477b-dirty
author mingchen0919
date Mon, 25 Sep 2017 16:33:54 -0400
parents 6be61cb4a1d5
children 63e9500cdeec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
1 ---
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
2 title: 'Collection builder (collection type: list)'
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
3 output:
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
4 html_document:
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
5 number_sections: true
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
6 toc: true
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
7 theme: cosmo
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
8 highlight: tango
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
9 ---
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
10
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
11 ```{r setup, include=FALSE, warning=FALSE, message=FALSE}
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
12 knitr::opts_chunk$set(
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
13 echo = ECHO
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
14 )
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
15 ```
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
16
1
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
17 # Command line arguments
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
18
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
19 ```{r 'command line arguments'}
0
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
20 str(opt)
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
21 ```
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
22
78018b735124 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit ec13349788ea42e106b5ba3fc1a5095ed755e644-dirty
mingchen0919
parents:
diff changeset
23
1
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
24 ```{r 'rename files'}
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
25 # create directory
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
26 dir.create('./files_directory')
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
27 # get full paths of original files
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
28 from_files = strsplit("FILE_LIST", ',')[[1]]
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
29 # copy files to the created directory.
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
30 file.copy(from_files, './files_directory')
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
31 # get original file names
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
32 original_files = list.files('./files_directory')
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
33 # create new files names from original file names
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
34 new_files = gsub('\\.dat', '\\.FORMAT', original_files)
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
35 # rename files
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
36 file.copy(paste0('./files_directory/', original_files),
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
37 paste0('./files_directory/', new_files))
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
38 ```
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
39
6be61cb4a1d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 6df7b8ef3a603f7792ed5815ff324ede8a7b2b0b-dirty
mingchen0919
parents: 0
diff changeset
40 # End
3
cb6efa0f0cb6 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 93b036c66fd754a7af459fa80d3f7f143a68477b-dirty
mingchen0919
parents: 1
diff changeset
41
cb6efa0f0cb6 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 93b036c66fd754a7af459fa80d3f7f143a68477b-dirty
mingchen0919
parents: 1
diff changeset
42 ```{r 'test'}
cb6efa0f0cb6 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 93b036c66fd754a7af459fa80d3f7f143a68477b-dirty
mingchen0919
parents: 1
diff changeset
43 ls()
cb6efa0f0cb6 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 93b036c66fd754a7af459fa80d3f7f143a68477b-dirty
mingchen0919
parents: 1
diff changeset
44 ```
cb6efa0f0cb6 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 93b036c66fd754a7af459fa80d3f7f143a68477b-dirty
mingchen0919
parents: 1
diff changeset
45