Mercurial > repos > mingchen0919 > dynamic_star
comparison 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 |
comparison
equal
deleted
inserted
replaced
1:ddc3c3527f49 | 2:a9579c344a90 |
---|---|
20 </param> | 20 </param> |
21 </xml> | 21 </xml> |
22 | 22 |
23 <!--OPTION/ARGUMENT PAIRS and INPUT types--> | 23 <!--OPTION/ARGUMENT PAIRS and INPUT types--> |
24 <!--input files--> | 24 <!--input files--> |
25 <xml name="option_argument_one_dataset"> | 25 <xml name="option_argument_single_dataset"> |
26 <repeat name="option_argument_one_dataset_repeat" title="OPTION and ARGUMENT: input one dataset" min="0" default="0"> | 26 <repeat name="option_argument_single_dataset_repeat" title="INPUT SINGLE DATASET" min="0" default="0"> |
27 <param type="text" name="flag" optional="true" label="flag" /> | 27 <param type="text" name="flag" optional="true" label="flag" /> |
28 <param name="value" type="data" optional="true" multiple="false" label="value"/> | 28 <param name="value" type="data" optional="false" multiple="false" label="value"/> |
29 </repeat> | 29 </repeat> |
30 </xml> | 30 </xml> |
31 | |
31 <xml name="option_argument_multiple_datasets"> | 32 <xml name="option_argument_multiple_datasets"> |
32 <repeat name="option_argument_multiple_datasets_repeat" title="OPTION and ARGUMENT: input multiple datasets" min="0" default="0"> | 33 <repeat name="option_argument_multiple_datasets_repeat" title="INPUT MULTIPLE DATASETS" min="0" default="0"> |
33 <param type="text" name="flag" optional="true" label="flag" /> | 34 <param type="text" name="flag" optional="true" label="flag" /> |
34 <param name="value" type="data" optional="true" multiple="true" label="value" /> | 35 <param name="value" type="data" optional="false" multiple="true" label="value"/> |
36 <param type="select" name="delimiter" multiple="false" label="file delimiter"> | |
37 <option value=" " selected="false">space</option> | |
38 <option value="," selected="false">comma</option> | |
39 </param> | |
35 </repeat> | 40 </repeat> |
36 </xml> | 41 </xml> |
37 <xml name="option_argument_path_relative_to_upstream_tool"> | 42 |
38 <repeat name="option_argument_path_relative_to_upstream_tool_repeat" title="OPTION and ARGUMENT: path relative to upstream tool" min="0" default="0"> | 43 <!--input path--> |
44 <xml name="option_argument_path_relative_to_a_tool"> | |
45 <repeat name="option_argument_path_relative_to_a_tool_repeat" title="INPUT PATH: path relative to a tool" min="0" default="0"> | |
39 <param type="text" name="flag" optional="true" label="flag" /> | 46 <param type="text" name="flag" optional="true" label="flag" /> |
40 <param name="upstream_tool_output_dir" type="data" optional="true" multiple="false" label="upstream tool output directory"/> | 47 <param name="a_tool_output_dir" type="data" optional="false" multiple="false" label="a tool output directory"/> |
41 <param type="text" name="value" optional="true" label="value" /> | 48 <param type="text" name="value" optional="true" label="value" /> |
42 </repeat> | 49 </repeat> |
43 </xml> | 50 </xml> |
44 | 51 <xml name="option_argument_path_relative_to_this_tool"> |
45 <!--input values: string, float and integer--> | 52 <repeat name="option_argument_path_relative_to_this_tool_repeat" title="INPUT PATH: path relative to this tool" min="0" default="0"> |
46 <xml name="option_argument_string"> | 53 <param type="text" name="flag" optional="true" label="flag" /> |
47 <repeat name="option_argument_string_repeat" title="OPTION and ARGUMENT: input string" min="0" default="0"> | 54 <param type="text" name="value" optional="false" label="value" /> |
48 <param type="text" name="flag" label="flag" /> | 55 <param type="select" name="path_type" multiple="false" label="path type"> |
49 <param type="text" name="value" label="value" /> | 56 <option value="file_path" selected="false">file path</option> |
57 <option value="dir_path" selected="false">directory path</option> | |
58 </param> | |
50 </repeat> | 59 </repeat> |
51 </xml> | 60 </xml> |
52 <xml name="option_argument_float"> | 61 |
53 <repeat name="option_argument_float_repeat" title="OPTION and ARGUMENT: input float" min="0" default="0"> | 62 <!--input values: string, float and integer--> |
54 <param type="text" name="flag" label="flag" /> | 63 <xml name="option_argument_string_float_integer"> |
55 <param type="text" name="value" label="value" /> | 64 <repeat name="option_argument_string_float_integer_repeat" title="INPUT VALUE: string/float/integer" min="0" default="0"> |
56 </repeat> | |
57 </xml> | |
58 <xml name="option_argument_integer"> | |
59 <repeat name="option_argument_integer_repeat" title="OPTION and ARGUMENT: input integer" min="0" default="0"> | |
60 <param type="text" name="flag" label="flag" /> | 65 <param type="text" name="flag" label="flag" /> |
61 <param type="text" name="value" label="value" /> | 66 <param type="text" name="value" label="value" /> |
62 </repeat> | 67 </repeat> |
63 </xml> | 68 </xml> |
64 | 69 |
88 ## save user input option/argument pairs into a file | 93 ## save user input option/argument pairs into a file |
89 ## | 94 ## |
90 ######################### | 95 ######################### |
91 | 96 |
92 ## first line will be the header | 97 ## first line will be the header |
93 echo 'type|flag|value' > options_and_arguments.txt && | 98 echo 'type|flag|value|path_type' > options_and_arguments.txt && |
94 | 99 |
95 ############ tool_name | 100 ############ tool_name |
96 ##-t '$tool_name' | 101 ##-t '$tool_name' |
97 echo "tool_name|tool_flag|${tool_name}" >> options_and_arguments.txt && | 102 echo "tool_name|not available|${tool_name}|not available" >> options_and_arguments.txt && |
98 | 103 |
99 #################################################### | 104 #################################################### |
100 ## loop through repeats to get option/argument pairs | 105 ## loop through repeats to get option/argument pairs |
101 #################################################### | 106 #################################################### |
102 | 107 |
103 ############ option_argument_one_dataset | 108 ############ option_argument_single_dataset |
104 #for i in $option_argument_one_dataset_repeat: | 109 #for i in $option_argument_single_dataset_repeat: |
105 #set $item = 'one_dataset|' + str($i.flag) + "|" + str($i.value) | 110 #set $item = 'single_dataset|' + str($i.flag) + "|" + str($i.value) + "|" |
106 echo '$item' >> options_and_arguments.txt && | 111 echo '$item' >> options_and_arguments.txt && |
107 #end for | 112 #end for |
108 | 113 |
109 ############ option_argument_multiple_datasets | 114 ############ option_argument_multiple_datasets |
110 #for i in $option_argument_multiple_datasets_repeat: | 115 #for i in $option_argument_multiple_datasets_repeat: |
111 #set $item = 'multiple_datasets|' + str($i.flag) + "|" + str($i.value) | 116 #set $item = 'multiple_datasets|' + str($i.flag) + "|" + str($i.value).replace(',', str($i.delimiter)) + "|" |
112 echo '$item' >> options_and_arguments.txt && | 117 echo '$item' >> options_and_arguments.txt && |
113 #end for | 118 #end for |
114 | 119 |
115 ############ option_argument_path_relative_to_upstream_tool | 120 |
116 #for i in $option_argument_path_relative_to_upstream_tool_repeat: | 121 ############ option_argument_path_relative_to_a_tool |
117 #set $item = 'path_relative_to_upstream_tool|' + str($i.flag) + "|" + str($i.value) | 122 #for i in $option_argument_path_relative_to_a_tool_repeat: |
123 #set $item = 'path_relative_to_a_tool|' + str($i.flag) + "|" + str($i.value) + "|" + str($i.a_tool_output_dir) | |
118 echo '$item' >> options_and_arguments.txt && | 124 echo '$item' >> options_and_arguments.txt && |
119 #end for | 125 #end for |
120 | 126 |
121 ############ option_argument_string | 127 ############ option_argument_path_relative_to_this_tool |
122 #for i in $option_argument_string_repeat: | 128 #for i in $option_argument_path_relative_to_this_tool_repeat: |
123 #set $item = 'string|' + str($i.flag) + "|" + str($i.value) | 129 #set $item = 'path_relative_to_this_tool|' + str($i.flag) + "|" + str($i.value) + "|" + str($i.path_type) |
124 echo '$item' >> options_and_arguments.txt && | 130 echo '$item' >> options_and_arguments.txt && |
125 #end for | 131 #end for |
126 | 132 |
127 ############ option_argument_float | 133 ############ option_argument_string_float_integer |
128 #for i in $option_argument_float_repeat: | 134 #for i in $option_argument_string_float_integer_repeat: |
129 #set $item = 'float|' + str($i.flag) + "|" + str($i.value) | 135 #set $item = 'value|' + str($i.flag) + "|" + str($i.value) + "|" |
130 echo '$item' >> options_and_arguments.txt && | 136 echo '$item' >> options_and_arguments.txt && |
131 #end for | 137 #end for |
132 | |
133 | |
134 ############ option_argument_integer | |
135 #for i in $option_argument_integer_repeat: | |
136 #set $item = 'integer|' + str($i.flag) + "|" + str($i.value) | |
137 echo '$item' >> options_and_arguments.txt && | |
138 #end for | |
139 | |
140 | 138 |
141 ############ output_set | 139 ############ output_set |
142 ## '$report' | 140 ## '$report' |
143 ## '$report.files_path' | 141 ## '$report.files_path' |
144 ## '$tool_help_doc' | 142 ## '$tool_help_doc' |
149 export REPORT_FILES_PATH='$report.files_path' && | 147 export REPORT_FILES_PATH='$report.files_path' && |
150 export TOOL_HELP_DOC='$tool_help_doc' && | 148 export TOOL_HELP_DOC='$tool_help_doc' && |
151 export TOOL_OUTPUT_DIR='$tool_output_dir' && | 149 export TOOL_OUTPUT_DIR='$tool_output_dir' && |
152 export TOOL_LOG='$tool_log' && | 150 export TOOL_LOG='$tool_log' && |
153 | 151 |
154 | |
155 ############ save tool files path to a tool output so that it can be accessed from galaxy history | |
156 echo '$report.files_path' > $tool_output_dir && | |
157 | 152 |
158 ############ run render R script to render R markdowns | 153 ############ run render R script to render R markdowns |
159 Rscript '${__tool_directory__}/dynamic_tool_render.R' | 154 Rscript '${__tool_directory__}/dynamic_tool_render.R' |
160 | 155 |
161 ]]></command> | 156 ]]></command> |