Mercurial > repos > fubar > tool_factory_docker
comparison toolfactory_docker/rgToolFactory2.xml @ 6:482386d6cc43 draft default tip
Uploaded
author | fubar |
---|---|
date | Sun, 24 Jan 2021 03:54:01 +0000 |
parents | b4985006fb05 |
children |
comparison
equal
deleted
inserted
replaced
5:f17a2b1972f1 | 6:482386d6cc43 |
---|---|
1 <tool id="rgtfd" name="toolfactory" version="2.00" profile="16.04" > | 1 <tool id="rgtfd" name="toolfactory" version="2.00" profile="16.04" > |
2 <description>Scripts into tools v2.0</description> | 2 <description>Scripts into tools v2.0</description> |
3 <macros> | 3 <macros> |
4 <xml name="singleText"> | |
5 <param name="param_value" type="text" value="" label="Enter this parameter's default text value"> | |
6 </param> | |
7 </xml> | |
8 <xml name="singleInt"> | |
9 <param name="param_value" type="integer" value="" label="Enter this parameter's default integer value" > | |
10 </param> | |
11 </xml> | |
12 <xml name="singleFloat"> | |
13 <param name="param_value" type="float" value="" label="Enter this parameter's default value"> | |
14 </param> | |
15 </xml> | |
16 <xml name="singleBoolean"> | |
17 <param name="param_value" type="boolean" value="" label="Enter this parameter's default value" /> | |
18 <param name="truevalue" type="text" value="True" label="Command line value to emit when True" /> | |
19 <param name="falsevalue" type="boolean" value="True" label="Command line value to emit when False" /> | |
20 </xml> | |
21 <xml name="selectText"> | |
22 <repeat name="selectTexts" title="Add each option to be presented in a text select box" min="2" default="2" | |
23 help="Each text added here will also have a value to be emitted on the command line when the text is chosen"> | |
24 <param name="select_text" type="text" value="" label="Enter the explanatory text the user will see for this choice" > | |
25 </param> | |
26 <param name="select_value" type="text" value="" label="Enter the value for the command line when the user selects this option"> | |
27 </param> | |
28 </repeat> | |
29 </xml> | |
4 <xml name="tool_metadata"> | 30 <xml name="tool_metadata"> |
5 <param name="tool_version" label="Tool Version - bump this to warn users trying to redo old analyses" type="text" value="0.01" | 31 <param name="tool_version" label="Tool Version - bump this to warn users trying to redo old analyses" type="text" value="0.01" |
6 help="If you change your script and regenerate the 'same' tool, you should inform Galaxy (and users) by changing (bumping is traditional) this number"/> | 32 help="If you change your script and regenerate the 'same' tool, you should inform Galaxy (and users) by changing (bumping is traditional) this number"/> |
7 <param name="tool_desc" label="Tool Synopsis" type="text" value="" | 33 <param name="tool_desc" label="Tool Synopsis" type="text" value="" |
8 help="Supply a brief tool description for the Galaxy tool menu entry" /> | 34 help="Supply a brief tool description for the Galaxy tool menu entry" /> |
36 </conditional> | 62 </conditional> |
37 </repeat> | 63 </repeat> |
38 </xml> | 64 </xml> |
39 <xml name="io"> | 65 <xml name="io"> |
40 <section name="io" title="Input and output files" expanded="true"> | 66 <section name="io" title="Input and output files" expanded="true"> |
41 <repeat name="history_inputs" title="zero or more input data files to pass as parameters to the executable." | 67 <repeat name="history_inputs" title="zero or more input data files to pass on the command line to the executable." |
42 help="USE SMALL SAMPLES for the new tool's test. Prompts will form a history item selector as input for users of this new tool"> | 68 help="USE SMALL SAMPLES for the new tool's test. Prompts will form a history item selector as input for users of this new tool"> |
43 <param name="input_files" type="data" format="data" label="Select an input file from your history" optional="true" multiple="false" | 69 <param name="input_files" type="data" format="data" label="Select an input file from your history" multiple="false" |
44 help=""/> | 70 help=""/> |
45 <param name="input_formats" type="select" multiple="true" label="Select the datatype(s) that your tool/script accepts as input" | 71 <param name="input_formats" type="select" multiple="true" label="Select the datatype(s) that your tool/script accepts as input" |
46 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" value="tabular"> | 72 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" value="tabular"> |
47 <options from_parameter="tool.app.datatypes_registry.upload_file_formats"> | 73 <options from_parameter="tool.app.datatypes_registry.upload_file_formats"> |
48 <column name="value" index="0"/> | 74 <column name="value" index="0"/> |
49 </options> | 75 </options> |
50 </param> | 76 </param> |
51 <param name="input_label" type="text" value="" label="This will become the user prompt for the form so please make it informative" | 77 <param name="input_label" type="text" value="" label="This will become the user prompt for the form so please make it informative" > |
52 help="Note that '~~~' is an internal delimiter so must not appear in this text field - please work around this technical limitation" > | 78 </param> |
53 <sanitizer invalid_char=""> | 79 <param name="input_help" type="text" value="" label="This will become help text on the form." > |
54 <valid initial="string.printable"> | |
55 <remove value='~~~' /> | |
56 </valid> | |
57 <mapping initial="none"/> | |
58 </sanitizer> | |
59 </param> | |
60 <param name="input_help" type="text" value="" label="This will become help text on the form." | |
61 help="Note that three consecutive ~ cannot be used in this text field - please work around this technical limitation"> | |
62 <sanitizer invalid_char=""> | |
63 <valid initial="string.printable"> | |
64 <remove value='~~~' /> | |
65 </valid> | |
66 <mapping initial="none"/> | |
67 </sanitizer> | |
68 </param> | 80 </param> |
69 <param name="input_CL" type="text" label="Positional: ordinal integer. Argparse: argument name. STDIN if the executable/script expects it" | 81 <param name="input_CL" type="text" label="Positional: ordinal integer. Argparse: argument name. STDIN if the executable/script expects it" |
70 help="If you will pass positional parameters, enter the integer ordinal for this parameter. If Argparse style, '--' will be prepended or '-' if single character" value=""> | 82 help="If you will pass positional parameters, enter the integer ordinal for this parameter. If Argparse style, '--' will be prepended or '-' if single character" value=""> |
71 </param> | 83 </param> |
84 <param name="input_repeat" type="boolean" checked="False" truevalue="1" falsevalue="0" label="Allow user to repeat this input as many times as needed." /> | |
72 </repeat> | 85 </repeat> |
73 <repeat name="history_outputs" title="one or more new history items output by the executable to appear in the user history after the tool runs" | 86 <repeat name="history_outputs" title="one or more new history items output by the executable to appear in the user history after the tool runs" |
74 help="The name will become a history item for users of the new tool you are making containing one of it's outputs"> | 87 help="The name will become a history item for users of the new tool you are making containing one of it's outputs"> |
75 <param name="history_name" type="text" label="Name for this output to appear in new history" optional="false" | 88 <param name="history_name" type="text" label="Name for this output to appear in new history" optional="false" |
76 help="No spaces! Argparse will also use this name as --[name]"> | 89 help="No spaces! Argparse will also use this name as --[name]"> |
89 <param name="history_CL" type="text" label="Positional: ordinal integer. Use STDOUT if '>' required. Otherwise ignored if argparse because name is used" | 102 <param name="history_CL" type="text" label="Positional: ordinal integer. Use STDOUT if '>' required. Otherwise ignored if argparse because name is used" |
90 help="If positional parameters, enter the integer ordinal expected for this parameter. If argparse, ignore unless STDOUT needed" value=""/> | 103 help="If positional parameters, enter the integer ordinal expected for this parameter. If argparse, ignore unless STDOUT needed" value=""/> |
91 <param name="history_test" type="text" label="Test pass decision criterion for this output compared to test generation" | 104 <param name="history_test" type="text" label="Test pass decision criterion for this output compared to test generation" |
92 help="Available options are diff:[lines], sim_size:[delta (integer) or delta_frac (float)" value="diff:0"/> | 105 help="Available options are diff:[lines], sim_size:[delta (integer) or delta_frac (float)" value="diff:0"/> |
93 </repeat> | 106 </repeat> |
107 <repeat name="collection_outputs" title="zero or more new history collections to appear in the user history after the tool runs" | |
108 help="A collection contains outputs not needed for downstream tools such as images and intermediate reports" default="0"> | |
109 <param name="name" type="text" label="Name for new collection with all outputs not individually passed to history outputs" | |
110 help="No spaces! "> | |
111 <sanitizer invalid_char="_"> | |
112 <valid initial="string.ascii_letters,string.digits" > | |
113 <add value="_" /> | |
114 </valid> | |
115 </sanitizer> | |
116 </param> | |
117 <param name="kind" type="select" multiple="false" label="Select the kind of collection for this output" | |
118 help=""> | |
119 <option value="list" selected="true">List</option> | |
120 <option value="paired">Paired</option> | |
121 <option value="list:paired">List of paired</option> | |
122 </param> | |
123 <param name="label" type="text" label="Label for this collection" help="" value=""/> | |
124 <param name="discover" type="text" label="Discover datasets expression" help="__name_and_ext__ should catch all filenames with extensions" value="__name_and_ext__"/> | |
125 </repeat> | |
126 | |
94 </section> | 127 </section> |
95 </xml> | 128 </xml> |
96 <xml name="additparam"> | 129 <xml name="additparam"> |
97 <section name="addparam" title="Executable or script settings passed on the command line other than I/O files" expanded="true"> | 130 <section name="addparam" title="Executable or script settings passed on the command line other than I/O files" expanded="true"> |
98 <param name="edit_params" type="select" display="radio" label="Make these settings on the generated tool form user editable?" | 131 <param name="edit_params" type="select" display="radio" label="Make these settings on the generated tool form user editable?" |
99 help="If no, users will NOT be able to alter any additional parameters. If yes, these will appear on the tool form as text fields with no validation or sanitizing"> | 132 help="If no, users will NOT be able to alter any additional parameters. If yes, these will appear on the tool form as text fields with no validation or sanitizing"> |
100 <option value="yes" selected="true">Yes, allow user to edit all additional parameters on the generated tool form</option> | 133 <option value="yes" selected="true">Yes, allow user to edit all additional parameters on the generated tool form</option> |
101 <option value="no">No - use the fixed values for all additional parameters - no user editing</option> | 134 <option value="no">No - use the fixed values for all additional parameters - no user editing</option> |
102 </param> | 135 </param> |
103 | 136 <repeat name="additional_parameters" title="zero or more command line settings for the user to pass to the executable" |
104 <repeat name="additional_parameters" title="zero or more settings to be set by the tool user and passed on the command line" | |
105 help="See examples below to see how these can be parsed by scripts in the various languages"> | 137 help="See examples below to see how these can be parsed by scripts in the various languages"> |
106 <param name="param_name" type="text" value="" label="Choose the name for this parameter - MUST not be blank!"> | 138 <param name="param_name" type="text" value="" label="Choose the name for this parameter - MUST not be blank!"> |
107 <sanitizer invalid_char=""> | 139 <sanitizer invalid_char=""> |
108 <valid initial="string.ascii_letters,string.digits"/> | 140 <valid initial="string.ascii_letters,string.digits"/> |
109 <mapping initial="none"/> | 141 <mapping initial="none"/> |
110 </sanitizer> | 142 </sanitizer> |
111 </param> | 143 </param> |
144 <conditional name="ap_type"> | |
112 <param name="param_type" type="select" label="Select the type for this parameter"> | 145 <param name="param_type" type="select" label="Select the type for this parameter"> |
113 <option value="text" selected="true">text</option> | 146 <option value="text" selected="true">Text string</option> |
114 <option value="integer">integer</option> | 147 <option value="integer">Integer</option> |
115 <option value="float">float</option> | 148 <option value="float">Float</option> |
116 </param> | 149 <option value="boolean">Boolean</option> |
117 <param name="param_value" type="text" value="" label="Enter this parameter's default value" | 150 <option value="selecttext">Select text string</option> |
118 help="Note that '~~~' is an internal delimiter must not appear in this text field - please work around this technical limitation" > | 151 </param> |
119 <sanitizer invalid_char=""> | 152 <when value = "text"> |
120 <valid initial="string.printable"> | 153 <expand macro="singleText" /> |
121 <remove value='~~~' /> | 154 </when> |
122 </valid> | 155 <when value = "integer"> |
123 <mapping initial="none"/> | 156 <expand macro="singleInt" /> |
124 </sanitizer> | 157 </when> |
125 </param> | 158 <when value = "float"> |
126 <param name="param_label" type="text" value="" label="Enter this parameter's label for the form" | 159 <expand macro="singleFloat" /> |
127 help="Note that '~~~' is an internal delimiter so must not appear in this text field - please work around this technical limitation" > | 160 </when> |
128 <sanitizer invalid_char=""> | 161 <when value = "boolean"> |
129 <valid initial="string.printable"> | 162 <expand macro="singleBoolean" /> |
130 <remove value='~~~'/> | 163 </when> |
131 </valid> | 164 <when value = "selecttext"> |
132 <mapping initial="none"/> | 165 <expand macro="selectText" /> |
133 </sanitizer> | 166 </when> |
134 </param> | 167 </conditional> |
135 <param name="param_help" type="text" value="" label="Help for this parameter" | 168 <param name="param_label" type="text" value="" label="Enter this parameter's label for the form"> |
136 help="Note that three consecutive ~ cannot be used in this text field - please work around this technical limitation" > | 169 </param> |
137 <sanitizer invalid_char=""> | 170 <param name="param_help" type="text" value="" label="Help for this parameter"> |
138 <valid initial="string.printable"> | |
139 <remove value='~~~'/> | |
140 </valid> | |
141 <mapping initial="none"/> | |
142 </sanitizer> | |
143 </param> | 171 </param> |
144 <param name="param_CL" type="text" label="Positional ordinal | argparse argument name" | 172 <param name="param_CL" type="text" label="Positional ordinal | argparse argument name" |
145 help="Using positional parameters, enter the integer ordinal for this parameter on the command line. Using Argparse style, '--' will be prepended on the CL" value="" /> | 173 help="Using positional parameters, enter the integer ordinal for this parameter on the command line. Using Argparse style, '--' will be prepended on the CL" value="" /> |
146 <param name="param_CLprefixed" type="text" label="Override the generated default argparse name prefix if not empty - eg ----foo if needed" | 174 <param name="param_CLprefixed" type="text" label="Override the generated default argparse name prefix if not empty - eg ----foo if needed" |
147 help="Some targets like Planemo expect an unadorned action like 'test' before --galaxy_root." value="" /> | 175 help="Some targets like Planemo expect an unadorned action like 'test' before --galaxy_root." value="" /> |
196 #end if | 224 #end if |
197 #if $io_param.ppass.parampass != '0': | 225 #if $io_param.ppass.parampass != '0': |
198 #if str($io_param.ppass.addparam.edit_params) == "yes": | 226 #if str($io_param.ppass.addparam.edit_params) == "yes": |
199 --edit_additional_parameters | 227 --edit_additional_parameters |
200 #end if | 228 #end if |
201 #for apar in $io_param.ppass.addparam.additional_parameters: | 229 #for $apar in $io_param.ppass.addparam.additional_parameters: |
202 --additional_parameters "$apar.param_name~~~$apar.param_value~~~$apar.param_label~~~$apar.param_help~~~$apar.param_type~~~$apar.param_CL~~~$apar.param_CLprefixed" | 230 #if $apar.ap_type.param_type=="selecttext": |
231 --selecttext_parameters '{"name":"$apar.param_name", "label":"$apar.param_label", "help":"$apar.param_help", | |
232 "type":"$apar.ap_type.param_type","CL":"$apar.param_CL","override":"$apar.param_CLprefixed","value": [ | |
233 #for $i,$st in enumerate($apar.ap_type.selectTexts): | |
234 "$st.select_value" | |
235 #if ($i < (len($apar.ap_type.selectTexts)-1)): | |
236 , | |
237 #end if | |
238 #end for | |
239 ], "texts": [ | |
240 #for $i,$st in enumerate($apar.ap_type.selectTexts): | |
241 "$st.select_text" | |
242 #if ($i < (len($apar.ap_type.selectTexts)-1)): | |
243 , | |
244 #end if | |
245 | |
246 #end for | |
247 ] | |
248 }' | |
249 #else: | |
250 --additional_parameters '{"name": "$apar.param_name", "value": "$apar.ap_type.param_value", "label": "$apar.param_label", "help": "$apar.param_help", | |
251 "type": "$apar.ap_type.param_type","CL": "$apar.param_CL","override": "$apar.param_CLprefixed" }' | |
252 #end if | |
203 #end for | 253 #end for |
204 #end if | 254 #end if |
205 #for $intab in $io_param.ppass.io.history_inputs: | 255 #for $intab in $io_param.ppass.io.history_inputs: |
206 --input_files "$intab.input_files~~~$intab.input_CL~~~$intab.input_formats~~~$intab.input_label~~~$intab.input_help" | 256 --input_files '{"name": "$intab.input_files", "CL": "$intab.input_CL", "format": "$intab.input_formats", "label": "$intab.input_label", "help": "$intab.input_help", "repeat": "$intab.input_repeat"}' |
207 #end for | 257 #end for |
208 #for $otab in $io_param.ppass.io.history_outputs: | 258 #for $otab in $io_param.ppass.io.history_outputs: |
209 --output_files "$otab.history_name~~~$otab.history_format~~~$otab.history_CL~~~$otab.history_test" | 259 --output_files '{"name": "$otab.history_name", "format": "$otab.history_format", "CL": "$otab.history_CL", "test": "$otab.history_test"}' |
260 #end for | |
261 #for $collect in $io_param.ppass.io.collection_outputs: | |
262 --collection '{"name": "$collect.name", "kind": "$collect.kind", "discover": "$collect.discover", "label": "$collect.label"}' | |
210 #end for | 263 #end for |
211 --galaxy_root "$__root_dir__" | 264 --galaxy_root "$__root_dir__" |
212 --tool_dir "$__tool_directory__" | 265 --tool_dir "$__tool_directory__" |
213 #end if | 266 #end if |
214 ]]></command> | 267 ]]></command> |
258 </param> | 311 </param> |
259 | 312 |
260 <section name="deps" title="Dependencies, optional script and script interpreter" expanded="true"> | 313 <section name="deps" title="Dependencies, optional script and script interpreter" expanded="true"> |
261 | 314 |
262 <param name="packages" type="text" value="" label="Conda dependencies as package name[:version, name:version...]. These will always be available when this tool executes" | 315 <param name="packages" type="text" value="" label="Conda dependencies as package name[:version, name:version...]. These will always be available when this tool executes" |
263 optional="false" help="Use =[ver] or :[ver] for specific version - 'bwa=0.17.0'. Default is latest. Will be used every time the tool is (re)run. Only Conda is currently supported" /> | 316 help="Use =[ver] or :[ver] for specific version - 'bwa=0.17.0'. Default is latest. Will be used every time the tool is (re)run. Only Conda is currently supported" /> |
264 | 317 |
265 <conditional name="usescript"> | 318 <conditional name="usescript"> |
266 <param name="choosescript" type="select" display="radio" label="Supply a script for a dependency (e.g. python/R/bash) or a system executable such as Bash" | 319 <param name="choosescript" type="select" display="radio" label="Supply a script for a dependency (e.g. python/R/bash) or a system executable such as Bash" |
267 help = "For script interpreters like Python or bash, parameters and i/o specified below must match script's expectations - if you pass parameters, the script must deal with them"> | 320 help = "For script interpreters like Python or bash, parameters and i/o specified below must match script's expectations - if you pass parameters, the script must deal with them"> |
268 <option value="no">No script required for this tool - just pass parameters on the command line to the first dependency listed above</option> | 321 <option value="no">No script required for this tool - just pass parameters on the command line to the first dependency listed above</option> |
343 <section name="make" title="Generate, toolshed and local Galaxy installation options" expanded="true"> | 396 <section name="make" title="Generate, toolshed and local Galaxy installation options" expanded="true"> |
344 <conditional name="makeMode"> | 397 <conditional name="makeMode"> |
345 <param name="make_Tool" type="select" display="radio" label="Choose the steps you want to run. The TF Docker container is recommended for local installation" | 398 <param name="make_Tool" type="select" display="radio" label="Choose the steps you want to run. The TF Docker container is recommended for local installation" |
346 help="Installation in this Galaxy is optional" > | 399 help="Installation in this Galaxy is optional" > |
347 <option value="generate" >Run to generate tests only. Should fail if dependencies needed.</option> | 400 <option value="generate" >Run to generate tests only. Should fail if dependencies needed.</option> |
348 <option value="gentest">Test with planemo after generating.</option> | 401 <option value="gentest" selected="true">Test with planemo after generating.</option> |
349 <option value="gentestinstall" selected="true">Install in this Galaxy after generation and testing. Must have local ToolShed as in the TF Docker container</option> | 402 <option value="gentestinstall">Install in this Galaxy after generation and testing. Must have local ToolShed as in the TF Docker container</option> |
350 </param> | 403 </param> |
351 <when value="generate"> | 404 <when value="generate"> |
352 <param name="galaxy_apikey" value="" type="hidden" ></param> | 405 <param name="galaxy_apikey" value="" type="hidden" ></param> |
353 <param name="toolshed_apikey" value="" type="hidden" ></param> | 406 <param name="toolshed_apikey" value="" type="hidden" ></param> |
354 <param name="galaxy_url" value="" type="hidden" ></param> | 407 <param name="galaxy_url" value="" type="hidden" ></param> |
414 <param name="input_formats" value="txt" /> | 467 <param name="input_formats" value="txt" /> |
415 <param name="input_label" value="input" /> | 468 <param name="input_label" value="input" /> |
416 <param name="input_help" value="help" /> | 469 <param name="input_help" value="help" /> |
417 <param name="tool_name" value="pyrevpos" /> | 470 <param name="tool_name" value="pyrevpos" /> |
418 <param name="parampass" value="positional" /> | 471 <param name="parampass" value="positional" /> |
419 <param name="make_Tool" value="generate" /> | 472 <param name="make_Tool" value="gentest" /> |
420 <param name="tool_version" value="0.01" /> | 473 <param name="tool_version" value="0.01" /> |
421 <param name="tool_desc" value="positional reverse" /> | 474 <param name="tool_desc" value="positional reverse" /> |
422 <param name="help_text" value="help text goes here" /> | 475 <param name="help_text" value="help text goes here" /> |
423 <param name="packages" value="python"/> | 476 <param name="packages" value="python"/> |
424 <param name="history_name" value="output2" /> | 477 <param name="history_name" value="output2" /> |
513 rs.reverse() | 566 rs.reverse() |
514 o.write(''.join(rs)) | 567 o.write(''.join(rs)) |
515 o.write('\n') | 568 o.write('\n') |
516 o.close() | 569 o.close() |
517 | 570 |
571 R script to draw some plots - use a collection. | |
572 | |
573 :: | |
574 | |
575 | |
576 \# note this script takes NO input because it generates random data | |
577 dir.create('plots') | |
578 for (i in 1:10) { | |
579 foo = runif(100) | |
580 bar = rnorm(100) | |
581 bar = foo + 0.05*bar | |
582 pdf(paste('plots/yet',i,"anotherplot.pdf",sep='_')) | |
583 plot(foo,bar,main=paste("Foo by Bar plot \#",i),col="maroon", pch=3,cex=0.6) | |
584 dev.off() | |
585 foo = data.frame(a=runif(100),b=runif(100),c=runif(100),d=runif(100),e=runif(100),f=runif(100)) | |
586 bar = as.matrix(foo) | |
587 pdf(paste('plots/yet',i,"anotherheatmap.pdf",sep='_')) | |
588 heatmap(bar,main='Random Heatmap') | |
589 dev.off() | |
590 } | |
591 | |
518 | 592 |
519 | 593 |
520 Paper_ | 594 Paper_ |
521 | 595 |
522 *Licensing* | 596 *Licensing* |