annotate rgToolFactory2.xml @ 10:8de2b7571d98 draft

Uploaded
author fubar
date Thu, 15 Jan 2015 07:35:06 -0500
parents ce5ec1d989fd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
1 <tool id="rgTF2" name="Tool Factory Two" version="1.16">
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
2 <description>Scripts into tools</description>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
3 <requirements>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
4 <requirement type="package" version="9.10">ghostscript</requirement>
1
323982517b30 Uploaded
fubar
parents: 0
diff changeset
5 <requirement type="package" version="1.3.20">graphicsmagick</requirement>
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
6 </requirements>
9
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
7 <code file="getlocalrpackages.py"/>
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
8 <command interpreter="python">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
9 #if ( $__user_email__ not in $__admin_users__ ):
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
10 rgToolFactory2.py --bad_user $__user_email__
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
11 #else:
9
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
12 rgToolFactory2.py --script_path "$runme" --interpreter "$interp.interpreter"
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
13 --tool_name "$tool_name" --user_email "$__user_email__" --citations "$citeme"
9
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
14 --envshpath "$interp.envpath"
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
15
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
16 #if $make_TAB.value=="yes":
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
17 --output_tab "$output1"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
18 --output_format "$output_format"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
19 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
20 #if $makeMode.make_Tool=="yes":
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
21 --make_Tool "$makeMode.make_Tool"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
22 --tool_desc "$makeMode.tool_desc"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
23 --tool_version "$makeMode.tool_version"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
24 --new_tool "$new_tool"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
25 --help_text "$helpme"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
26 #if $make_HTML.value=="yes":
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
27 #if $makeMode.include_deps.value=="yes":
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
28 --include_dependencies "yes"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
29 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
30 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
31 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
32 #if $additional_parameters != 'None':
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
33 #if $edit_params.value == "yes":
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
34 --edit_additional_parameters
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
35 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
36 #for i in $additional_parameters:
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
37 --additional_parameters "$i.param_name,$i.param_value,$i.param_label,$i.param_help,$i.param_type"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
38 #end for
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
39 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
40 #if $make_HTML.value=="yes":
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
41 --output_dir "$html_file.files_path" --output_html "$html_file" --make_HTML "yes"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
42 #else:
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
43 --output_dir "."
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
44 #end if
2
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
45 #if len($input_tab) != 0:
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
46 --input_formats "$input_formats"
2
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
47 #for $intab in $input_tab:
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
48 #if $intab.ext != 'data':
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
49 --input_tab "${intab},${intab.name}"
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
50 #end if
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
51 #end for
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
52 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
53 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
54 </command>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
55 <inputs>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
56 <param name="input_tab" type="data" label="Select one or more input file(s) from your history" optional="true" size="120" multiple="true"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
57 help="Use the multiple input widget (above/right of input box) for multiple inputs - your script MUST be ready to parse the command line right - see samples below"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
58 <param name="input_formats" type="select" multiple="true" label="Select the datatype(s) that your tool/script accepts as input"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
59 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
60 <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
61 <column name="value" index="0"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
62 </options>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
63 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
64 <param name="tool_name" type="text" value="My dynamic script" label="New tool ID and title for outputs" size="60"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
65 help="This will become the toolshed repository name so please choose thoughtfully to avoid namespace clashes with other tool writers">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
66 <sanitizer invalid_char="">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
67 <valid initial="string.letters,string.digits">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
68 <add value="_"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
69 </valid>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
70 </sanitizer>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
71 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
72 <conditional name="makeMode">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
73 <param name="make_Tool" type="select" label="Generate new tool as a tar.gz file ready to upload to a toolshed repository"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
74 help="Generate a toolshed archive - upload to a toolshed from where it can be auto-installed via the Galaxy admin functions"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
75 size="60">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
76 <option value="yes">Generate a Galaxy ToolShed compatible toolshed.gz</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
77 <option value="" selected="true">No. Just run the script please</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
78 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
79 <when value = "yes">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
80 <param name="tool_version" label="Tool Version - bump this to warn users trying to redo old analyses" type="text" value="0.01"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
81 help="If you change your script and regenerate the 'same' tool, you should inform Galaxy (and users) by changing (bumping is traditional) this number"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
82 <param name="tool_desc" label="Tool Description" type="text" value="" size="40"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
83 help="Supply a brief tool description for the Galaxy tool menu entry (optional - appears after the tool name)" />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
84 <param name="help_text" label="Tool form documentation and help text for users" type="text" area="true"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
85 size="8x120" value="**What it Does**"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
86 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" >
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
87 <sanitizer>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
88 <valid initial="string.printable">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
89 </valid>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
90 <mapping initial="none"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
91 </sanitizer>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
92 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
93 <repeat name="citations" title="Citation">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
94 <conditional name="citation_type">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
95 <param name="type" type="select" label="Citation Type">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
96 <option value="doi">DOI</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
97 <option value="bibtex">BibTeX</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
98 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
99 <when value="doi">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
100 <param name="doi" label="DOI" type="text" value=""
9
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
101 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." />
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
102 </when>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
103 <when value="bibtex">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
104 <param name="bibtex" label="BibTex" type="text" area="true" size="8x120"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
105 help="Supply a BibTex entry that should be cited when this tool is used in published research." value="" >
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
106 <sanitizer>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
107 <valid initial="string.printable">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
108 </valid>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
109 <mapping initial="none"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
110 </sanitizer>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
111 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
112 </when>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
113 </conditional>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
114 </repeat>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
115 <param name="include_deps" type="select" label="Include ghostscript and graphicsmagick dependencies in generated tool" size="60"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
116 help="If an HTML file is being created, including dependencies is recommended. Otherwise this setting has no effect">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
117 <option value="">Rely on system ghostscript and graphicsmagick rather than include these as dependencies</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
118 <option value="yes" selected="true">Include dependencies so target installations will always work if HTML is being generated</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
119 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
120 </when>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
121 <when value = "">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
122 </when>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
123 </conditional>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
124 <param name="make_HTML" type="select" label="Create an HTML report with links to every output file your script writes to the current directory" size="60"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
125 help="Recommended for presenting complex outputs in an accessible manner. Turn off for simple tools so they just create one output">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
126 <option value="yes">Yes, arrange and link all output files written by my script to the current directory as an HTML page</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
127 <option value="" selected="true">No, no HTML output file thanks</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
128 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
129 <param name="make_TAB" type="select" label="Create a new (default tabular) history output with or without an HTML file specified above"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
130 help="This is useful if your script creates a single new tabular file you want to appear in the history after the tool executes">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
131 <option value="yes" selected="true">My script writes to a new history output</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
132 <option value="">I do not want a new history output file</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
133 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
134 <param name="output_format" type="select" multiple="false" label="Select the datatype that your tool/script emits as output"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
135 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
136 <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
137 <column name="value" index="0"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
138 </options>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
139 </param>
9
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
140 <conditional name="interp">
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
141 <param name="interpreter" type="select" label="Select the interpreter for your code. This must be available on the path of the execution host">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
142 <option value="Rscript" selected="true">Rscript</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
143 <option value="python">python</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
144 <option value="perl">perl</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
145 <option value="bash">bash</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
146 <option value="sh">sh</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
147 </param>
9
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
148 <when value="Rscript">
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
149 <param name="envpath" type="select" label="Interpreter to use" dynamic_options="find_packages(prefix='package_r_')"
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
150 help = "Select the R interpreter to use when running this code - should show all installed tool shed package_r_..." />
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
151 </when>
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
152 <when value="python">
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
153 <param name="envpath" type="select" label="Interpreter to use" dynamic_options="find_packages(prefix='package_python_')"
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
154 help = "Select the python dependency to use when running this code - should show all installed tool shed package_python_..." />
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
155 </when>
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
156 <when value="perl">
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
157 <param name="envpath" type="select" label="Interpreter to use" dynamic_options="find_packages(prefix='package_perl_')"
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
158 help = "Select the Perl interpreter to use when running this code - should show all installed tool shed package_perl_..." />
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
159 </when>
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
160 </conditional>
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
161 <param name="edit_params" type="select" label="Add all additional parameters to the generated tool form so they are user editable?"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
162 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">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
163 <option value="yes">Yes, allow user to edit all additional parameters on the generated tool form</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
164 <option value="no" selected="true">No - use the fixed values for all additional parameters - no user editing</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
165 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
166 <repeat name="additional_parameters" title="Pass additional parameters to the script"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
167 help="See examples below to see how these can be parsed by scripts in the various languages">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
168 <param name="param_name" type="text" value="parameter_name" label="Choose the name for this parameter" size="60">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
169 <sanitizer invalid_char="">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
170 <valid initial="string.letters,string.digits"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
171 <mapping initial="none"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
172 </sanitizer>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
173 </param>
2
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
174 <param name="param_type" type="select" label="Select the type for this parameter">
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
175 <option value="text" selected="true">text</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
176 <option value="integer">integer</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
177 <option value="float">float</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
178 <option value="file">file</option>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
179 <option value="library_data">library_data</option>
2
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
180 </param>
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
181 <param name="param_value" type="text" value="parameter_value" label="Enter this parameter's default value" size="60"
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
182 help="Note that commas and double quotes cannot be used in this text field - please work around this technical limitation" >
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
183 <sanitizer invalid_char="">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
184 <valid initial="string.printable"> <remove value=','/> <remove value='"'/> </valid>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
185 <mapping initial="none"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
186 </sanitizer>
2
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
187 </param>
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
188 <param name="param_label" type="text" value="parameter_label" label="Enter this parameter's label for the form" size="60"
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
189 help="Note that commas and double quotes cannot be used in this text field - please creatively work around this technical limitation" >
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
190 <sanitizer invalid_char="">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
191 <valid initial="string.printable"> <remove value=','/> <remove value='"'/> </valid>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
192 <mapping initial="none"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
193 </sanitizer>
2
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
194 </param>
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
195 <param name="param_help" type="text" value="parameter_help" label="Help for this parameter"
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
196 help="Note that commas and double quotes cannot be used in this text field - please work around this technical limitation" size="60">
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
197 <sanitizer invalid_char="">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
198 <valid initial="string.printable"> <remove value=','/> <remove value='"'/> </valid>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
199 <mapping initial="none"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
200 </sanitizer>
2
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
201 </param>
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
202 </repeat>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
203 <param name="dynScript" label="Cut and paste the script to be executed here" type="text" value="" area="True" size="20x120"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
204 help="Script must deal with three command line parameters: please cut and paste from examples below for the appropriate scripting language">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
205 <sanitizer>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
206 <valid initial="string.printable">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
207 </valid>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
208 <mapping initial="none"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
209 </sanitizer>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
210 </param>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
211 </inputs>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
212 <outputs>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
213 <data name="output1" label="${tool_name}.${output_format}" format="tabular" metadata_source="input_tab">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
214 <filter>make_TAB=="yes"</filter>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
215 <actions>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
216 <action type="format">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
217 <option type="from_param" name="output_format" />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
218 </action>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
219 </actions>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
220 </data>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
221 <data format="html" name="html_file" label="${tool_name}.html">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
222 <filter>make_HTML == "yes"</filter>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
223 </data>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
224 <data format="toolshed.gz" name="new_tool" label="${tool_name}.toolshed.gz">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
225 <filter>makeMode['make_Tool'] == "yes"</filter>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
226 </data>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
227 </outputs>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
228 <configfiles>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
229 <configfile name="runme">$dynScript</configfile>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
230 <configfile name="helpme">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
231 #if $makeMode.make_Tool == "yes":
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
232 ${makeMode.help_text}
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
233 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
234 </configfile>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
235 <configfile name="citeme">
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
236 #if $makeMode.make_Tool == "yes":
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
237 #for $citation in $makeMode.citations:
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
238 #if $citation.citation_type.type == "bibtex":
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
239 **ENTRY**bibtex
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
240 ${citation.citation_type.bibtex}
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
241 #else
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
242 **ENTRY**doi
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
243 ${citation.citation_type.doi}
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
244 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
245 #end for
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
246 #end if
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
247 </configfile>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
248 </configfiles>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
249 <tests>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
250 <test>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
251 <param name='input_tab' value='tf2_test_in.xls' ftype='tabular' />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
252 <param name='tool_name' value='tf2_test' />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
253 <param name='make_Tool' value='yes' />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
254 <param name='tool_version' value='0.01' />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
255 <param name="tool_desc" value='testing_tf2' />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
256 <param name="help_text" value='help text goes here' />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
257 <param name='include_deps' value='yes' />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
258 <param name="make_HTML" value="yes" />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
259 <param name="make_TAB" value="yes" />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
260 <param name="output_format" value="tabular" />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
261 <param name="input_formats" value="tabular" />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
262 <param name="interpreter" value='python' />
9
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
263 <param name="envpath" value='system' />
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
264 <param name="runme" value="tf2_test_runme.py"/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
265 <output name='output1' file='tf2_test_out.xls' compare='diff' lines_diff = '10'/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
266 <output name='html_file' file="tf2_test.html" compare='diff' lines_diff = '10'/>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
267 <output name='new_tool' file="tf2_test.toolshed.gz" compare="sim_size" delta="20" />
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
268 </test>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
269 </tests>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
270 <help>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
271
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
272 .. class:: warningmark
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
273
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
274 **Details and attribution**
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
275 (see GTF_)
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
276
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
277 **Local Admins ONLY**
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
278 Only users whose IDs found in the local admin_user configuration setting in universe_wsgi.ini can run this tool.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
279
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
280 **If you find a bug**
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
281 Please raise an issue at the bitbucket repository GTFI_
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
282
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
283 **What it does**
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
284 This tool enables a user to paste and submit an arbitrary R/python/perl script to Galaxy passing
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
285 any number of input files and their metadata names to the script for use in (eg) summaries or reports.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
286 This allows quick generation of tools capable of taking some arbitrary number of user selected inputs
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
287 for the "reduce" step of a map-reduce HPC model.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
288
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
289 **Input options**
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
290 This version allows multiple input file selected from the history - their paths and metadata names
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
291 are provided to your script - see the examples below for each scripting language. Python uses argparse.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
292 Rscript uses some code to create all the command line variables. Parameters are injected into the bash/sh
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
293 execution environment so they magically "appear" as $ prefixed variables and will also be found on the
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
294 command line as parameters to be parsed if that's your preference.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
295 Note that additional parameters are NOT presented to the user of the generated tool but are frozen with the script.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
296 If there's demand, it would not be too hard to add them to the generated script...
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
297
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
298 **Output options**
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
299 Optional script outputs include one single new history tabular file and for scripts that create multiple file reports
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
300 or analyses, an Html page linking every file and image created by the script can be automatically generated.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
301
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
302 **Tool Generation option**
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
303 Once the script is working with test data, this tool will optionally generate a new Galaxy tool in a Tool Shed (gzip) repository file
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
304 ready to upload to your local toolshed for sharing and installation.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
305 Provide a small sample input when you run generate the tool because it will become the input for the generated functional test.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
306
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
307 .. class:: warningmark
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
308
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
309 **Note to system administrators**
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
310 This tool offers *NO* built in protection against malicious scripts. It should only be installed on private/personnal Galaxy instances.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
311 Admin_users will have the power to do anything they want as the Galaxy user if you install this tool.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
312
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
313 .. class:: warningmark
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
314
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
315 **Use on public servers** is STRONGLY discouraged for obvious reasons
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
316
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
317 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.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
318 We recommend that you follow the good code hygiene practices associated with safe toolshed.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
319
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
320 **Scripting conventions** The pasted script will be executed with the path to the (optional) input tabular data file path or NONE if you do not select one, and the path to the optional
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
321 output file or None if none is wanted, as the first and second command line parameters. The script must deal appropriately with these - see Rscript examples below.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
322 Note that if an optional HTML output is selected, all the output files created by the script will be nicely presented as links, with pdf images linked as thumbnails in that output.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
323 This can be handy for complex scripts creating lots of output.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
324
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
325 <![CDATA[
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
326
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
327 **Multiple inputs**
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
328
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
329 Your script will receive up to 3 named parameters
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
330 INPATHS is a comma separated list of input file paths
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
331 INNAMES is a comma separated list of input file names in the same order
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
332 OUTPATH is optional if a file is being generated, your script should write there
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
333 Your script should open and write files in the provided working directory if you are using the Html
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
334 automatic presentation option.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
335
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
336 Python script command lines will have --INPATHS and --additional_arguments etc. to make it easy to use argparse
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
337
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
338 Rscript will need to use commandArgs(TRUE) - see the example below - additional arguments will
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
339 appear as themselves - eg foo="bar" will mean that foo is defined as "bar" for the script.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
340
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
341 Bash and sh will see any additional parameters on their command lines and the 3 named parameters
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
342 in their environment magically - well, using env on the CL
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
343
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
344 ***python***::
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
345
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
346 # argparse for 3 possible comma separated lists
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
347 # additional parameters need to be parsed !
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
348 # then echo parameters to the output file
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
349 import sys
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
350 import argparse
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
351 argp=argparse.ArgumentParser()
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
352 argp.add_argument('--INNAMES',default=None)
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
353 argp.add_argument('--INPATHS',default=None)
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
354 argp.add_argument('--OUTPATH',default=None)
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
355 argp.add_argument('--additional_parameters',default=[],action="append")
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
356 argp.add_argument('otherargs', nargs=argparse.REMAINDER)
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
357 args = argp.parse_args()
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
358 f= open(args.OUTPATH,'w')
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
359 s = '### args=%s\n' % str(args)
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
360 f.write(s)
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
361 s = 'sys.argv=%s\n' % sys.argv
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
362 f.write(s)
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
363 f.close()
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
364
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
365
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
366
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
367 ***Rscript***::
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
368
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
369 # tool factory Rscript parser suggested by Forester
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
370 # http://www.r-bloggers.com/including-arguments-in-r-cmd-batch-mode/
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
371 # additional parameters will appear in the ls() below - they are available
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
372 # to your script
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
373 # echo parameters to the output file
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
374 ourargs = commandArgs(TRUE)
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
375 if(length(ourargs)==0){
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
376 print("No arguments supplied.")
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
377 }else{
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
378 for(i in 1:length(ourargs)){
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
379 eval(parse(text=ourargs[[i]]))
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
380 }
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
381 sink(OUTPATH)
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
382 cat('INPATHS=',INPATHS,'\n')
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
383 cat('INNAMES=',INNAMES,'\n')
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
384 cat('OUTPATH=',OUTPATH,'\n')
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
385 x=ls()
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
386 cat('all objects=',x,'\n')
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
387 sink()
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
388 }
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
389 sessionInfo()
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
390 print.noquote(date())
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
391
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
392
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
393 ***bash/sh***::
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
394
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
395 # tool factory sets up these environmental variables
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
396 # this example writes those to the output file
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
397 # additional params appear on command line
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
398 if [ ! -f "$OUTPATH" ] ; then
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
399 touch "$OUTPATH"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
400 fi
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
401 echo "INPATHS=$INPATHS" >> "$OUTPATH"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
402 echo "INNAMES=$INNAMES" >> "$OUTPATH"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
403 echo "OUTPATH=$OUTPATH" >> "$OUTPATH"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
404 echo "CL=$@" >> "$OUTPATH"
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
405
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
406 ***perl***::
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
407
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
408 (my $INPATHS,my $INNAMES,my $OUTPATH ) = @ARGV;
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
409 open(my $fh, '>', $OUTPATH) or die "Could not open file '$OUTPATH' $!";
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
410 print $fh "INPATHS=$INPATHS\n INNAMES=$INNAMES\n OUTPATH=$OUTPATH\n";
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
411 close $fh;
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
412
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
413
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
414 ]]>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
415
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
416
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
417
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
418 Paper_ :
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
419
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
420 Creating re-usable tools from scripts: The Galaxy Tool Factory
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
421 Ross Lazarus; Antony Kaspi; Mark Ziemann; The Galaxy Team
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
422 Bioinformatics 2012; doi: 10.1093/bioinformatics/bts573
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
423
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
424 **Licensing**
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
425
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
426 Copyright Ross Lazarus (ross period lazarus at gmail period com) May 2012
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
427 All rights reserved.
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
428 Licensed under the LGPL_
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
429
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
430 .. _LGPL: http://www.gnu.org/copyleft/lesser.html
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
431 .. _GTF: https://bitbucket.org/fubar/galaxytoolfactory
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
432 .. _GTFI: https://bitbucket.org/fubar/galaxytoolfactory/issues
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
433 .. _Paper: http://bioinformatics.oxfordjournals.org/cgi/reprint/bts573?ijkey=lczQh1sWrMwdYWJ&amp;keytype=ref
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
434
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
435
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
436 </help>
2
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
437 <citations>
9
ce5ec1d989fd Uploaded
fubar
parents: 2
diff changeset
438 <citation type="doi">10.1093/bioinformatics/bts573</citation>
2
6a3c292412fa Uploaded
fubar
parents: 1
diff changeset
439 </citations>
0
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
440 </tool>
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
441
c34063ab3735 Initial commit of code in iuc github repository
fubar
parents:
diff changeset
442