comparison toolfactory/toolfactory.xml @ 1:0183cad9d13b draft

planemo upload
author fubar
date Thu, 22 Feb 2024 10:48:01 +0000
parents
children
comparison
equal deleted inserted replaced
0:2beaae16651e 1:0183cad9d13b
1 <tool id="toolfactory" name="toolfactory" version="3.0" profile="22.05" >
2 <description>Scripts into tools v3.0</description>
3 <macros>
4 <xml name="dataColumn">
5 <param name="param_dataref" type="text" value="" label="Input data name to use as source of data column names"/>
6 <param name="param_multiple" type="boolean" truevalue="1" falsevalue="" value = ""
7 label="Allow user to make multiple selections" help="default is single selection"/>
8 <param name="param_value" type="text" value="" label="Default column value">
9 </param>
10 </xml>
11 <xml name="singleText">
12 <param name="param_value" type="text" value="" label="Default text value">
13 <sanitizer invalid_char="_">
14 <valid initial="string.printable" >
15 </valid>
16 </sanitizer>
17 </param>
18 </xml>
19 <xml name="singleInt">
20 <param name="param_value" type="integer" value="" label="Default integer value" >
21 </param>
22 </xml>
23 <xml name="singleFloat">
24 <param name="param_value" type="float" value="" label="Default value">
25 </param>
26 </xml>
27 <xml name="singleBoolean">
28 <param name="param_value" type="boolean" value="" label="Default value" />
29 <param name="truevalue" type="text" value="True" label="Command line value when True" />
30 <param name="falsevalue" type="boolean" value="True" label="Command line value when False" />
31 </xml>
32 <xml name="selectText">
33 <repeat name="selectTexts" title="Add each option to be presented" min="2" default="2"
34 help="Each text added here will also have a value to be emitted on the command line when the text is chosen">
35 <param name="select_text" type="text" value="" label="Explanatory text the user will see for this choice" >
36 <sanitizer invalid_char="_">
37 <valid initial="string.printable" >
38 </valid>
39 </sanitizer>
40 </param>
41 <param name="select_value" type="text" value="" label="Value for the command line when the user selects this option">
42 <sanitizer invalid_char="_">
43 <valid initial="string.printable" >
44 </valid>
45 </sanitizer>
46 </param>
47 </repeat>
48 </xml>
49 <xml name="selectFlag">
50 <repeat name="selectFlags" title="Add mutually exclusive flag selection" min="2" default="2"
51 help="Supply the corresponding mutually exclusive flag as it should appear on the command line if each option is selected">
52 <param name="select_text" type="text" value="" label="Explanatory text the user will see for this choice" >
53 </param>
54 <param name="select_value" type="text" value="" label="Value for the command line when the user selects this option"
55 help="Supply the corresponding mutually exclusive flag as it should appear on the command line if each option is selected">
56 </param>
57 </repeat>
58 </xml>
59 <xml name="tool_metadata">
60 <param name="tool_version" label="Tool Version - bump this to warn users trying to redo old analyses" type="text"
61 help="If you change your script and regenerate the 'same' tool, you should inform Galaxy (and users) by changing (bumping is traditional) this number"/>
62 <param name="tool_desc" label="Tool Synopsis" type="text" value=""
63 help="Supply a brief tool description for the Galaxy tool menu entry">
64 </param>
65 <param name="help_text" label="Tool form documentation and help text for users" type="text" area="true"
66 value="**What it Does**"
67 help="Supply user documentation to appear on the new tool form as reStructured text - http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html" >
68 <sanitizer>
69 <valid initial="string.printable" >
70 </valid>
71 </sanitizer>
72 </param>
73 <repeat name="citations" title="Citation">
74 <conditional name="citation_type">
75 <param name="type" type="select" display="radio" label="Citation Type">
76 <option value="doi">DOI</option>
77 <option value="bibtex">BibTeX</option>
78 </param>
79 <when value="doi">
80 <param name="doi" label="DOI" type="text"
81 help="Supply a DOI (e.g. doi: 10.1111/j.1740-9713.2007.00258.x) to be cited when this tool is used in published research." >
82 <sanitizer>
83 <valid initial="string.printable" >
84 </valid>
85 </sanitizer>
86 </param>
87 </when>
88 <when value="bibtex">
89 <param name="bibtex" label="BibTex" type="text" area="true"
90 help="Supply a BibTex entry that should be cited when this tool is used in published research." value="" >
91 <sanitizer>
92 <valid initial="string.printable" >
93 </valid>
94 </sanitizer>
95 </param>
96 </when>
97 </conditional>
98 </repeat>
99 </xml>
100 <xml name="io">
101 <section name="io" title="Input and output files" expanded="true">
102 <repeat name="history_inputs" title="Inputs" min="0"
103 help="Input data files to pass on the command line to the executable. USE SMALL SAMPLES for the new tool's test.
104 Prompts will form a history item selector as input for users of this new tool">
105 <param name="input_files" type="data" format="data" label="Select an input file from your history" multiple="true"
106 help="Note that multiple inputs can be selected if this input parameter will allow multiple selections"/>
107 <param name="input_formats" type="select" multiple="true" label="Select the datatype(s) that your tool/script accepts as input"
108 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" value="tabular">
109 <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
110 <column name="value" index="0"/>
111 </options>
112 </param>
113 <param name="input_label" type="text" value="" label="This will become the user prompt for the form so please make it informative" >
114 </param>
115 <param name="input_help" type="text" value="" label="This will become help text on the form." >
116 </param>
117 <param name="input_CL" type="text" label="Positional: ordinal integer. Argparse: argument name. STDIN if the executable/script expects it"
118 help="If you will pass positional parameters, enter the integer ordinal for this parameter. If Argparse style, '--' will be prepended or '-' if
119 single character">
120 </param>
121 <param name="input_required" type="select" label="Input mode - optional, required, repeated optional or 1 or more repeated required.">
122 <option value="required" selected="true">Required single input</option>
123 <option value="optional">Optional single input</option>
124 <option value="required1">Required. 1 or more repeats</option>
125 <option value="optional1">Optional. 1 or more repeats</option>
126 </param>
127 </repeat>
128 <repeat name="history_outputs" min="0" title="Outputs"
129 help="New history items output by the executable to appear in the user history after the tool runs. The name will become a history item for
130 users of the new tool you are making containing one of it's outputs">
131 <param name="history_name" type="text" label="Output Name" optional="false"
132 help="Name used for this output in history. No spaces. Digits and letters only please. Argparse should look for this name on the command line.">
133 <sanitizer invalid_char="_">
134 <valid initial="string.ascii_letters,string.digits" >
135 <add value="_" />
136 </valid>
137 </sanitizer>
138 </param>
139 <param name="history_label" type="text" label="Output label. Allows template substitution" value=""
140 help="Label used for this output - for example 'Plotlytabular $title on $input_tab.element_identifier' where variable templates are informative." >
141 <sanitizer>
142 <valid initial="string.printable" >
143 </valid>
144 </sanitizer>
145 </param>
146 <param name="history_format" type="select" multiple="false" label="Select the datatype for this output"
147 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" value="tabular">
148 <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
149 <column name="value" index="0"/>
150 </options>
151 </param>
152 <param name="history_CL" type="text" label="Position"
153 help="Positional: ordinal integer or 'STDOUT' if '>' required. Ignored if argparse because output name is used.
154 If positional parameters, enter the integer ordinal expected for this parameter. If argparse, ignore unless STDOUT needed" value=""/>
155 <param name="history_test" type="text" label="Output test criteria"
156 help="Pass/fail decision criterion for this output compared to test generation. Accepted variants include diff:100, sim_size:100 and sim_size:0.1"
157 value="diff:0"/>
158 <repeat name="history_whens" title="Optional change_format on this data" min="0" help="ADVANCED option only!! Easy to get wrong!">
159 <param name="history_when" type="text" label="Add a 'when' expression for this output so format can depend on another parameter"
160 help="Supply the three key=value pairs needed as shown - no quotes: input=image_format value=small_png format=png" value="">
161 </param>
162 </repeat>
163 </repeat>
164 <repeat name="collection_outputs" title="Output Collections" min="0"
165 help="New history collections to appear in the user history after the tool runs. Hides outputs not needed for downstream tools such as
166 images and intermediate reports." default="0">
167 <param name="name" type="text" label="Name"
168 help="for new collection with all outputs not individually passed to history outputs. No spaces! Script MUST create and fill a directory
169 with the same name and the tool test MUST be overwritten - see the plotter example for hints">
170 </param>
171 <param name="kind" type="select" multiple="false" label="Select the kind of collection for this output"
172 help="">
173 <option value="list" selected="true">List</option>
174 <option value="paired">Paired</option>
175 <option value="list:paired">List of paired</option>
176 </param>
177 <param name="label" type="text" label="Collection label. Allows template substitution" value=""
178 help="Label used for this output - for example 'Plotlytabular $title on $input_tab.element_identifier' where variable templates are informative." >
179 <sanitizer>
180 <valid initial="string.printable" >
181 </valid>
182 </sanitizer>
183 </param>
184 <param name="discover" type="text" label="Discover datasets expression" help="__name_and_ext__ should catch all filenames with extensions"
185 value="__name_and_ext__"/>
186 </repeat>
187
188 </section>
189 </xml>
190 <xml name="additparam">
191 <section name="addparam" title="Arguments" help="Executable or script settings passed on the command line other than I/O files" expanded="true">
192 <param name="edit_params" type="select" display="radio" label="Make these settings on the generated tool form user editable?"
193 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">
194 <option value="yes" selected="true">Yes, allow user to edit all additional parameters on the generated tool form</option>
195 <option value="no">No - use the fixed values for all additional parameters - no user editing</option>
196 </param>
197 <repeat name="additional_parameters" title="Command Line Parameters" min="0"
198 help="Command line settings for the user to pass to the executable. See examples below to see how these can be parsed by scripts in the various languages">
199 <param name="param_name" type="text" value="" label="Name for this parameter. Underscore, letters and digits only. No spaces allowed">
200 <sanitizer invalid_char="_">
201 <valid initial="string.ascii_letters,string.digits">
202 <add value="_"/>
203 </valid>
204 </sanitizer>
205 </param>
206 <conditional name="ap_type">
207 <param name="param_type" type="select" label="Type for this parameter">
208 <option value="text" selected="true">Text string</option>
209 <option value="integer">Integer</option>
210 <option value="float">Float</option>
211 <option value="boolean">Boolean</option>
212 <option value="selecttext">Select text string</option>
213 <option value="selectflag">Select from a mutually exclusive list of command line flags to pass</option>
214 <option value="clflag">Flag - user can set. Only used for argparse parameter passing style</option>
215 <option value="datacolumn">Data column - user selects from an input tabular file column name/header values</option>
216 </param>
217 <when value = "text">
218 <expand macro="singleText" />
219 </when>
220 <when value = "integer">
221 <expand macro="singleInt" />
222 </when>
223 <when value = "float">
224 <expand macro="singleFloat" />
225 </when>
226 <when value = "boolean">
227 <expand macro="singleBoolean" />
228 </when>
229 <when value = "selecttext">
230 <expand macro="selectText" />
231 </when>
232 <when value = "selectflag">
233 <expand macro="selectFlag" />
234 </when>
235 <when value = "clflag">
236 <param name="param_value" type="select" value="notset">
237 <option value='notset'>DO NOT set this flag</option>
238 <option value='set'>SET this flag</option>
239 </param>
240 </when>
241 <when value = "datacolumn">
242 <expand macro="dataColumn" />
243 </when>
244 </conditional>
245 <param name="param_label" type="text" value="" label="Label for the form">
246 <sanitizer>
247 <valid initial="string.printable" >
248 </valid>
249 </sanitizer>
250 </param>
251 <param name="param_help" type="text" value="" label="Help for this parameter">
252 <sanitizer>
253 <valid initial="string.printable" >
254 </valid>
255 </sanitizer>
256 </param>
257 <param name="param_CL" type="text" label="Positional ordinal | argparse argument name"
258 help="Using positional parameters, enter the integer ordinal for this parameter on the command line. Using Argparse style,
259 '--' will be prepended on the CL" value="" />
260 <param name="param_CLprefixed" type="text" label="Override the generated default argparse name prefix if not empty - eg ----foo if needed"
261 help="Some targets like Planemo expect an unadorned action like 'test' before --galaxy_root." value="">
262 <sanitizer invalid_char="_">
263 <valid initial="string.printable" >
264 <remove value="'" />
265 </valid>
266 </sanitizer>
267 </param>
268 <param name="param_repeat" type="boolean" checked="False" truevalue="1" falsevalue="0"
269 label="Allow user to repeat this as many times as needed." />
270 </repeat>
271 </section>
272 </xml>
273 </macros>
274 <requirements>
275 <requirement type="package" version="3.10.12">python</requirement>
276 <requirement type="package" version="0.5.3">galaxyxml</requirement>
277 <requirement type="package" version="1.2.0">bioblend</requirement>
278 <requirement type="package" version="0.75.20">planemo</requirement>
279 <requirement type="package" version="0.10.10">ephemeris</requirement>
280 </requirements>
281
282 <command detect_errors="exit_code"><![CDATA[
283 #import os
284 #set dev_env = os.environ.get('GALAXY_DEVELOPMENT_ENVIRONMENT', '0') == '1'
285 #if not $__user_email__
286 #set useremail = 'admin@galaxy.this'
287 #else
288 #set useremail = $__user_email__
289 #end if
290 #if not $dev_env and ( $__user_email__ not in $__admin_users__ )
291 python3 $__tool_directory__/toolfactory.py --bad_user $__user_email__
292 #else
293 python3 $__tool_directory__/toolfactory.py
294 #if len(str($cl_options.cl_suffix)) > 0
295 --cl_suffix "$clsuffix"
296 #end if
297 #if len(str($cl_options.cl_prefix)) > 0
298 --cl_prefix "$clprefix"
299 #end if
300 #if len(str($cl_options.cl_override)) > 0
301 --cl_override "$commandoverride"
302 #end if
303 #if len(str($cl_options.test_override)) > 0
304 --test_override "$testoverride"
305 #end if
306 #if $deps.packages > "":
307 --packages "$deps.packages"
308 #end if
309 #if $deps.usescript.choosescript == "yes"
310 --script_path "$runscript"
311 --sysexe "$deps.usescript.scriptrunner"
312 #end if
313 --tool_name "$tool_name" --user_email "$useremail" --citations "$citeme" --parampass "$io_param.ppass.parampass"
314 --tool_desc "$tool_desc"
315 --tool_version "$tool_version"
316 --help_text "$helpme"
317 #if $io_param.ppass.parampass != '0'
318 #if str($io_param.ppass.addparam.edit_params) == "yes"
319 --edit_additional_parameters
320 #end if
321 #for $apar in $io_param.ppass.addparam.additional_parameters
322 #if $apar.ap_type.param_type=="selecttext"
323 --selecttext_parameters '{"name":"$apar.param_name", "label":"$apar.param_label", "help":"$apar.param_help",
324 "type":"$apar.ap_type.param_type","CL":"$apar.param_CL","override":"$apar.param_CLprefixed","value": [
325 #for $i,$st in enumerate($apar.ap_type.selectTexts):
326 "$st.select_value"
327 #if ($i < (len($apar.ap_type.selectTexts)-1)):
328 ,
329 #end if
330 #end for
331 ], "texts": [
332 #for $i,$st in enumerate($apar.ap_type.selectTexts):
333 "$st.select_text"
334 #if ($i < (len($apar.ap_type.selectTexts)-1)):
335 ,
336 #end if
337
338 #end for
339 ]
340 }'
341 #else if $apar.ap_type.param_type=="selectflag"
342 --selectflag_parameters '{"name":"$apar.param_name", "label":"$apar.param_label", "help":"$apar.param_help",
343 "type":"$apar.ap_type.param_type","CL":"$apar.param_CL","override":"$apar.param_CLprefixed","value": [
344 #for $i,$st in enumerate($apar.ap_type.selectFlags):
345 "$st.select_value"
346 #if ($i < (len($apar.ap_type.selectFlags)-1)):
347 ,
348 #end if
349 #end for
350 ], "texts": [
351 #for $i,$st in enumerate($apar.ap_type.selectFlags):
352 "$st.select_text"
353 #if ($i < (len($apar.ap_type.selectFlags)-1)):
354 ,
355 #end if
356
357 #end for
358 ]
359 }'
360 #else if $apar.ap_type.param_type=="datacolumn"
361 --additional_parameters '{"name": "$apar.param_name", "value": "$apar.ap_type.param_value", "label": "$apar.param_label", "help": "$apar.param_help",
362 "type": "$apar.ap_type.param_type","CL": "$apar.param_CL","override": "$apar.param_CLprefixed", "repeat": "$apar.param_repeat", "multiple": "$apar.ap_type.param_multiple",
363 "dataref": "$apar.ap_type.param_dataref"}'
364 #else:
365 --additional_parameters '{"name": "$apar.param_name", "value": "$apar.ap_type.param_value", "label": "$apar.param_label", "help": "$apar.param_help",
366 "type": "$apar.ap_type.param_type","CL": "$apar.param_CL","override": "$apar.param_CLprefixed", "repeat": "$apar.param_repeat"}'
367 #end if
368 #end for
369 #end if
370 #for $intab in $io_param.ppass.io.history_inputs
371 --input_files '{"name": "$intab.input_files", "CL": "$intab.input_CL", "format": "$intab.input_formats", "label": "$intab.input_label",
372 "help": "$intab.input_help", "required": "$intab.input_required"}'
373 #end for
374 #for $otab in $io_param.ppass.io.history_outputs
375 #if str($otab.history_label) > ""
376 --output_files '{"name": "$otab.history_name", "format": "$otab.history_format", "CL": "$otab.history_CL", "test": "$otab.history_test", "label": "$otab.history_label"
377 #else
378 --output_files '{"name": "$otab.history_name", "format": "$otab.history_format", "CL": "$otab.history_CL", "test": "$otab.history_test"
379 #end if
380 #if $otab.history_whens
381 , "when": [
382 #for $i, $hw in enumerate($otab.history_whens)
383 "$hw.history_when"
384 #if ($i < (len($otab.history_whens)-1))
385 ,
386 #end if
387 #end for
388 ]
389 #end if
390 }'
391 #end for
392 #for $collect in $io_param.ppass.io.collection_outputs
393 --collection '{"name": "$collect.name", "kind": "$collect.kind", "discover": "$collect.discover", "label": "$collect.label"}'
394 #end for
395 --tfcollection 'toolgen'
396 --tested_tool_out "$untested_tool"
397 --nftest
398 --galaxy_root "$__root_dir__"
399 --toolfactory_dir "$__tool_directory__"
400 #if $cl_options.xtracond.needxtra == "yes"
401 #for $x in $cl_options.xtracond.xtra_files
402 --xtra_file '{"fpath":"$x", "fname":"$x.element_identifier"}'
403 #end for
404 #end if
405 #end if
406 ]]>
407 </command>
408 <configfiles>
409 <configfile name="runscript">
410 ${deps.usescript.dynScript}
411 </configfile>
412 <configfile name="commandoverride">
413 #if len(str($cl_options.cl_override).strip()) > 1:
414 ${cl_options.cl_override}
415 #end if
416 </configfile>
417 <configfile name="testoverride">
418 #if len(str($cl_options.test_override).strip()) > 1:
419 ${cl_options.test_override}
420 #end if
421 </configfile>
422 <configfile name="clprefix">
423 #if len(str($cl_options.cl_prefix).strip()) > 1:
424 ${cl_options.cl_prefix}
425 #end if
426 </configfile>
427 <configfile name="clsuffix">
428 #if len(str($cl_options.cl_suffix).strip()) > 1:
429 ${cl_options.cl_suffix}
430 #end if
431 </configfile>
432 <configfile name="helpme">
433 ${help_text}
434 </configfile>
435 <configfile name="citeme">
436
437 #for $citation in $citations:
438 #if $citation.citation_type.type == "bibtex":
439 **ENTRY**bibtex
440 ${citation.citation_type.bibtex}
441 #else
442 **ENTRY**doi
443 ${citation.citation_type.doi}
444 #end if
445 #end for
446
447 </configfile>
448 </configfiles>
449 <inputs>
450 <param name="tool_name" type="text" value="my_tool" label="New tool ID and title for outputs"
451 help="Toolshed repository name so lower case, digits and underscores only. Choose thoughtfully to avoid namespace clashes with other tool writers.">
452 <sanitizer invalid_char="_">
453 <valid initial="string.ascii_lowercase,string.digits">
454 <add value="_"/>
455 </valid>
456 </sanitizer>
457 </param>
458
459 <section name="deps" title="Dependencies, optional script and script interpreter" expanded="true">
460
461 <param name="packages" type="text" value="" label="Conda dependencies as package name[:version, name:version...].
462 These will always be available when this tool executes" help="Use =[ver] or :[ver] for specific version - 'bwa=0.17.0'.
463 Default is latest. Will be used every time the tool is (re)run. Only Conda is currently supported" />
464
465 <conditional name="usescript">
466 <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"
467 help = "For script interpreters like Python or bash, parameters and i/o specified below must match script's expectations - i
468 f you pass parameters, the script must deal with them">
469 <option value="no">No script required for this tool - just pass parameters on the command line to the first dependency listed above</option>
470 <option value="yes" selected="true">Yes, a script is ready to be pasted below</option>
471 </param>
472 <when value="no">
473 <param name="dynScript" type="hidden" value="" />
474 <param name="scriptrunner" type="hidden" value="" />
475 </when>
476 <when value="yes">
477 <param name="scriptrunner" type="text" value="" label="Interpreter for the script - eg bash or python. Can be one of the dependencies named
478 above or a system executable" help="Scripts are interpreted by the executable named here. For conda r-base, 'Rscript --vanilla' or for
479 conda planemo, 'planemo test' for example">
480 </param>
481 <param name="dynScript" type="text" area="True" value="" label="Script for executable above to interpret. It can be one of the Conda dependency names"
482 help="Script must handle all i/o and parameters as specified below using the parameters and passing method chosen below">
483 <sanitizer>
484 <valid initial="string.printable"/>
485 </sanitizer>
486 </param>
487 </when>
488 </conditional>
489 </section>
490 <section name="io_param" title="Data file input, output and settings forming the executable or script command line" expanded="true">
491 <conditional name="ppass">
492 <param name="parampass" type="select" display="radio" label="Command line parameter passing method to use">
493 <option value="argparse" selected="true">Argparse: passed in the form of --clname value</option>
494 <option value="embed">Script has Cheetah templates for parameters embedded into the code</option>
495 <option value="embednfmod">Specialised embed with nf-core module pixie dust</option>
496 <option value="positional">Positional: Passed in the order of positional ordinals ...foo.bam bar.idx zot.xls</option>
497 <option value="0">Tool reads selected input file from STDIN and writes STDOUT with no parameters</option>
498 </param>
499 <when value="argparse">
500 <expand macro="io" />
501 <expand macro="additparam" />
502 </when>
503 <when value="embed">
504 <expand macro="io" />
505 <expand macro="additparam" />
506 </when>
507 <when value="embednfmod">
508 <expand macro="io" />
509 <expand macro="additparam" />
510 </when>
511 <when value="positional">
512 <expand macro="io" />
513 <expand macro="additparam" />
514 </when>
515 <when value="0">
516 <expand macro="io"/>
517 </when>
518 </conditional>
519 </section>
520 <section name="cl_options" title="ADVANCED DIY MANUAL REPLACEMENT OPTIONS: Test or command line prefix, suffix or DIY command line" expanded="false" >
521 <param name="cl_prefix" type="text" area="True" value="" label="Prefix for generated command line. Useful for bash pre processing.
522 Use override below to replace completely"
523 help="';' separated bash commands can be used here for pre processing like renaming or copying datasets for the script -
524 added at start of autogenerated command line">
525 <sanitizer>
526 <valid initial="string.printable" />
527 </sanitizer>
528 </param>
529 <param name="cl_suffix" type="text" area="True" value="" label="Suffix for generated command line. Useful for bash post processing.
530 Use override below to replace completely"
531 help="';' separated bash commands can be used here for post processing - added at end of autogenerated command line" >
532 <sanitizer>
533 <valid initial="string.printable" />
534 </sanitizer>
535 </param>
536 <param name="cl_override" type="text" area="True" label="Optional. Human wrought command element override XML/template - e.g. for bwa"
537 help="For arbitrary and artfull command lines. All i/o and parameters must be passed. Leave blank unless needed. Not for the faint of heart" value="">
538 <sanitizer>
539 <valid initial="string.printable"/>
540 </sanitizer>
541 </param>
542 <param name="test_override" type="text" area="True" label="Optional. Human wrought test element override XML/template - e.g. for bwa"
543 help="For arbitrary and artfull scripts. Leave blank unless needed. Not for the faint of heart" value="">
544 <sanitizer>
545 <valid initial="string.printable" />
546 </sanitizer>
547 </param>
548 <conditional name="xtracond">
549 <param name="needxtra" type="select" display="radio" label="Specific files from the history must be available in the tool directory"
550 help = "If you need a java .jar file or special data file for your script to be able to access, upload it to the history and select it here">
551 <option value="no" selected="true">No special files need to be available in the tool directory for the script to use</option>
552 <option value="yes">Yes - some special files must be copied into the tool directory</option>
553 </param>
554 <when value="no">
555 <param name="xtra_files" type="hidden" value="" />
556 </when>
557 <when value="yes">
558 <param name="xtra_files" type="data" format="data" label="Select all files from your history to add to tool directory for the script to use" multiple="true"
559 help="If your script needs access to a .jar or other specific permanent resource, upload it before building, so you can select it here.
560 All those selected history items will be added to the tool directory. That path is available at execution as $__tool_directory__, for use in the command section.
561 These need to be expanded and used as parameters for the script where needed: $__tool_directory__/BlastTools.jar for example"/>
562 </when>
563 </conditional>
564 </section>
565 <expand macro="tool_metadata" />
566 <param name="useremail" type="hidden" value="" />
567 <param name="script_path" type="hidden" value="" />
568 </inputs>
569 <outputs>
570 <collection name="toolgen" type="list" label="${tool_name} generated components">
571 <discover_datasets pattern="__name_and_ext__" directory="toolgen" visible="false"/>
572 </collection>
573 <data name="untested_tool" format="tgz" label = "${tool_name}_toolshed_archive"/>
574 </outputs>
575 <tests>
576 <test>
577 <param name="useremail" value="admin.galaxy.here" />
578 <param name="input_files" value="input1_sample" />
579 <param name="input_CL" value="1" />
580 <param name="input_formats" value="txt" />
581 <param name="input_label" value="input" />
582 <param name="input_help" value="help" />
583 <param name="tool_name" value="pyrevpos" />
584 <param name="parampass" value="positional" />
585 <param name="tool_version" value="0.01" />
586 <param name="tool_desc" value="positional reverse" />
587 <param name="help_text" value="help text goes here" />
588 <param name="packages" value="python" />
589 <param name="history_name" value="output2" />
590 <param name="history_format" value="txt" />
591 <param name="history_CL" value="2" />
592 <param name="dynScript" value="import sys; inp = sys.argv[1]; outp = sys.argv[2]; inlist = open(inp,'r').readlines();
593 o = open(outp,'w'); rs = [''.join(list(reversed(x.rstrip()))) for x in inlist]; o.write('\n'.join(rs)); o.close()" />
594 <param name="choosescript" value="yes" />
595 <param name="script_path" value="$runscript" />
596 <output name="untested_tool" file="pyrevpos_not_tested.toolshed_sample" ftype="tgz" compare="sim_size" delta_frac="0.1" />
597 </test>
598 </tests>
599 <help>
600
601 **Details and attribution**
602 (see GTF_)
603
604 **Local Admins ONLY**
605 Only users with emails in the local admin_user configuration setting in config/galaxy.yml can run this tool.
606
607 **If you find a bug**
608 Please raise an issue, or even better, submit a pull request fixing it, on the github repository GTF_
609
610 **What it does**
611 This tool contains an automated code generator, and creates normal, workflow compatible Galaxy tools as Toolshed ready archives. The
612 new tool is immediately installed and available for use - a page refresh will be needed to see the new tool in the "Local" tool section.
613
614 Generated tools can use existing Conda packages. These become requirements for optional scripts pasted into this tool form.
615 Pasted scripts *cannot be adjusted* by the downstream user.
616
617 Any number of parameters can be built into the new tool form for passing in to the script or executable at runtime.
618 These can be editable by the downstream user or baked in.
619
620 A new tarball compatible with any Galaxy toolshed is created in your history, including a test based on the supplied default parameter
621 values and input history datasets.
622
623 .. class:: warningmark
624
625 **Note to system administrators**
626 This tool offers *NO* built in protection against malicious scripts. It should only be installed on private/personnal Galaxy instances.
627 Admin_users will have the power to do anything they want as the Galaxy user if you install this tool.
628
629 .. class:: warningmark
630
631 **Use on public servers** is STRONGLY discouraged for obvious reasons
632
633 The tools generated by this tool will run just as securely as any other normal installed Galaxy tool but like any other new tools,
634 should always be checked carefully before installation. We recommend that you follow the good code hygiene practices associated with safe toolshed practices.
635
636
637 Paper_
638
639 *Licensing*
640
641 Copyright Ross Lazarus May 2012
642 Licensed under the MIT_ licence.
643
644 .. _MIT: https://mit-license.org/
645 .. _GTF: https://github.com/fubar2/galaxy_tf_overlay
646 .. _Paper: https://academic.oup.com/bioinformatics/article/28/23/3139/192853
647
648
649 </help>
650 <citations>
651 <citation type="doi">10.1093/bioinformatics/bts573</citation>
652 </citations>
653 </tool>
654
655