Mercurial > repos > mingchen0919 > elastic_r_tidyverse
changeset 8:ea3271940757 draft
planemo upload
author | mingchen0919 |
---|---|
date | Tue, 27 Mar 2018 23:42:53 -0400 |
parents | 01eaa66fcc2e |
children | 06f38d3febdc |
files | elastic_r_package_wrappers_macros.xml |
diffstat | 1 files changed, 30 insertions(+), 131 deletions(-) [+] |
line wrap: on
line diff
--- a/elastic_r_package_wrappers_macros.xml Tue Mar 27 14:15:12 2018 -0400 +++ b/elastic_r_package_wrappers_macros.xml Tue Mar 27 23:42:53 2018 -0400 @@ -3,7 +3,7 @@ <xml name="rmarkdown_requirements"> <requirement type="package" version="1.15.0.6-0">pandoc</requirement> <requirement type="package" version="1.6">r-rmarkdown</requirement> - <requirement type="package" version="1.2.1">r-tidyverse</requirement> + <requirement type="package" version="1.1.1">r-tidyverse</requirement> </xml> <xml name="stdio"> @@ -15,109 +15,42 @@ <xml name="function_components"> <repeat name="function_component_repeat" title="Call a function" min="1" default="1"> - <expand macro="function_name" /> + <param type="select" name="function_name" multiple="false" label="==== Call function ===="> + <option value="ggplot" selected="false">ggplot</option> + <option value="aes" selected="false">ggplot</option> + <option value="read.table" selected="false">read.table</option> + <option value="write.csv" selected="false">write.csv</option> + </param> <expand macro="function_arguments" /> + <param type="select" name="operator" label="connect to next function"> + <option value="%>%" selected="false">pipe (%>%)</option> + <option value="+" selected="false">plus (+)</option> + </param> </repeat> </xml> - <!--Tool name--> - <xml name="function_name"> - <param type="select" name="function_name" multiple="false" label="==== Call function ===="> - <option value="ggplot" selected="false">ggplot</option> - <option value="aes" selected="false">ggplot</option> - <option value="read.table" selected="false">read.table</option> - <option value="write.csv" selected="false">write.csv</option> - </param> - </xml> - - <!--input values: string, float and integer--> <xml name="function_arguments"> - <repeat name="regular_argument_value" title="--------Argument value: from user input" min="0" default="0"> - <param type="text" name="argument" label="argument" /> - <param type="text" name="argument_value" label="argument value" /> - <param type="select" name="argument_type" label="argument type"> - <option value="string" selected="true">string</option> - <option value="numeric" selected="true">numeric</option> - <option value="boolean" selected="true">boolean</option> - </param> - </repeat> - <repeat name="rdata_argument_value" title="--------Argument value: from RData" min="0" default="0"> - <param type="text" name="argument" label="argument" /> - <param type="data" format="rdata" name="argument_value" optional="false" label="RData output" /> - </repeat> - <repeat name="function_argument_value" title="--------Argument value: from function return" min="0" default="0"> - <param type="text" name="argument" optional="false" label="argument" /> - <expand macro="function_name" /> - <expand macro="nested_function_arguments" /> - </repeat> - <param type="select" name="connect_to_next_function" label="connect to next function"> - <option value="%>%" selected="false">pipe (%>%)</option> - <option value="+" selected="false">plus (+)</option> - </param> - </xml> - - <xml name="nested_function_arguments"> - <repeat name="regular_argument_value" title="--------Argument value: from user input" min="0" default="0"> + <repeat name="regular_argument_value" title="Argument value: from user input" min="0" default="0"> <param type="text" name="argument" label="argument" /> <param type="text" name="argument_value" label="argument value" /> <param type="select" name="argument_type" label="argument type"> <option value="string" selected="true">string</option> - <option value="numeric" selected="true">numeric</option> - <option value="boolean" selected="true">boolean</option> + <option value="numeric" selected="false">numeric</option> + <option value="boolean" selected="false">boolean</option> + <option value="variable" selected="false">variable</option> </param> </repeat> - <repeat name="rdata_argument_value" title="--------Argument value: from RData" min="0" default="0"> + <repeat name="rdata_argument_value" title="Argument value: from RData" min="0" default="0"> <param type="text" name="argument" label="argument" /> - <param type="text" name="argument_value" label="RData output" /> + <param type="data" format="rdata" name="argument_value" optional="false" label="RData output" /> </repeat> </xml> - <!--<!–OPTION/ARGUMENT PAIRS and INPUT types–>--> - <!--<!–input files–>--> - <!--<xml name="option_argument_single_dataset">--> - <!--<repeat name="option_argument_single_dataset_repeat" title="INPUT DATA FROM HISTORY: single data set" min="0" default="0">--> - <!--<param type="text" name="flag" optional="true" label="flag" />--> - <!--<param name="value" type="data" optional="false" multiple="false" label="value"/>--> - <!--</repeat>--> - <!--</xml>--> - - <!--<xml name="option_argument_multiple_datasets">--> - <!--<repeat name="option_argument_multiple_datasets_repeat" title="INPUT DATA FROM HISTORY: multiple data sets" min="0" default="0">--> - <!--<param type="text" name="flag" optional="true" label="flag" />--> - <!--<param name="value" type="data" optional="false" multiple="true" label="value"/>--> - <!--<param type="select" name="delimiter" multiple="false" label="file delimiter">--> - <!--<option value=" " selected="false">space</option>--> - <!--<option value="," selected="false">comma</option>--> - <!--</param>--> - <!--</repeat>--> - <!--</xml>--> - - <!--<!–input path–>--> - <!--<xml name="option_argument_path_relative_to_a_tool">--> - <!--<repeat name="option_argument_path_relative_to_a_tool_repeat" title="INPUT DATA PATH: relative to a tool output directory" min="0" default="0">--> - <!--<param type="text" name="flag" optional="true" label="flag" />--> - <!--<param name="a_tool_output_dir" type="data" optional="false" multiple="false" label="a tool output directory"/>--> - <!--<param type="text" name="value" optional="true" label="value" />--> - <!--</repeat>--> - <!--</xml>--> - <!--<xml name="option_argument_path_relative_to_this_tool">--> - <!--<repeat name="option_argument_path_relative_to_this_tool_repeat" title="OUTPUT PATH: relative to this tool output directory" min="0" default="0">--> - <!--<param type="text" name="flag" optional="true" label="flag" />--> - <!--<param type="text" name="value" optional="false" label="value" />--> - <!--<param type="select" name="path_type" multiple="false" label="path type">--> - <!--<option value="file_path" selected="false">file path</option>--> - <!--<option value="dir_path" selected="false">directory path</option>--> - <!--</param>--> - <!--</repeat>--> - <!--</xml>--> - - <!--output set--> <xml name="output_set"> <data format="html" name="report" label="${tool.name} report"/> <data format="txt" name="tool_help_doc" label="${tool.name} help doc"/> - <data format="txt" name="tool_output_dir" label="${tool.name} output directory"/> <data format="txt" name="tool_log" label="${tool.name} log" /> </xml> @@ -126,73 +59,39 @@ <xml name="shell_command"> <command><![CDATA[ - ############ first, create a directory to store all files + ############ 1. create a directory to store all files mkdir -p $report.files_path && - ############ save the tool installation directory to an environment variable + ############ 2. save the tool installation directory to an environment variable export TOOL_INSTALL_DIR='${__tool_directory__}' && - ######################### - ## - ## save user input option/argument pairs into a file - ## - ######################### - - ## first line will be the header - echo 'type|flag|value|path_type' > $report.files_path/options_and_arguments.txt && - - ############ function_name - ##-t '$function_name' - echo "function_name|not available|${function_name}|not available" >> $report.files_path/options_and_arguments.txt && + ############ 3. save user inputs into arguments.txt - #################################################### - ## loop through repeats to get option/argument pairs - #################################################### - - ############ option_argument_single_dataset - #for i in $option_argument_single_dataset_repeat: - #set $item = 'single_dataset|' + str($i.flag) + "|" + str($i.value) + "|" - echo '$item' >> $report.files_path/options_and_arguments.txt && - #end for - - ############ option_argument_multiple_datasets - #for i in $option_argument_multiple_datasets_repeat: - #set $item = 'multiple_datasets|' + str($i.flag) + "|" + str($i.value).replace(',', str($i.delimiter)) + "|" - echo '$item' >> $report.files_path/options_and_arguments.txt && - #end for + ############ 3.1 table header + echo 'function|input_type|argument|argument_value|argument_value_type|operator' > $report.files_path/arguments.txt && - ############ option_argument_path_relative_to_a_tool - #for i in $option_argument_path_relative_to_a_tool_repeat: - #set $item = 'path_relative_to_a_tool|' + str($i.flag) + "|" + str($i.value) + "|" + str($i.a_tool_output_dir) - echo '$item' >> $report.files_path/options_and_arguments.txt && - #end for + ############ 3.2 loop through function component repeat + #for $fun_component in $function_components: + #for reg_arg in $fun_component.regular_argument_value + 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 && + #end for - ############ option_argument_path_relative_to_this_tool - #for i in $option_argument_path_relative_to_this_tool_repeat: - #set $item = 'path_relative_to_this_tool|' + str($i.flag) + "|" + str($i.value) + "|" + str($i.path_type) - echo '$item' >> $report.files_path/options_and_arguments.txt && - #end for - - ############ option_argument_string_float_integer - #for i in $option_argument_string_float_integer_repeat: - #set $item = 'value|' + str($i.flag) + "|" + str($i.value) + "|" - echo '$item' >> $report.files_path/options_and_arguments.txt && - #end for + #for rdata_arg in $fun_component.rdata_argument_value + echo '$fun_component.function_name|rdata|$rdata_arg.argument|$arg_arg.argument_value|rdata|$fun_component.operator' >> $report.files_path/arguments.txt && + #end for ############ output_set ## '$report' ## '$report.files_path' ## '$tool_help_doc' - ## '$tool_output_dir' ## '$tool_log' ####################### export REPORT='$report' && export REPORT_FILES_PATH='$report.files_path' && export TOOL_HELP_DOC='$tool_help_doc' && - export TOOL_OUTPUT_DIR='$tool_output_dir' && export TOOL_LOG='$tool_log' &&