comparison toolfactory/rgToolFactory2.xml @ 118:e43c43396a70 draft

Uploaded
author fubar
date Fri, 11 Dec 2020 04:23:48 +0000
parents b1a29d3d50d6
children 8ea1133b9d9a
comparison
equal deleted inserted replaced
117:b1a29d3d50d6 118:e43c43396a70
1 <tool id="rgtf2" 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="tool_metadata"> 4 <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" 5 <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"/> 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"/>
7 <param name="tool_desc" label="Tool Description" type="text" value="" 7 <param name="tool_desc" label="Tool Synopsis" type="text" value=""
8 help="Supply a brief tool description for the Galaxy tool menu entry (optional - appears after the tool name)" /> 8 help="Supply a brief tool description for the Galaxy tool menu entry" />
9 <param name="help_text" label="Tool form documentation and help text for users" type="text" area="true" 9 <param name="help_text" label="Tool form documentation and help text for users" type="text" area="true"
10 value="**What it Does**" 10 value="**What it Does**"
11 help="Supply user documentation to appear on the new tool form as reStructured text - http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html" > 11 help="Supply user documentation to appear on the new tool form as reStructured text - http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html" >
12 <sanitizer> 12 <sanitizer>
13 <valid initial="string.printable"> 13 <valid initial="string.printable">
37 </when> 37 </when>
38 </conditional> 38 </conditional>
39 </repeat> 39 </repeat>
40 </xml> 40 </xml>
41 <xml name="io"> 41 <xml name="io">
42 <repeat name="history_inputs" title="zero or more input data file parameters to appear on the tool form to be passed to the executable" 42 <section name="io" title="Input and output files" expanded="true">
43 <repeat name="history_inputs" title="zero or more input data files to pass as parameters to the executable."
43 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"> 44 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">
44 <param name="input_files" type="data" format="data" label="Select an input file from your history" optional="true" multiple="false" 45 <param name="input_files" type="data" format="data" label="Select an input file from your history" optional="true" multiple="false"
45 help=""/> 46 help=""/>
46 <param name="input_formats" type="select" multiple="true" label="Select the datatype(s) that your tool/script accepts as input" 47 <param name="input_formats" type="select" multiple="true" label="Select the datatype(s) that your tool/script accepts as input"
47 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" value="tabular"> 48 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" value="tabular">
65 </param> 66 </param>
66 <param name="input_CL" type="text" label="Positional: ordinal integer. Argparse: argument name. STDIN if the executable/script expects it" 67 <param name="input_CL" type="text" label="Positional: ordinal integer. Argparse: argument name. STDIN if the executable/script expects it"
67 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=""> 68 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="">
68 </param> 69 </param>
69 </repeat> 70 </repeat>
70 <repeat name="history_outputs" title="one or more output file parameters generated by the tool to be added to the user history" 71 <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"
71 help="The name will become a history item for users of the new tool you are making containing one of it's outputs"> 72 help="The name will become a history item for users of the new tool you are making containing one of it's outputs">
72 <param name="history_name" type="text" label="Name for this output to appear in new history" optional="false" 73 <param name="history_name" type="text" label="Name for this output to appear in new history" optional="false"
73 help="No spaces! Argparse will also use this name as --[name]"> 74 help="No spaces! Argparse will also use this name as --[name]">
74 <sanitizer invalid_char="_"> 75 <sanitizer invalid_char="_">
75 <valid initial="string.letters,string.digits"/> 76 <valid initial="string.letters,string.digits"/>
83 </options> 84 </options>
84 </param> 85 </param>
85 <param name="history_CL" type="text" label="Positional: ordinal integer. Use STDOUT if '>' required. Otherwise ignored if argparse because name is used" 86 <param name="history_CL" type="text" label="Positional: ordinal integer. Use STDOUT if '>' required. Otherwise ignored if argparse because name is used"
86 help="If positional parameters, enter the integer ordinal expected for this parameter. If argparse, ignore unless STDOUT needed" value=""/> 87 help="If positional parameters, enter the integer ordinal expected for this parameter. If argparse, ignore unless STDOUT needed" value=""/>
87 <param name="history_test" type="text" label="Test pass decision criterion for this output compared to test generation" 88 <param name="history_test" type="text" label="Test pass decision criterion for this output compared to test generation"
88 help="Available options are diff:[lines], sim_size:[delta (integer) or delta_frac (float)" value="sim_size:0.01"/> 89 help="Available options are diff:[lines], sim_size:[delta (integer) or delta_frac (float)" value="diff:0"/>
89 </repeat> 90 </repeat>
91 </section>
90 </xml> 92 </xml>
91 <xml name="additparam"> 93 <xml name="additparam">
92 <param name="edit_params" type="select" display="radio" label="Make parameters on the generated tool form user editable?" 94 <section name="addparam" title="Executable or script settings passed on the command line other than I/O files" expanded="true">
93 help="If no (default), 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"> 95 <param name="edit_params" type="select" display="radio" label="Make these settings on the generated tool form user editable?"
96 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">
94 <option value="yes" selected="true">Yes, allow user to edit all additional parameters on the generated tool form</option> 97 <option value="yes" selected="true">Yes, allow user to edit all additional parameters on the generated tool form</option>
95 <option value="no">No - use the fixed values for all additional parameters - no user editing</option> 98 <option value="no">No - use the fixed values for all additional parameters - no user editing</option>
96 </param> 99 </param>
97 100
98 <repeat name="additional_parameters" title="zero or more user supplied parameter fields to the tool form for the executable" 101 <repeat name="additional_parameters" title="zero or more settings to be set by the tool user and passed on the command line"
99 help="See examples below to see how these can be parsed by scripts in the various languages"> 102 help="See examples below to see how these can be parsed by scripts in the various languages">
100 <param name="param_name" type="text" value="" label="Choose the name for this parameter - MUST not be blank!"> 103 <param name="param_name" type="text" value="" label="Choose the name for this parameter - MUST not be blank!">
101 <sanitizer invalid_char=""> 104 <sanitizer invalid_char="">
102 <valid initial="string.letters,string.digits"/> 105 <valid initial="string.letters,string.digits"/>
103 <mapping initial="none"/> 106 <mapping initial="none"/>
132 <param name="param_CL" type="text" label="Positional ordinal | argparse argument name" 135 <param name="param_CL" type="text" label="Positional ordinal | argparse argument name"
133 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="" /> 136 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="" />
134 <param name="param_CLprefixed" type="text" label="Override the generated default argparse name prefix if not empty - eg ----foo if needed" 137 <param name="param_CLprefixed" type="text" label="Override the generated default argparse name prefix if not empty - eg ----foo if needed"
135 help="Some targets like Planemo expect an unadorned action like 'test' before --galaxy_root." value="" /> 138 help="Some targets like Planemo expect an unadorned action like 'test' before --galaxy_root." value="" />
136 </repeat> 139 </repeat>
140 </section>
137 </xml> 141 </xml>
138 </macros> 142 </macros>
139 143
140 <requirements> 144 <requirements>
141 <requirement type="package" version="0.4.11">galaxyxml</requirement> 145 <requirement type="package" version="0.4.11">galaxyxml</requirement>
142 <requirement type="package" version="0.14.0">bioblend</requirement> 146 <requirement type="package" version="0.14.0">bioblend</requirement>
143 <requirement type="package" version="0.10.6">ephemeris</requirement> 147 <requirement type="package" version="0.10.6">ephemeris</requirement>
144 <requirement type="package" version="4.4.0">docker-py</requirement> 148 <requirement type="package" version="4.4.0">docker-py</requirement>
145 <!-- <requirement type="package" version="0.72.0">planemo</requirement> --> 149 <requirement type="package" version="0.72.0">planemo</requirement>
146 <container type="docker">quay.io/fubar2/planemo-biocontainer:latest</container>
147 </requirements> 150 </requirements>
148 151
149 <command ><![CDATA[ 152 <command ><![CDATA[
150 #import os 153 #import os
151 #set dev_env = os.environ.get('GALAXY_DEVELOPMENT_ENVIRONMENT', '0') == '1' 154 #set dev_env = os.environ.get('GALAXY_DEVELOPMENT_ENVIRONMENT', '0') == '1'
162 #end if 165 #end if
163 #if len(str($cover.test_override)) > 10: 166 #if len(str($cover.test_override)) > 10:
164 --test_override "$testoverride" 167 --test_override "$testoverride"
165 #end if 168 #end if
166 #end if 169 #end if
167 --packages "$packages" 170 --packages "$deps.packages"
168 #if $usescript.choosescript == "yes": 171 #if $deps.usescript.choosescript == "yes":
169 --script_path "$runme" 172 --script_path "$runme"
170 --sysexe "$usescript.scriptrunner" 173 --sysexe "$deps.usescript.scriptrunner"
171 #end if 174 #end if
172 --tool_name "$tool_name" --user_email "$__user_email__" --citations "$citeme" --parampass "$ppass.parampass" 175 --tool_name "$tool_name" --user_email "$__user_email__" --citations "$citeme" --parampass "$io_param.ppass.parampass"
173 176
174 #if str($makeMode.make_Tool)!="runonly": 177 #if str($make.makeMode.make_Tool)!="runonly":
175 --make_Tool "$makeMode.make_Tool" 178 --make_Tool "$make.makeMode.make_Tool"
176 --tool_desc "$makeMode.tool_desc" 179 --tool_desc "$make.makeMode.tool_desc"
177 --tool_version "$makeMode.tool_version" 180 --tool_version "$make.makeMode.tool_version"
178 --help_text "$helpme" 181 --help_text "$helpme"
179 --new_tool "$new_tool" 182 --new_tool "$new_tool"
180 --toolshed_api_key "$makeMode.toolshed_apikey" 183 --toolshed_api_key "$make.makeMode.toolshed_apikey"
181 --galaxy_api_key "$makeMode.galaxy_apikey" 184 --galaxy_api_key "$make.makeMode.galaxy_apikey"
182 --toolshed_url "$makeMode.toolshed_url" 185 --toolshed_url "$make.makeMode.toolshed_url"
183 --galaxy_url "$makeMode.galaxy_url" 186 --galaxy_url "$make.makeMode.galaxy_url"
184 #end if 187 #end if
185 #if $ppass.parampass != '0': 188 #if $io_param.ppass.parampass != '0':
186 #if str($ppass.edit_params) == "yes": 189 #if str($io_param.ppass.addparam.edit_params) == "yes":
187 --edit_additional_parameters 190 --edit_additional_parameters
188 #end if 191 #end if
189 #for apar in $ppass.additional_parameters: 192 #for apar in $io_param.ppass.addparam.additional_parameters:
190 --additional_parameters "$apar.param_name~~~$apar.param_value~~~$apar.param_label~~~$apar.param_help~~~$apar.param_type~~~$apar.param_CL~~~$apar.param_CLprefixed" 193 --additional_parameters "$apar.param_name~~~$apar.param_value~~~$apar.param_label~~~$apar.param_help~~~$apar.param_type~~~$apar.param_CL~~~$apar.param_CLprefixed"
191 #end for 194 #end for
192 #end if 195 #end if
193 #for $intab in $ppass.history_inputs: 196 #for $intab in $io_param.ppass.io.history_inputs:
194 --input_files "$intab.input_files~~~$intab.input_CL~~~$intab.input_formats~~~$intab.input_label~~~$intab.input_help" 197 --input_files "$intab.input_files~~~$intab.input_CL~~~$intab.input_formats~~~$intab.input_label~~~$intab.input_help"
195 #end for 198 #end for
196 #for $otab in $ppass.history_outputs: 199 #for $otab in $io_param.ppass.io.history_outputs:
197 --output_files "$otab.history_name~~~$otab.history_format~~~$otab.history_CL~~~$otab.history_test" 200 --output_files "$otab.history_name~~~$otab.history_format~~~$otab.history_CL~~~$otab.history_test"
198 #end for 201 #end for
199 --galaxy_root "$__root_dir__" 202 --galaxy_root "$__root_dir__"
200 --tool_dir "$__tool_directory__" 203 --tool_dir "$__tool_directory__"
201 #end if 204 #end if
202 ]]></command> 205 ]]></command>
203 <configfiles> 206 <configfiles>
204 <configfile name="runme"> 207 <configfile name="runme">
205 $usescript.dynScript 208 $deps.usescript.dynScript
206 </configfile> 209 </configfile>
207 <configfile name="commandoverride"> 210 <configfile name="commandoverride">
208 #if $cover.commover == "yes" and len(str($cover.command_override).strip()) > 1: 211 #if $cover.commover == "yes" and len(str($cover.command_override).strip()) > 1:
209 $cover.command_override 212 $cover.command_override
210 #end if 213 #end if
213 #if $cover.commover == "yes" and len(str($cover.test_override).strip()) > 1: 216 #if $cover.commover == "yes" and len(str($cover.test_override).strip()) > 1:
214 $cover.test_override 217 $cover.test_override
215 #end if 218 #end if
216 </configfile> 219 </configfile>
217 <configfile name="helpme"> 220 <configfile name="helpme">
218 #if $makeMode.make_Tool != "runonly": 221 #if $make.makeMode.make_Tool != "runonly":
219 ${makeMode.help_text} 222 ${make.makeMode.help_text}
220 #else 223 #else
221 $tool_name help goes here 224 $tool_name help goes here
222 #end if 225 #end if
223 </configfile> 226 </configfile>
224 <configfile name="citeme"> 227 <configfile name="citeme">
225 #if $makeMode.make_Tool != "runonly": 228 #if $make.makeMode.make_Tool != "runonly":
226 #for $citation in $makeMode.citations: 229 #for $citation in $make.makeMode.citations:
227 #if $citation.citation_type.type == "bibtex": 230 #if $citation.citation_type.type == "bibtex":
228 **ENTRY**bibtex 231 **ENTRY**bibtex
229 ${citation.citation_type.bibtex} 232 ${citation.citation_type.bibtex}
230 #else 233 #else
231 **ENTRY**doi 234 **ENTRY**doi
242 <valid initial="string.ascii_lowercase,string.digits"> 245 <valid initial="string.ascii_lowercase,string.digits">
243 <add value="_"/> 246 <add value="_"/>
244 </valid> 247 </valid>
245 </sanitizer> 248 </sanitizer>
246 </param> 249 </param>
250
251 <section name="deps" title="Dependencies, optional script and script interpreter" expanded="true">
252
247 <param name="packages" type="text" value="" label="Conda dependencies as package name[:version, name:version...]. These will always be available when this tool executes" 253 <param name="packages" type="text" value="" label="Conda dependencies as package name[:version, name:version...]. These will always be available when this tool executes"
248 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" /> 254 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" />
249 255
250 <conditional name="usescript"> 256 <conditional name="usescript">
251 <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" 257 <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"
274 <mapping initial="none"/> 280 <mapping initial="none"/>
275 </sanitizer> 281 </sanitizer>
276 </param> 282 </param>
277 </when> 283 </when>
278 </conditional> 284 </conditional>
279 285 </section>
286 <section name="io_param" title="Data file input, output and settings forming the executable or script command line" expanded="true">
280 <conditional name="ppass"> 287 <conditional name="ppass">
281 <param name="parampass" type="select" display="radio" label="Command line parameter passing method to use"> 288 <param name="parampass" type="select" display="radio" label="Command line parameter passing method to use">
282 <option value="argparse" selected="true">Argparse: passed in the form of --clname value</option> 289 <option value="argparse" selected="true">Argparse: passed in the form of --clname value</option>
283 <option value="positional">Positional: Passed in the order of positional ordinals ...foo.bam bar.idx zot.xls</option> 290 <option value="positional">Positional: Passed in the order of positional ordinals ...foo.bam bar.idx zot.xls</option>
284 <option value="0">Tool reads selected input file from STDIN and writes STDOUT with no parameters</option> 291 <option value="0">Tool reads selected input file from STDIN and writes STDOUT with no parameters</option>
293 </when> 300 </when>
294 <when value="0"> 301 <when value="0">
295 <expand macro="io"/> 302 <expand macro="io"/>
296 </when> 303 </when>
297 </conditional> 304 </conditional>
305 </section>
298 <param name="cl_prefix" type="text" value="" label="Prefix for generated command line. Prepends generated i/o and parameter CL. Use override below to replace completely" 306 <param name="cl_prefix" type="text" value="" label="Prefix for generated command line. Prepends generated i/o and parameter CL. Use override below to replace completely"
299 help="Text will replace generated executable/script elements. Sometimes required before i/o and parameters in the generated command line." /> 307 help="Text will replace generated executable/script elements. Sometimes required before i/o and parameters in the generated command line." />
300 <conditional name="cover"> 308 <conditional name="cover">
301 <param name="commover" type="select" display="radio" label="Add Human wrought code to override the generated XML command and/or test section - DIY" 309 <param name="commover" type="select" display="radio" label="Add Human wrought code to override the generated XML command and/or test section - DIY"
302 help = "For arbitrary and artfull command lines. All i/o and parameters must be passed. Choose No unless needed. Not for the faint of heart"> 310 help = "For arbitrary and artfull command lines. All i/o and parameters must be passed. Choose No unless needed. Not for the faint of heart">
324 <mapping initial="none"/> 332 <mapping initial="none"/>
325 </sanitizer> 333 </sanitizer>
326 </param> 334 </param>
327 </when> 335 </when>
328 </conditional> 336 </conditional>
329 337 <section name="make" title="Generate, toolshed and local Galaxy installation options" expanded="true">
330 <conditional name="makeMode"> 338 <conditional name="makeMode">
331 <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" 339 <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"
332 help="Installation in this Galaxy is optional" > 340 help="Installation in this Galaxy is optional" >
333 <option value="generate" >Run to generate tests only. Should fail if dependencies needed.</option> 341 <option value="generate" >Run to generate tests only. Should fail if dependencies needed.</option>
334 <option value="gentest">Test with planemo after generating.</option> 342 <option value="gentest">Test with planemo after generating.</option>
379 <valid initial="string.letters,string.digits"> 387 <valid initial="string.letters,string.digits">
380 </valid> 388 </valid>
381 <mapping initial="none"/> 389 <mapping initial="none"/>
382 </sanitizer> 390 </sanitizer>
383 </param> 391 </param>
384
385 <expand macro="tool_metadata" /> 392 <expand macro="tool_metadata" />
386 </when> 393 </when>
387 </conditional> 394 </conditional>
388 395 </section>
389 </inputs> 396 </inputs>
390 <outputs> 397 <outputs>
391 398
392 <data format="tgz" name="new_tool" label="${tool_name}_toolshed.tgz" > 399 <data format="tgz" name="new_tool" label="${tool_name}_toolshed.tgz" >
393 <filter>makeMode['make_Tool'] != "runonly"</filter> 400 <filter>makeMode['make_Tool'] != "runonly"</filter>