annotate toolfactory/rgToolFactory2.xml @ 28:ad564ab3cf7b draft

Uploaded
author fubar
date Fri, 31 Jul 2020 23:00:31 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
1 <tool id="rgTF2" name="toolfactory" version="2.00">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
2 <description>Scripts into tools</description>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
3 <macros>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
4 <xml name="addpar">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
5 <param name="edit_params" type="select" display="radio" label="Add all additional parameters to the generated tool form so they are user editable?"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
6 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">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
7 <option value="yes">Yes, allow user to edit all additional parameters on the generated tool form</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
8 <option value="no" selected="true">No - use the fixed values for all additional parameters - no user editing</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
9 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
10 <repeat name="additional_history_inputs" title="Additional Current history data files to pass in to the script - Use the '+' button to add as many as needed"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
11 help="Each of these will become a history item selector as input for users of the new tool you are making">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
12 <param name="input_files" type="data" format="data" label="Select an input file from your history" optional="true" size="120" multiple="false"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
13 help=""/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
14 <param name="input_formats" type="select" multiple="true" label="Select the datatype(s) that your tool/script accepts as input"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
15 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" value="tabular">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
16 <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
17 <column name="value" index="0"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
18 </options>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
19 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
20 <param name="param_label" type="text" value="" label="This will become the user prompt for the form so please make it informative" size="60"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
21 help="Note that '~~~' is an internal delimiter so must not appear in this text field - please work around this technical limitation" >
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
22 <sanitizer invalid_char="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
23 <valid initial="string.printable"> <remove value='~~~'/> </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
24 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
25 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
26 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
27 <param name="param_help" type="text" value="parameter_help" label="This will become help text on the form."
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
28 help="Note that three consecutive ~ cannot be used in this text field - please work around this technical limitation" size="60">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
29 <sanitizer invalid_char="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
30 <valid initial="string.printable"> <remove value='~~~'/> </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
31 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
32 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
33 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
34 <param name="CL" type="text" size="60" label="Positional: ordinal integer. Argparse: argument name."
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
35 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="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
36 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
37 </repeat>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
38 <repeat name="additional_parameters" title="Pass additional parameters to the script"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
39 help="See examples below to see how these can be parsed by scripts in the various languages">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
40 <param name="param_name" type="text" value="parameter_name" label="Choose the name for this parameter" size="60">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
41 <sanitizer invalid_char="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
42 <valid initial="string.letters,string.digits"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
43 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
44 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
45 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
46 <param name="param_type" type="select" label="Select the type for this parameter">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
47 <option value="text" selected="true">text</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
48 <option value="integer">integer</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
49 <option value="float">float</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
50 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
51 <param name="param_value" type="text" value="parameter_value" label="Enter this parameter's default value" size="60"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
52 help="Note that '~~~' is an internal delimiter must not appear in this text field - please work around this technical limitation" >
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
53 <sanitizer invalid_char="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
54 <valid initial="string.printable"> <remove value='~~~'/> </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
55 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
56 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
57 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
58 <param name="param_label" type="text" value="parameter_label" label="Enter this parameter's label for the form" size="60"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
59 help="Note that '~~~' is an internal delimiter so must not appear in this text field - please work around this technical limitation" >
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
60 <sanitizer invalid_char="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
61 <valid initial="string.printable"> <remove value='~~~'/> </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
62 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
63 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
64 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
65 <param name="param_help" type="text" value="parameter_help" label="Help for this parameter"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
66 help="Note that three consecutive ~ cannot be used in this text field - please work around this technical limitation" size="60">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
67 <sanitizer invalid_char="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
68 <valid initial="string.printable"> <remove value='~~~'/> </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
69 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
70 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
71 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
72 <param name="CL" type="text" size="60" label="Positional order (must be integer > 1) or Argument name to be prefixed with '--' or '-' if single letter"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
73 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="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
74 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
75 </repeat>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
76 </xml>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
77 <xml name="builtin_dynpar">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
78 <param name="dynScript" label="Cut and paste the script to be executed here" type="text" value="" area="True" size="20x120"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
79 help="If there are parameters, either positional or argparse style, the script must parse and use them appropriately">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
80 <sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
81 <valid initial="string.printable">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
82 </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
83 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
84 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
85 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
86 </xml>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
87 <xml name="dynpar">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
88 <param name="interpreter_version" type="text" value="" label="Specific script interpreter version to match dependency (Conda) repositories - e.g. for python '3.8.5' Latest if empty" size="60"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
89 <param name="dynScript" label="Cut and paste the script to be executed here" type="text" value="" area="True" size="20x120"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
90 help="If there are parameters, either positional or argparse style, the script must parse and use them appropriately">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
91 <sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
92 <valid initial="string.printable">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
93 </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
94 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
95 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
96 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
97 </xml>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
98 </macros>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
99 <requirements>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
100 <requirement type="package">python</requirement>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
101 <requirement type="package">galaxyxml</requirement>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
102 </requirements>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
103 <command interpreter="python"><![CDATA[
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
104 #import os
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
105 #set dev_env = os.environ.get('GALAXY_DEVELOPMENT_ENVIRONMENT', '0') == '1'
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
106 #if not $dev_env and ( $__user_email__ not in $__admin_users__ ):
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
107 $__tool_directory__/rgToolFactory2.py --bad_user $__user_email__
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
108 #else:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
109 $__tool_directory__/rgToolFactory2.py --script_path "$runme"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
110 #if str($interexe.interpreter)=="Executable":
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
111 --exe_package="$interexe.exe_package" --exe_package_version="$interexe.exe_package_version"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
112 #else:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
113 --interpreter_name="$interexe.interpreter"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
114 #if not str($interexe.interpreter) in ['bash','sh']:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
115 --interpreter_version="$interexe.interpreter_version"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
116 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
117 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
118 --tool_name="$tool_name" --user_email="$__user_email__" --citations="$citeme" --parampass="$ppass.parampass"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
119 --output_tab="$output1" --output_format="$output_format" --output_cl="$output_CL"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
120 #if str($makeMode.make_Tool)=="yes":
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
121 --make_Tool="$makeMode.make_Tool"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
122 --tool_desc="$makeMode.tool_desc"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
123 --tool_version="$makeMode.tool_version"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
124 --new_tool="$new_tool"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
125 --help_text="$helpme"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
126 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
127 #if $ppass.parampass != '0':
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
128 #if str($ppass.edit_params) == "yes":
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
129 --edit_additional_parameters
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
130 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
131 #for i in $ppass.additional_parameters:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
132 --additional_parameters="$i.param_name~~~$i.param_value~~~$i.param_label~~~$i.param_help~~~$i.param_type~~~$i.CL"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
133 #end for
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
134 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
135 --output_dir="."
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
136 #if str($input_files) != '':
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
137 --input_files="$input_files~~~$input_CL~~~$input_formats~~~$input_label~~~$input_help"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
138 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
139 #if $ppass.parampass != '0' and $ppass.additional_history_inputs:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
140 #for $intab in $ppass.additional_history_inputs:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
141 --input_files="$intab.input_files~~~$intab.CL~~~$intab.input_formats~~~$intab.param_label~~~$intab.param_help"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
142 #end for
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
143 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
144 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
145 ]]></command>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
146 <configfiles>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
147 <configfile name="runme">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
148 #if $interexe.interpreter != "Executable":
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
149 ${interexe.dynScript}
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
150 #else
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
151 "Not used"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
152 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
153 </configfile>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
154 <configfile name="helpme">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
155 #if $makeMode.make_Tool == "yes":
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
156 ${makeMode.help_text}
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
157 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
158 </configfile>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
159 <configfile name="citeme">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
160 #if $makeMode.make_Tool == "yes":
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
161 #for $citation in $makeMode.citations:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
162 #if $citation.citation_type.type == "bibtex":
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
163 **ENTRY**bibtex
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
164 ${citation.citation_type.bibtex}
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
165 #else
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
166 **ENTRY**doi
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
167 ${citation.citation_type.doi}
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
168 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
169 #end for
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
170 #end if
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
171 </configfile>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
172 </configfiles>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
173 <inputs>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
174
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
175 <param name="tool_name" type="text" value="My dynamic script" label="New tool ID and title for outputs" size="60"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
176 help="This will become the toolshed repository name so please choose thoughtfully to avoid namespace clashes with other tool writers">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
177 <sanitizer invalid_char="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
178 <valid initial="string.letters,string.digits">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
179 <add value="_"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
180 </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
181 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
182 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
183 <param name="input_files" format="data" type="data" label="Select a small test input file" optional="true" size="120" multiple="false"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
184 help="This will be used to test the new tool to generate a built in test for the generated tool"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
185 <param name="input_formats" type="select" multiple="true" label="Select the datatype(s) that your tool/script accepts for this input"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
186 help="If not listed here, datatypes can be added in galaxy's datatypes_conf.xml." value="tabular">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
187 <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
188 <column name="value" index="0"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
189 </options>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
190 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
191 <param name="input_label" type="text" value="parameter_label" label="Data input user prompt on the generated tool form" size="60"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
192 help="Describe the input file so the user can understand how it will be used" >
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
193 <sanitizer invalid_char="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
194 <valid initial="string.printable"> <remove value='~~~'/> </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
195 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
196 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
197 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
198 <param name="input_help" type="text" value="parameter_help" label="Data input user help on the generated tool form"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
199 help="Enter text to appear as help for the user on the generated tool form" size="60">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
200 <sanitizer invalid_char="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
201 <valid initial="string.printable"> <remove value='~~~'/> </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
202 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
203 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
204 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
205 <param name="input_CL" type="text" size="60" label="Positional order (must be integer > 1) or Argument name to be prefixed with '--'. Use 'STDIN' if your script reads from STDIN"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
206 help="If you will pass positional parameters, enter the integer index for this parameter on the command line. If Argparse style, '--' will be prepended on the CL" value="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
207 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
208 <param name="output_format" type="select" multiple="false" label="Select the Galaxy datatype that your tool/script emits as output for the new history item"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
209 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" value="tabular">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
210 <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
211 <column name="value" index="0"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
212 </options>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
213 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
214 <param name="output_CL" type="text" size="60" label="Positional order (must be integer > 1) or Argument name to be prefixed with '--'. Use 'STDOUT' if your script writes to stdout"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
215 help="If you will pass positional parameters, enter the integer index for this parameter on the command line. If Argparse style, '--' will be prepended on the CL" value="">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
216 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
217 <conditional name="interexe">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
218 <param name="interpreter" type="select" label="For binaries, choose 'Executable'. Otherwise choose the interpreter for your code"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
219 help = "If executable, the supplied package will become a requirement so must match the tool dependency resolver package name - conda is the default.">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
220 <option value="Executable" selected="true">An executable binary to be provided and managed by the Conda dependency management subsystem</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
221 <option value="python">python</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
222 <option value="r-base">Rscript</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
223 <option value="perl">perl</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
224 <option value="bash">bash</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
225 <option value="sh">sh</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
226 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
227 <when value="Executable">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
228 <param name="exe_package" type="text" value="" label="Executable package name in dependency (Conda) repositories - e.g. 'bwa'" size="60" optional="false"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
229 <param name="exe_package_version" type="text" value="" label="Executable package version to match dependency (Conda) repositories - e.g. for bwa='0.7.17'. Latest if empty" size="60"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
230 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
231 <when value = "python">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
232 <expand macro="dynpar" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
233 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
234 <when value = "r-base">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
235 <expand macro="dynpar" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
236 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
237 <when value = "perl">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
238 <expand macro="dynpar" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
239 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
240 <when value = "bash">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
241 <expand macro="builtin_dynpar" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
242 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
243 <when value = "sh">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
244 <expand macro="builtin_dynpar" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
245 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
246 </conditional>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
247 <conditional name="ppass">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
248 <param name="parampass" type="select" display="radio" label="Command line parameter passing method to use">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
249 <option value="argparse" selected="true">Argparse style: on CL in the form of --inputbam="foo.bam" if label below is "inputbam"</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
250 <option value="positional">Positional: on CL in the order defined on this screen -> "... foo.bam bar.idx zot.xls"</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
251 <option value="0">No parameters needed because tool reads selected history file from STDIN and writes to STDOUT for history"</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
252 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
253 <when value="0">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
254 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
255 <when value = "argparse">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
256 <expand macro="addpar" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
257 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
258 <when value = "positional">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
259 <expand macro="addpar" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
260 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
261 </conditional>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
262 <conditional name="makeMode">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
263 <param name="make_Tool" type="select" display="radio" label="Generate new tool as a tar.gz file ready to upload to a toolshed repository"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
264 help="Generate a toolshed archive - upload to a toolshed from where it can be auto-installed via the Galaxy admin functions"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
265 size="60">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
266 <option value="yes">Generate a Galaxy ToolShed compatible toolshed.gz</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
267 <option value="" selected="true">No. Just run the script please</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
268 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
269 <when value = "yes">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
270 <param name="tool_version" label="Tool Version - bump this to warn users trying to redo old analyses" type="text" value="0.01"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
271 help="If you change your script and regenerate the 'same' tool, you should inform Galaxy (and users) by changing (bumping is traditional) this number"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
272 <param name="tool_desc" label="Tool Description" type="text" value="" size="40"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
273 help="Supply a brief tool description for the Galaxy tool menu entry (optional - appears after the tool name)" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
274 <param name="help_text" label="Tool form documentation and help text for users" type="text" area="true"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
275 size="8x120" value="**What it Does**"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
276 help="Supply the brief user documentation to appear on the new tool form as reStructured text - http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html" >
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
277 <sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
278 <valid initial="string.printable">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
279 </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
280 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
281 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
282 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
283 <repeat name="citations" title="Citation">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
284 <conditional name="citation_type">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
285 <param name="type" type="select" display="radio" label="Citation Type">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
286 <option value="doi">DOI</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
287 <option value="bibtex">BibTeX</option>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
288 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
289 <when value="doi">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
290 <param name="doi" label="DOI" type="text" value=""
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
291 help="Supply a DOI (e.g. doi: 10.1111/j.1740-9713.2007.00258.x) that should be cited when this tool is used in published research." />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
292 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
293 <when value="bibtex">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
294 <param name="bibtex" label="BibTex" type="text" area="true" size="8x120"
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
295 help="Supply a BibTex entry that should be cited when this tool is used in published research." value="" >
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
296 <sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
297 <valid initial="string.printable">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
298 </valid>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
299 <mapping initial="none"/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
300 </sanitizer>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
301 </param>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
302 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
303 </conditional>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
304 </repeat>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
305 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
306 <when value = "">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
307 </when>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
308 </conditional>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
309 </inputs>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
310 <outputs>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
311 <data name="output1" label="${tool_name}.${output_format}" format="tabular" metadata_source="input_file">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
312 <actions>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
313 <action type="format">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
314 <option type="from_param" name="output_format" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
315 </action>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
316 </actions>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
317 </data>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
318 <data format="toolshed.gz" name="new_tool" label="${tool_name}.toolshed.gz">
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
319 <filter>makeMode['make_Tool'] == "yes"</filter>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
320 </data>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
321 </outputs>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
322
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
323 <tests>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
324 <test>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
325 <param name='input_files' value='infile.tabular' ftype='tabular' />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
326 <param name='script_path' value='runme.py' />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
327 <param name='tool_name' value='reverseargp2_test1' />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
328 <param name='make_Tool' value='yes' />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
329 <param name='tool_version' value='0.01' />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
330 <param name="tool_desc" value='testing_tf2' />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
331 <param name="help_text" value='help text goes here' />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
332 <param name="output_format" value="tabular" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
333 <param name="input_formats" value="tabular" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
334 <param name="interpreter" value='python' />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
335 <output name='output1' file='reverseargp2_test1_output.xls' compare='diff' lines_diff = '10'/>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
336 <output name='new_tool' file="reverseargp2.toolshed.gz" compare="sim_size" delta="600" />
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
337 </test>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
338 </tests>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
339 <help>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
340
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
341 .. class:: warningmark
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
342
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
343 **Details and attribution**
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
344 (see GTF_)
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
345
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
346 **Local Admins ONLY**
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
347 Only users whose IDs found in the local admin_user configuration setting in universe_wsgi.ini can run this tool.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
348
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
349 **If you find a bug**
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
350 Please raise an issue at the bitbucket repository GTFI_
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
351
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
352 **What it does**
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
353 This tool optionally generates normal workflow compatible first class Galaxy tools
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
354
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
355 Generated tools can run existing binary packages that become requirements, existing scripts, or new scripts pasted into this tool form.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
356 Pasted scripts are written so they are part of the new tool and cannot be adjusted by the downstream user.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
357 Binary packages are managed by the dependency subsystem - conda usually, so anything in bioconda or conda_forge is available for example.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
358
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
359 Any number of parameters can be built into the new tool form for passing in to the script or executable at runtime.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
360 These can be editable by the downstream user or baked in.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
361
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
362 When you run this tool, your executable or script and supplied parameter values will be run to produce a canonical
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
363 set of outputs - these are used to construct a test for the new tool.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
364
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
365 If tool generation is required, a new tarball compatible with any Galaxy toolshed is created.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
366 It can be unpacked in your galaxy/tools directory and manually added to tool_conf.xml, or
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
367 installed into any toolshed from where it can be installed into your Galaxy.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
368
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
369
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
370 .. class:: warningmark
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
371
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
372 **Note to system administrators**
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
373 This tool offers *NO* built in protection against malicious scripts. It should only be installed on private/personnal Galaxy instances.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
374 Admin_users will have the power to do anything they want as the Galaxy user if you install this tool.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
375
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
376 .. class:: warningmark
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
377
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
378 **Use on public servers** is STRONGLY discouraged for obvious reasons
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
379
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
380 The tools generated by this tool will run just as securely as any other normal installed Galaxy tool but like any other new tools, should always be checked carefully before installation.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
381 We recommend that you follow the good code hygiene practices associated with safe toolshed practices.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
382
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
383 Here's a sample python script that can be cut and pasted into the tool form, suitable for positional parameter passing:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
384
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
385 ::
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
386
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
387 # reverse order of text by row
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
388 import sys
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
389 inp = sys.argv[1]
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
390 outp = sys.argv[2]
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
391 i = open(inp,'r').readlines()
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
392 o = open(outp,'w')
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
393 for row in i:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
394 rs = row.rstrip()
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
395 rs = list(rs)
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
396 rs.reverse()
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
397 o.write(''.join(rs))
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
398 o.write('\n')
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
399 o.close()
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
400
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
401 With argparse style parameters:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
402
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
403 ::
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
404
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
405 # reverse order of text by row
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
406 import argparse
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
407 parser = argparse.ArgumentParser()
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
408 a = parser.add_argument
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
409 a('--infile',default='')
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
410 a('--outfile',default=None)
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
411 args = parser.parse_args()
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
412 inp = args.infile
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
413 outp = args.outfile
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
414 i = open(inp,'r').readlines()
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
415 o = open(outp,'w')
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
416 for row in i:
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
417 rs = row.rstrip()
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
418 rs = list(rs)
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
419 rs.reverse()
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
420 o.write(''.join(rs))
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
421 o.write('\n')
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
422 o.close()
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
423
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
424
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
425 Paper_ :
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
426
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
427 Creating re-usable tools from scripts: The Galaxy Tool Factory
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
428 Ross Lazarus; Antony Kaspi; Mark Ziemann; The Galaxy Team
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
429 Bioinformatics 2012; doi: 10.1093/bioinformatics/bts573
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
430
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
431 **Licensing**
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
432
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
433 Copyright Ross Lazarus (ross period lazarus at gmail period com) May 2012
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
434 All rights reserved.
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
435 Licensed under the LGPL_
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
436
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
437 .. _LGPL: http://www.gnu.org/copyleft/lesser.html
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
438 .. _GTF: https://bitbucket.org/fubar/galaxytoolfactory
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
439 .. _GTFI: https://bitbucket.org/fubar/galaxytoolfactory/issues
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
440 .. _Paper: http://bioinformatics.oxfordjournals.org/cgi/reprint/bts573
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
441
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
442
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
443 </help>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
444 <citations>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
445 <citation type="doi">10.1093/bioinformatics/bts573</citation>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
446 </citations>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
447 </tool>
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
448
ad564ab3cf7b Uploaded
fubar
parents:
diff changeset
449