diff dynamic_tool_wrappers_macros.xml @ 2:a9579c344a90 draft default tip

planemo upload commit 8f84e3911c6ff4103c0ad5fb8dd774f80d9b2559
author mingchen0919
date Fri, 23 Mar 2018 21:50:16 -0400
parents ddc3c3527f49
children
line wrap: on
line diff
--- a/dynamic_tool_wrappers_macros.xml	Fri Mar 23 02:01:52 2018 -0400
+++ b/dynamic_tool_wrappers_macros.xml	Fri Mar 23 21:50:16 2018 -0400
@@ -22,41 +22,46 @@
 
     <!--OPTION/ARGUMENT PAIRS and INPUT types-->
     <!--input files-->
-    <xml name="option_argument_one_dataset">
-        <repeat name="option_argument_one_dataset_repeat" title="OPTION and ARGUMENT: input one dataset" min="0" default="0">
+    <xml name="option_argument_single_dataset">
+        <repeat name="option_argument_single_dataset_repeat" title="INPUT SINGLE DATASET" min="0" default="0">
             <param type="text" name="flag" optional="true" label="flag" />
-            <param name="value" type="data" optional="true" multiple="false" label="value"/>
+            <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="OPTION and ARGUMENT: input multiple datasets" min="0" default="0">
+        <repeat name="option_argument_multiple_datasets_repeat" title="INPUT MULTIPLE DATASETS" min="0" default="0">
             <param type="text" name="flag" optional="true" label="flag" />
-            <param name="value" type="data" optional="true" multiple="true" label="value" />
+            <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>
-    <xml name="option_argument_path_relative_to_upstream_tool">
-        <repeat name="option_argument_path_relative_to_upstream_tool_repeat" title="OPTION and ARGUMENT: path relative to upstream tool" min="0" default="0">
+    
+    <!--input path-->
+    <xml name="option_argument_path_relative_to_a_tool">
+        <repeat name="option_argument_path_relative_to_a_tool_repeat" title="INPUT PATH: path relative to a tool" min="0" default="0">
             <param type="text" name="flag" optional="true" label="flag"  />
-            <param name="upstream_tool_output_dir" type="data" optional="true" multiple="false" label="upstream tool output directory"/>
+            <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>
-
-    <!--input values: string, float and integer-->
-    <xml name="option_argument_string">
-        <repeat name="option_argument_string_repeat" title="OPTION and ARGUMENT: input string" min="0" default="0">
-            <param type="text" name="flag" label="flag"  />
-            <param type="text" name="value"  label="value"  />
+    <xml name="option_argument_path_relative_to_this_tool">
+        <repeat name="option_argument_path_relative_to_this_tool_repeat" title="INPUT PATH: path relative to this tool" 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>
-    <xml name="option_argument_float">
-        <repeat name="option_argument_float_repeat" title="OPTION and ARGUMENT: input float" min="0" default="0">
-            <param type="text" name="flag" label="flag"  />
-            <param type="text" name="value" label="value"  />
-        </repeat>
-    </xml>
-    <xml name="option_argument_integer">
-        <repeat name="option_argument_integer_repeat" title="OPTION and ARGUMENT: input integer" min="0" default="0">
+    
+    <!--input values: string, float and integer-->
+    <xml name="option_argument_string_float_integer">
+        <repeat name="option_argument_string_float_integer_repeat" title="INPUT VALUE: string/float/integer" min="0" default="0">
             <param type="text" name="flag" label="flag"  />
             <param type="text" name="value"  label="value"  />
         </repeat>
@@ -90,54 +95,47 @@
         #########################
 
         ## first line will be the header
-        echo 'type|flag|value' > options_and_arguments.txt &&
+        echo 'type|flag|value|path_type' > options_and_arguments.txt &&
 
         ############ tool_name
         ##-t '$tool_name'
-        echo "tool_name|tool_flag|${tool_name}" >> options_and_arguments.txt &&
+        echo "tool_name|not available|${tool_name}|not available" >> options_and_arguments.txt &&
 
         ####################################################
         ## loop through repeats to get option/argument pairs
         ####################################################
 
-        ############ option_argument_one_dataset
-        #for i in $option_argument_one_dataset_repeat:
-            #set $item = 'one_dataset|' + str($i.flag) + "|" + str($i.value)
+        ############ option_argument_single_dataset
+        #for i in $option_argument_single_dataset_repeat:
+            #set $item = 'single_dataset|' + str($i.flag) + "|" + str($i.value) + "|"
             echo '$item' >> 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)
+            #set $item = 'multiple_datasets|' + str($i.flag) + "|" + str($i.value).replace(',', str($i.delimiter)) + "|"
             echo '$item' >> options_and_arguments.txt &&
         #end for
 
-        ############ option_argument_path_relative_to_upstream_tool
-        #for i in $option_argument_path_relative_to_upstream_tool_repeat:
-             #set $item = 'path_relative_to_upstream_tool|' + str($i.flag) + "|" + str($i.value)
+
+        ############ 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' >> options_and_arguments.txt &&
         #end for
 
-        ############ option_argument_string
-        #for i in $option_argument_string_repeat:
-             #set $item = 'string|' + str($i.flag) + "|" + str($i.value)
+        ############ 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' >> options_and_arguments.txt &&
         #end for
 
-        ############ option_argument_float
-        #for i in $option_argument_float_repeat:
-             #set $item = 'float|' + str($i.flag) + "|" + str($i.value)
+        ############ 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' >> options_and_arguments.txt &&
         #end for
 
-
-        ############ option_argument_integer
-        #for i in $option_argument_integer_repeat:
-             #set $item = 'integer|' + str($i.flag) + "|" + str($i.value)
-             echo '$item' >> options_and_arguments.txt &&
-        #end for
-
-
         ############ output_set
         ## '$report'
         ## '$report.files_path'
@@ -152,9 +150,6 @@
         export TOOL_LOG='$tool_log' &&
 
 
-        ############ save tool files path to a tool output so that it can be accessed from galaxy history
-        echo '$report.files_path' > $tool_output_dir &&
-
         ############ run render R script to render R markdowns
         Rscript '${__tool_directory__}/dynamic_tool_render.R'