Mercurial > repos > mingchen0919 > elastic_r_tidyverse
comparison elastic_r_package_wrappers_macros.xml @ 9:06f38d3febdc draft default tip
planemo upload
author | mingchen0919 |
---|---|
date | Wed, 28 Mar 2018 23:34:03 -0400 |
parents | ea3271940757 |
children |
comparison
equal
deleted
inserted
replaced
8:ea3271940757 | 9:06f38d3febdc |
---|---|
12 description="Check the tool log output file for more details."/> | 12 description="Check the tool log output file for more details."/> |
13 </stdio> | 13 </stdio> |
14 </xml> | 14 </xml> |
15 | 15 |
16 <xml name="function_components"> | 16 <xml name="function_components"> |
17 <repeat name="function_component_repeat" title="Call a function" min="1" default="1"> | 17 <repeat name="function_components" title="Call a function" min="1" default="1"> |
18 <param type="select" name="function_name" multiple="false" label="==== Call function ===="> | 18 <param type="select" name="function_name" multiple="false" label="==== Call function ===="> |
19 <option value="ggplot" selected="false">ggplot</option> | 19 <option value="ggplot" selected="false">ggplot</option> |
20 <option value="geom_point" selected="false">geom_point</option> | |
20 <option value="aes" selected="false">ggplot</option> | 21 <option value="aes" selected="false">ggplot</option> |
21 <option value="read.table" selected="false">read.table</option> | 22 <option value="read.table" selected="false">read.table</option> |
22 <option value="write.csv" selected="false">write.csv</option> | 23 <option value="write.csv" selected="false">write.csv</option> |
23 </param> | 24 </param> |
24 <expand macro="function_arguments" /> | 25 <expand macro="function_arguments" /> |
25 <param type="select" name="operator" label="connect to next function"> | |
26 <option value="%>%" selected="false">pipe (%>%)</option> | |
27 <option value="+" selected="false">plus (+)</option> | |
28 </param> | |
29 </repeat> | 26 </repeat> |
30 </xml> | 27 </xml> |
31 | 28 |
32 <xml name="function_arguments"> | 29 <xml name="function_arguments"> |
33 <repeat name="regular_argument_value" title="Argument value: from user input" min="0" default="0"> | 30 <repeat name="function_arguments" title="argument name/value pairs" min="0" default="0"> |
34 <param type="text" name="argument" label="argument" /> | 31 <conditional name="argument_type"> |
35 <param type="text" name="argument_value" label="argument value" /> | 32 <param name="argument_type_selector" type="select" label="Argument type"> |
36 <param type="select" name="argument_type" label="argument type"> | 33 <option value="value" selected="false">user input value</option> |
37 <option value="string" selected="true">string</option> | 34 <option value="rdata" selected="false">value from RData output</option> |
38 <option value="numeric" selected="false">numeric</option> | 35 </param> |
39 <option value="boolean" selected="false">boolean</option> | 36 <when value="value"> |
40 <option value="variable" selected="false">variable</option> | 37 <param type="text" name="argument_name" label="argument name" /> |
41 </param> | 38 <param type="text" name="argument_value" label="argument value" /> |
39 </when> | |
40 <when value="rdata"> | |
41 <param type="text" name="argument_name" label="argument name" /> | |
42 <param type="data" format="rdata" name="argument_value" optional="false" label="RData output" /> | |
43 </when> | |
44 </conditional> | |
42 </repeat> | 45 </repeat> |
43 <repeat name="rdata_argument_value" title="Argument value: from RData" min="0" default="0"> | 46 <param type="select" name="operator" label="connect to next function"> |
44 <param type="text" name="argument" label="argument" /> | 47 <sanitizer> |
45 <param type="data" format="rdata" name="argument_value" optional="false" label="RData output" /> | 48 <valid initial="string.printable"/> |
46 </repeat> | 49 </sanitizer> |
50 <option value="%>%" selected="true">pipe (%>%)</option> | |
51 <option value="+" selected="false">plus (+)</option> | |
52 </param> | |
47 </xml> | 53 </xml> |
48 | 54 |
49 | 55 |
50 <!--output set--> | 56 <!--output set--> |
51 <xml name="output_set"> | 57 <xml name="output_set"> |
52 <data format="html" name="report" label="${tool.name} report"/> | 58 <data format="html" name="report" label="${tool.name} report"/> |
53 <data format="txt" name="tool_help_doc" label="${tool.name} help doc"/> | 59 <data format="rdata" name="tool_rdata_output" label="${tool.name} RData output ${on_string}"/> |
54 <data format="txt" name="tool_log" label="${tool.name} log" /> | 60 <data format="txt" name="tool_log" label="${tool.name} log" /> |
55 </xml> | 61 </xml> |
56 | 62 |
57 | 63 |
58 <!--shell command fragment--> | 64 <!--shell command fragment--> |
68 | 74 |
69 | 75 |
70 ############ 3. save user inputs into arguments.txt | 76 ############ 3. save user inputs into arguments.txt |
71 | 77 |
72 ############ 3.1 table header | 78 ############ 3.1 table header |
73 echo 'function|input_type|argument|argument_value|argument_value_type|operator' > $report.files_path/arguments.txt && | 79 echo 'row_type|function_name|argument_name|argument_value|argument_value_type|operator' > $report.files_path/arguments.txt && |
74 | 80 |
75 | 81 |
76 ############ 3.2 loop through function component repeat | 82 ############ 3.2 loop through function component repeat |
77 #for $fun_component in $function_components: | 83 #for fun_component in $function_components: |
78 #for reg_arg in $fun_component.regular_argument_value | 84 echo 'func|$fun_component.function_name||||' >> $report.files_path/arguments.txt && |
79 echo '$fun_component.function_name|regular|$reg_arg.argument|$arg_arg.argument_value|$arg_arg.argument_value_type|$fun_component.operator' >> $report.files_path/arguments.txt && | 85 |
86 Rscript -e 'library(tidyverse); help($fun_component.function_name)' >> $report.files_path/$fun_component.function_name-help.txt && | |
87 | |
88 #for argument in $fun_component.function_arguments: | |
89 echo 'argument||$argument.argument_type.argument_name|$argument.argument_type.argument_value|$argument.argument_type.argument_type_selector|' >> $report.files_path/arguments.txt && | |
80 #end for | 90 #end for |
81 | 91 echo 'operator|||||$fun_component.operator' >> $report.files_path/arguments.txt && |
82 #for rdata_arg in $fun_component.rdata_argument_value | 92 #end for |
83 echo '$fun_component.function_name|rdata|$rdata_arg.argument|$arg_arg.argument_value|rdata|$fun_component.operator' >> $report.files_path/arguments.txt && | |
84 #end for | |
85 | 93 |
86 ############ output_set | 94 ############ output_set |
87 ## '$report' | 95 ## '$report' |
88 ## '$report.files_path' | 96 ## '$report.files_path' |
89 ## '$tool_help_doc' | 97 ## '$tool_help_doc' |
90 ## '$tool_log' | 98 ## '$tool_log' |
91 ####################### | 99 ####################### |
92 export REPORT='$report' && | 100 export REPORT='$report' && |
93 export REPORT_FILES_PATH='$report.files_path' && | 101 export REPORT_FILES_PATH='$report.files_path' && |
94 export TOOL_HELP_DOC='$tool_help_doc' && | 102 export TOOL_RDATA_OUTPUT='$tool_rdata_output' && |
95 export TOOL_LOG='$tool_log' && | 103 export TOOL_LOG='$tool_log' && |
96 | 104 |
97 | 105 |
98 ############ run render R script to render R markdowns | 106 ############ run render R script to render R markdowns |
99 Rscript '${__tool_directory__}/elastic_tool_render.R' | 107 Rscript '${__tool_directory__}/elastic_r_package_render.R' |
100 | 108 |
101 ]]></command> | 109 ]]></command> |
102 </xml> | 110 </xml> |
103 | 111 |
104 <!--tool citations--> | 112 <!--tool citations--> |