comparison toolfactory/rgToolFactory2.xml @ 126:def0f754ee1b draft

Uploaded
author fubar
date Fri, 26 Mar 2021 09:29:58 +0000
parents 0566e2ee9789
children 56aa8105000d
comparison
equal deleted inserted replaced
125:2dbb412af425 126:def0f754ee1b
1 <tool id="rgtf2" name="toolfactory" version="2.00" profile="16.04" > 1 <tool id="rgtf2" 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" />
9 <param name="help_text" label="Tool form documentation and help text for users" type="text" area="true" 35 <param name="help_text" label="Tool form documentation and help text for users" type="text" area="true"
10 value="**What it Does**" 36 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" > 37 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> 38 <sanitizer>
13 <valid initial="string.printable"> 39 <valid initial="string.printable" />
14 </valid>
15 <mapping initial="none"/> 40 <mapping initial="none"/>
16 </sanitizer> 41 </sanitizer>
17 </param> 42 </param>
18 <repeat name="citations" title="Citation"> 43 <repeat name="citations" title="Citation">
19 <conditional name="citation_type"> 44 <conditional name="citation_type">
27 </when> 52 </when>
28 <when value="bibtex"> 53 <when value="bibtex">
29 <param name="bibtex" label="BibTex" type="text" area="true" 54 <param name="bibtex" label="BibTex" type="text" area="true"
30 help="Supply a BibTex entry that should be cited when this tool is used in published research." value="" > 55 help="Supply a BibTex entry that should be cited when this tool is used in published research." value="" >
31 <sanitizer> 56 <sanitizer>
32 <valid initial="string.printable"> 57 <valid initial="string.printable" />
33 </valid>
34 <mapping initial="none"/> 58 <mapping initial="none"/>
35 </sanitizer> 59 </sanitizer>
36 </param> 60 </param>
37 </when> 61 </when>
38 </conditional> 62 </conditional>
39 </repeat> 63 </repeat>
40 </xml> 64 </xml>
41 <xml name="io"> 65 <xml name="io">
42 <section name="io" title="Input and output files" expanded="true"> 66 <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." 67 <repeat name="history_inputs" title="zero or more input data files to pass on the command line to the executable."
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"> 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">
45 <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"
46 help=""/> 70 help=""/>
47 <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"
48 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">
49 <options from_parameter="tool.app.datatypes_registry.upload_file_formats"> 73 <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
50 <column name="value" index="0"/> 74 <column name="value" index="0"/>
51 </options> 75 </options>
52 </param> 76 </param>
53 <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" >
54 help="Note that '~~~' is an internal delimiter so must not appear in this text field - please work around this technical limitation" > 78 </param>
55 <sanitizer invalid_char=""> 79 <param name="input_help" type="text" value="" label="This will become help text on the form." >
56 <valid initial="string.printable"> <remove value='~~~'/> </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"> <remove value='~~~'/> </valid>
64 <mapping initial="none"/>
65 </sanitizer>
66 </param> 80 </param>
67 <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"
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=""> 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="">
69 </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." />
70 </repeat> 85 </repeat>
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" 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"
72 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">
73 <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"
74 help="No spaces! Argparse will also use this name as --[name]"> 89 help="No spaces! Argparse will also use this name as --[name]">
75 <sanitizer invalid_char="_"> 90 <sanitizer invalid_char="_">
76 <valid initial="string.ascii_letters,string.digits"> 91 <valid initial="string.ascii_letters,string.digits" >
77 <add value="_" /> 92 <add value="_" />
78 </valid> 93 </valid>
79 </sanitizer> 94 </sanitizer>
80 </param> 95 </param>
81 <param name="history_format" type="select" multiple="false" label="Select the datatype for this output" 96 <param name="history_format" type="select" multiple="false" label="Select the datatype for this output"
82 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" value="tabular"> 97 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" value="tabular">
83 <options from_parameter="tool.app.datatypes_registry.upload_file_formats"> 98 <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
87 <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"
88 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=""/>
89 <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"
90 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"/>
91 </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
92 </section> 127 </section>
93 </xml> 128 </xml>
94 <xml name="additparam"> 129 <xml name="additparam">
95 <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">
96 <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?"
97 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">
98 <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>
99 <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>
100 </param> 135 </param>
101 136 <repeat name="additional_parameters" title="zero or more command line settings for the user to pass to the executable"
102 <repeat name="additional_parameters" title="zero or more settings to be set by the tool user and passed on the command line"
103 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">
104 <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!">
105 <sanitizer invalid_char=""> 139 <sanitizer invalid_char="">
106 <valid initial="string.ascii_letters,string.digits"/> 140 <valid initial="string.ascii_letters,string.digits"/>
107 <mapping initial="none"/> 141 <mapping initial="none"/>
108 </sanitizer> 142 </sanitizer>
109 </param> 143 </param>
144 <conditional name="ap_type">
110 <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">
111 <option value="text" selected="true">text</option> 146 <option value="text" selected="true">Text string</option>
112 <option value="integer">integer</option> 147 <option value="integer">Integer</option>
113 <option value="float">float</option> 148 <option value="float">Float</option>
114 </param> 149 <option value="boolean">Boolean</option>
115 <param name="param_value" type="text" value="" label="Enter this parameter's default value" 150 <option value="selecttext">Select text string</option>
116 help="Note that '~~~' is an internal delimiter must not appear in this text field - please work around this technical limitation" > 151 </param>
117 <sanitizer invalid_char=""> 152 <when value = "text">
118 <valid initial="string.printable"> <remove value='~~~'/> </valid> 153 <expand macro="singleText" />
119 <mapping initial="none"/> 154 </when>
120 </sanitizer> 155 <when value = "integer">
121 </param> 156 <expand macro="singleInt" />
122 <param name="param_label" type="text" value="" label="Enter this parameter's label for the form" 157 </when>
123 help="Note that '~~~' is an internal delimiter so must not appear in this text field - please work around this technical limitation" > 158 <when value = "float">
124 <sanitizer invalid_char=""> 159 <expand macro="singleFloat" />
125 <valid initial="string.printable"> <remove value='~~~'/> </valid> 160 </when>
126 <mapping initial="none"/> 161 <when value = "boolean">
127 </sanitizer> 162 <expand macro="singleBoolean" />
128 </param> 163 </when>
129 <param name="param_help" type="text" value="" label="Help for this parameter" 164 <when value = "selecttext">
130 help="Note that three consecutive ~ cannot be used in this text field - please work around this technical limitation" > 165 <expand macro="selectText" />
131 <sanitizer invalid_char=""> 166 </when>
132 <valid initial="string.printable"> <remove value='~~~'/> </valid> 167 </conditional>
133 <mapping initial="none"/> 168 <param name="param_label" type="text" value="" label="Enter this parameter's label for the form">
134 </sanitizer> 169 </param>
170 <param name="param_help" type="text" value="" label="Help for this parameter">
135 </param> 171 </param>
136 <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"
137 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="" />
138 <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"
139 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="" />
140 </repeat> 176 </repeat>
141 </section> 177 </section>
142 </xml> 178 </xml>
143 </macros> 179 </macros>
144 180
145 <requirements> 181 <requirements>
146 <requirement type="package" version="0.4.12">galaxyxml</requirement> 182 <requirement type="package" version="0.4.12">galaxyxml</requirement>
147 <requirement type="package" version="0.14.0">bioblend</requirement> 183 <requirement type="package" version="0.14.0">bioblend</requirement>
148 <requirement type="package" version="0.10.6">ephemeris</requirement> 184 <requirement type="package" version="0.10.6">ephemeris</requirement>
149 <requirement type="package" version="0.74.1">planemo</requirement> 185 <requirement type="package" version="0.74.3">planemo</requirement>
150 </requirements> 186 </requirements>
151 187
152 <command ><![CDATA[ 188 <command ><![CDATA[
153 #import os 189 #import os
154 #set dev_env = os.environ.get('GALAXY_DEVELOPMENT_ENVIRONMENT', '0') == '1' 190 #set dev_env = os.environ.get('GALAXY_DEVELOPMENT_ENVIRONMENT', '0') == '1'
171 #if $deps.usescript.choosescript == "yes": 207 #if $deps.usescript.choosescript == "yes":
172 --script_path "$runme" 208 --script_path "$runme"
173 --sysexe "$deps.usescript.scriptrunner" 209 --sysexe "$deps.usescript.scriptrunner"
174 #end if 210 #end if
175 --tool_name "$tool_name" --user_email "$__user_email__" --citations "$citeme" --parampass "$io_param.ppass.parampass" 211 --tool_name "$tool_name" --user_email "$__user_email__" --citations "$citeme" --parampass "$io_param.ppass.parampass"
212
176 #if str($make.makeMode.make_Tool)!="runonly": 213 #if str($make.makeMode.make_Tool)!="runonly":
177 --make_Tool "$make.makeMode.make_Tool" 214 --make_Tool "$make.makeMode.make_Tool"
178 --tool_desc "$make.makeMode.tool_desc" 215 --tool_desc "$make.makeMode.tool_desc"
179 --tool_version "$make.makeMode.tool_version" 216 --tool_version "$make.makeMode.tool_version"
180 --help_text "$helpme" 217 --help_text "$helpme"
186 #end if 223 #end if
187 #if $io_param.ppass.parampass != '0': 224 #if $io_param.ppass.parampass != '0':
188 #if str($io_param.ppass.addparam.edit_params) == "yes": 225 #if str($io_param.ppass.addparam.edit_params) == "yes":
189 --edit_additional_parameters 226 --edit_additional_parameters
190 #end if 227 #end if
191 #for apar in $io_param.ppass.addparam.additional_parameters: 228 #for $apar in $io_param.ppass.addparam.additional_parameters:
192 --additional_parameters "$apar.param_name~~~$apar.param_value~~~$apar.param_label~~~$apar.param_help~~~$apar.param_type~~~$apar.param_CL~~~$apar.param_CLprefixed" 229 #if $apar.ap_type.param_type=="selecttext":
230 --selecttext_parameters '{"name":"$apar.param_name", "label":"$apar.param_label", "help":"$apar.param_help",
231 "type":"$apar.ap_type.param_type","CL":"$apar.param_CL","override":"$apar.param_CLprefixed","value": [
232 #for $i,$st in enumerate($apar.ap_type.selectTexts):
233 "$st.select_value"
234 #if ($i < (len($apar.ap_type.selectTexts)-1)):
235 ,
236 #end if
237 #end for
238 ], "texts": [
239 #for $i,$st in enumerate($apar.ap_type.selectTexts):
240 "$st.select_text"
241 #if ($i < (len($apar.ap_type.selectTexts)-1)):
242 ,
243 #end if
244
245 #end for
246 ]
247 }'
248 #else:
249 --additional_parameters '{"name": "$apar.param_name", "value": "$apar.ap_type.param_value", "label": "$apar.param_label", "help": "$apar.param_help",
250 "type": "$apar.ap_type.param_type","CL": "$apar.param_CL","override": "$apar.param_CLprefixed" }'
251 #end if
193 #end for 252 #end for
194 #end if 253 #end if
195 #for $intab in $io_param.ppass.io.history_inputs: 254 #for $intab in $io_param.ppass.io.history_inputs:
196 --input_files "$intab.input_files~~~$intab.input_CL~~~$intab.input_formats~~~$intab.input_label~~~$intab.input_help" 255 --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"}'
197 #end for 256 #end for
198 #for $otab in $io_param.ppass.io.history_outputs: 257 #for $otab in $io_param.ppass.io.history_outputs:
199 --output_files "$otab.history_name~~~$otab.history_format~~~$otab.history_CL~~~$otab.history_test" 258 --output_files '{"name": "$otab.history_name", "format": "$otab.history_format", "CL": "$otab.history_CL", "test": "$otab.history_test"}'
259 #end for
260 #for $collect in $io_param.ppass.io.collection_outputs:
261 --collection '{"name": "$collect.name", "kind": "$collect.kind", "discover": "$collect.discover", "label": "$collect.label"}'
200 #end for 262 #end for
201 --galaxy_root "$__root_dir__" 263 --galaxy_root "$__root_dir__"
202 --tool_dir "$__tool_directory__" 264 --tool_dir "$__tool_directory__"
203 #end if 265 #end if
204 ]]></command> 266 ]]></command>
248 </param> 310 </param>
249 311
250 <section name="deps" title="Dependencies, optional script and script interpreter" expanded="true"> 312 <section name="deps" title="Dependencies, optional script and script interpreter" expanded="true">
251 313
252 <param name="packages" type="text" value="" label="Conda dependencies as package name[:version, name:version...]. These will always be available when this tool executes" 314 <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 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" /> 315 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 316
255 <conditional name="usescript"> 317 <conditional name="usescript">
256 <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" 318 <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 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"> 319 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">
258 <option value="no">No script required for this tool - just pass parameters on the command line to the first dependency listed above</option> 320 <option value="no">No script required for this tool - just pass parameters on the command line to the first dependency listed above</option>
262 <param name="dynScript" type="hidden" value="" /> 324 <param name="dynScript" type="hidden" value="" />
263 <param name="scriptrunner" type="hidden" value="" /> 325 <param name="scriptrunner" type="hidden" value="" />
264 </when> 326 </when>
265 <when value="yes"> 327 <when value="yes">
266 <param name="scriptrunner" type="text" value="" label="Interpreter for the script - eg bash or python. Can be one of the dependencies named above or a system executable" 328 <param name="scriptrunner" type="text" value="" label="Interpreter for the script - eg bash or python. Can be one of the dependencies named above or a system executable"
267 help="Scripts are interpreted by the executable named here. Use bash for bash scripts, or a conda dependency such as R or Python for those scripts"> 329 help="Scripts are interpreted by the executable named here. For conda r-base, 'Rscript --vanilla' or for conda planemo, 'planemo test' for example">
268 <sanitizer invalid_char="">
269 <valid initial="string.ascii_letters,string.digits">
270 <add value="_"/>
271 </valid>
272 </sanitizer>
273 </param> 330 </param>
274 <param name="dynScript" type="text" area="True" value="" label="Script for executable above to interpret. It can be one of the Conda dependency names " 331 <param name="dynScript" type="text" area="True" value="" label="Script for executable above to interpret. It can be one of the Conda dependency names "
275 help="Script must handle all i/o and parameters as specified below using the parameters and passing method chosen below"> 332 help="Script must handle all i/o and parameters as specified below using the parameters and passing method chosen below">
276 <sanitizer> 333 <sanitizer>
277 <valid initial="string.printable"> 334 <valid initial="string.printable"/>
278 </valid>
279 <mapping initial="none"/> 335 <mapping initial="none"/>
280 </sanitizer> 336 </sanitizer>
281 </param> 337 </param>
282 </when> 338 </when>
283 </conditional> 339 </conditional>
300 <when value="0"> 356 <when value="0">
301 <expand macro="io"/> 357 <expand macro="io"/>
302 </when> 358 </when>
303 </conditional> 359 </conditional>
304 </section> 360 </section>
305 <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" 361 <param name="cl_prefix" type="text" value="" label="Suffix for generated command line. Useful for bash post processing. Use override below to replace completely"
306 help="Text will replace generated executable/script elements. Sometimes required before i/o and parameters in the generated command line." /> 362 help="';' separated bash commands can be used here for post processing - added at end of autogenerated command line" />
307 <conditional name="cover"> 363 <conditional name="cover">
308 <param name="commover" type="select" display="radio" label="Add Human wrought code to override the generated XML command and/or test section - DIY" 364 <param name="commover" type="select" display="radio" label="Add Human wrought code to override the generated XML command and/or test section - DIY"
309 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"> 365 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 <option value="no" selected="true">No. Use automatically generated command/test XML </option> 366 <option value="no" selected="true">No. Use automatically generated command/test XML </option>
311 <option value="yes">Yes. XML needed to override autogenerated command and/or test segments will be pasted below</option> 367 <option value="yes">Yes. XML needed to override autogenerated command and/or test segments will be pasted below</option>
316 </when> 372 </when>
317 <when value="yes"> 373 <when value="yes">
318 <param name="command_override" type="text" area="True" value="" label="Optional. Human wrought command element override XML/template - e.g. for bwa" 374 <param name="command_override" type="text" area="True" value="" label="Optional. Human wrought command element override XML/template - e.g. for bwa"
319 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"> 375 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">
320 <sanitizer> 376 <sanitizer>
321 <valid initial="string.printable"> 377 <valid initial="string.printable"/>
322 </valid>
323 <mapping initial="none"/> 378 <mapping initial="none"/>
324 </sanitizer> 379 </sanitizer>
325 </param> 380 </param>
326 <param name="test_override" type="text" area="True" value="" label="Optional. Human wrought test element override XML/template - e.g. for bwa" 381 <param name="test_override" type="text" area="True" value="" label="Optional. Human wrought test element override XML/template - e.g. for bwa"
327 help="For arbitrary and artfull scripts. Leave blank unless needed. Not for the faint of heart"> 382 help="For arbitrary and artfull scripts. Leave blank unless needed. Not for the faint of heart">
328 <sanitizer> 383 <sanitizer>
329 <valid initial="string.printable"> 384 <valid initial="string.printable" />
330 </valid>
331 <mapping initial="none"/> 385 <mapping initial="none"/>
332 </sanitizer> 386 </sanitizer>
333 </param> 387 </param>
334 </when> 388 </when>
335 </conditional> 389 </conditional>
337 <conditional name="makeMode"> 391 <conditional name="makeMode">
338 <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" 392 <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 help="Installation in this Galaxy is optional" > 393 help="Installation in this Galaxy is optional" >
340 <option value="generate" >Run to generate tests only. Should fail if dependencies needed.</option> 394 <option value="generate" >Run to generate tests only. Should fail if dependencies needed.</option>
341 <option value="gentest" selected="true">Test with planemo after generating.</option> 395 <option value="gentest" selected="true">Test with planemo after generating.</option>
342 <option value="gentestinstall">Install in Galaxy after generation and testing. URLs and matching API keys are required for this step! </option> 396 <option value="gentestinstall">Install in this Galaxy after generation and testing. Must have local ToolShed as in the TF Docker container</option>
343 </param> 397 </param>
344 <when value="generate"> 398 <when value="generate">
345 <param name="galaxy_apikey" value="" type="hidden" ></param> 399 <param name="galaxy_apikey" value="" type="hidden" ></param>
346 <param name="toolshed_apikey" value="" type="hidden" ></param> 400 <param name="toolshed_apikey" value="" type="hidden" ></param>
347 <param name="galaxy_url" value="" type="hidden" ></param> 401 <param name="galaxy_url" value="" type="hidden" ></param>
357 </when> 411 </when>
358 <when value="gentestinstall"> 412 <when value="gentestinstall">
359 <param name="galaxy_url" type="text" value="http://localhost:8080" label="URL for the Galaxy server where the new tool should be installed" 413 <param name="galaxy_url" type="text" value="http://localhost:8080" label="URL for the Galaxy server where the new tool should be installed"
360 help="Default is localhost"> 414 help="Default is localhost">
361 <sanitizer> 415 <sanitizer>
362 <valid initial="string.printable"> 416 <valid initial="string.printable" />
363 </valid>
364 <mapping initial="none"/> 417 <mapping initial="none"/>
365 </sanitizer> 418 </sanitizer>
366 </param> 419 </param>
367 <param name="galaxy_apikey" type="text" value="fakekey" label="API key for the Galaxy to install the new tool" 420 <param name="galaxy_apikey" type="text" value="fakekey" label="API key for the Galaxy to install the new tool"
368 help="Cut and paste from the admin user properties screen"> 421 help="Cut and paste from the admin user properties screen">
369 <sanitizer> 422 <sanitizer>
370 <valid initial="string.ascii_letters,string.digits"> 423 <valid initial="string.ascii_letters,string.digits" />
371 </valid>
372 <mapping initial="none"/> 424 <mapping initial="none"/>
373 </sanitizer> 425 </sanitizer>
374 </param> 426 </param>
375 <param name="toolshed_url" type="text" value="http://localhost:9009" label="URL for the Toolshed where the new tool should be installed" 427 <param name="toolshed_url" type="text" value="http://localhost:9009" label="URL for the Toolshed where the new tool should be installed"
376 help="Default value is localhost:9009"> 428 help="Default value is localhost:9009">
377 <sanitizer> 429 <sanitizer>
378 <valid initial="string.printable"> 430 <valid initial="string.printable" />
379 </valid>
380 <mapping initial="none"/> 431 <mapping initial="none"/>
381 </sanitizer> 432 </sanitizer>
382 </param> 433 </param>
383 <param name="toolshed_apikey" type="text" value="fakekey" label="API key for the local toolshed to use when installing the tool" 434 <param name="toolshed_apikey" type="text" value="fakekey" label="API key for the local toolshed to use when installing the tool"
384 help="Cut and paste from the admin user properties screen"> 435 help="Cut and paste from the admin user properties screen">
385 <sanitizer> 436 <sanitizer>
386 <valid initial="string.ascii_letters,string.digits"> 437 <valid initial="string.ascii_letters,string.digits" />
387 </valid>
388 <mapping initial="none"/> 438 <mapping initial="none"/>
389 </sanitizer> 439 </sanitizer>
390 </param> 440 </param>
391 <expand macro="tool_metadata" /> 441 <expand macro="tool_metadata" />
392 </when> 442 </when>
393 </conditional> 443 </conditional>
394 </section> 444 </section>
395 </inputs> 445 </inputs>
396 <outputs> 446 <outputs>
397 447
398 <data format="tgz" name="new_tool" label="${tool_name}_toolshed.tgz" > 448 <data format="toolshed.gz" name="new_tool" label="${tool_name}_toolshed.gz" >
399 <filter>makeMode['make_Tool'] != "runonly"</filter> 449 <filter>makeMode['make_Tool'] != "runonly"</filter>
400 </data> 450 </data>
401 451
402 <collection name="TF_run_report" type="list" label="${tool_name} outputs"> 452 <collection name="TF_run_report" type="list" label="${tool_name} outputs">
403 <discover_datasets pattern="__name_and_ext__" directory="TF_run_report_tempdir" /> 453 <discover_datasets pattern="__name_and_ext__" directory="TF_run_report_tempdir" />
411 <param name="input_formats" value="txt" /> 461 <param name="input_formats" value="txt" />
412 <param name="input_label" value="input" /> 462 <param name="input_label" value="input" />
413 <param name="input_help" value="help" /> 463 <param name="input_help" value="help" />
414 <param name="tool_name" value="pyrevpos" /> 464 <param name="tool_name" value="pyrevpos" />
415 <param name="parampass" value="positional" /> 465 <param name="parampass" value="positional" />
416 <param name="make_Tool" value="generate" /> 466 <param name="make_Tool" value="gentest" />
417 <param name="tool_version" value="0.01" /> 467 <param name="tool_version" value="0.01" />
418 <param name="tool_desc" value="positional reverse" /> 468 <param name="tool_desc" value="positional reverse" />
419 <param name="help_text" value="help text goes here" /> 469 <param name="help_text" value="help text goes here" />
420 <param name="packages" value="python"/> 470 <param name="packages" value="python"/>
421 <param name="history_name" value="output2" /> 471 <param name="history_name" value="output2" />
510 rs.reverse() 560 rs.reverse()
511 o.write(''.join(rs)) 561 o.write(''.join(rs))
512 o.write('\n') 562 o.write('\n')
513 o.close() 563 o.close()
514 564
565 R script to draw some plots - use a collection.
566
567 ::
568
569
570 \# note this script takes NO input because it generates random data
571 dir.create('plots')
572 for (i in 1:10) {
573 foo = runif(100)
574 bar = rnorm(100)
575 bar = foo + 0.05*bar
576 pdf(paste('plots/yet',i,"anotherplot.pdf",sep='_'))
577 plot(foo,bar,main=paste("Foo by Bar plot \#",i),col="maroon", pch=3,cex=0.6)
578 dev.off()
579 foo = data.frame(a=runif(100),b=runif(100),c=runif(100),d=runif(100),e=runif(100),f=runif(100))
580 bar = as.matrix(foo)
581 pdf(paste('plots/yet',i,"anotherheatmap.pdf",sep='_'))
582 heatmap(bar,main='Random Heatmap')
583 dev.off()
584 }
585
515 586
516 587
517 Paper_ 588 Paper_
518 589
519 *Licensing* 590 *Licensing*
522 All rights reserved. 593 All rights reserved.
523 Licensed under the LGPL_ 594 Licensed under the LGPL_
524 595
525 .. _LGPL: http://www.gnu.org/copyleft/lesser.html 596 .. _LGPL: http://www.gnu.org/copyleft/lesser.html
526 .. _GTF: https://github.com/fubar2/toolfactory 597 .. _GTF: https://github.com/fubar2/toolfactory
527 .. _Paper: http://bioinformatics.oxfordjournals.org/cgi/reprint/bts573 598 .. _Paper: https://academic.oup.com/bioinformatics/article/28/23/3139/192853
528 599
529 600
530 </help> 601 </help>
531 <citations> 602 <citations>
532 <citation type="doi">10.1093/bioinformatics/bts573</citation> 603 <citation type="doi">10.1093/bioinformatics/bts573</citation>