Mercurial > repos > mvdbeek > docker_toolfactory
comparison DockerToolFactory.xml @ 0:0fa46413d0d9 draft
planemo upload for repository https://bitbucket.org/mvdbeek/dockertoolfactory/ commit 2f33eb59c06ac3d6ba6e22622fd4ae729eb5e4da-dirty
author | mvdbeek |
---|---|
date | Sat, 03 Oct 2015 08:34:39 -0400 |
parents | |
children | f1efc9a69a40 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0fa46413d0d9 |
---|---|
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
2 <tool id="rgTF" name="docker_tool_factory" version="0.1.3"> | |
3 <description>Makes scripts into tools using Docker</description> | |
4 <macros> | |
5 <import>macros.xml</import> | |
6 </macros> | |
7 <requirements> | |
8 <requirement type="package" version="9.10">ghostscript</requirement> | |
9 <requirement type="package" version="1.3.20">graphicsmagick</requirement> | |
10 <requirement type="package" version="0.4.0">docker-py</requirement> | |
11 </requirements> | |
12 <command interpreter="python"><![CDATA[ | |
13 DockerToolFactory.py --script_path "$runme" --interpreter "$interpreter" | |
14 --tool_name "$tool_name" --user_email "$__user_email__" | |
15 #if $generate_simple_output.make_TAB=="yes": | |
16 --output_tab "$tab_file" | |
17 #end if | |
18 #if $makeMode.make_Tool=="yes": | |
19 #if generate_simple_output.make_TAB=="yes": | |
20 --output_format "$out_format" | |
21 #end if | |
22 --make_Tool "$makeMode.make_Tool" | |
23 --tool_desc "$makeMode.tool_desc" | |
24 --tool_version "$makeMode.tool_version" | |
25 --new_tool "$new_tool" | |
26 --help_text "$helpme" | |
27 #if $make_HTML.value=="yes": | |
28 --include_dependencies "${makeMode.include_deps}" | |
29 #end if | |
30 #end if | |
31 #if $make_HTML.value=="yes": | |
32 --output_dir "$html_file.files_path" --output_html "$html_file" --make_HTML "yes" | |
33 #else: | |
34 --output_dir "." | |
35 #end if | |
36 #if $additional_parameters != 'None': | |
37 #for i in $additional_parameters: | |
38 --additional_parameters | |
39 "$i.param_name, $i.param_value" | |
40 #end for | |
41 #end if | |
42 #if $input_files != 'None': | |
43 --input_tab | |
44 #for i in $input_files: | |
45 $i.input | |
46 #end for | |
47 #for i in $input_files: | |
48 --input_format | |
49 #if str($i.in_format) == "None": | |
50 "Any" | |
51 #else | |
52 "$i.in_format" | |
53 #end if | |
54 #end for | |
55 #end if | |
56 ]]> | |
57 </command> | |
58 <configfiles> | |
59 <configfile name="runme">$dynScript</configfile> | |
60 <configfile name="helpme"> | |
61 #if $makeMode.make_Tool == "yes": | |
62 ${makeMode.help_text} | |
63 #end if | |
64 </configfile> | |
65 </configfiles> | |
66 <inputs> | |
67 <repeat name="input_files" title="Select input files"> | |
68 help="Most scripts will need an input - your script MUST be ready for whatever format you choose"/> | |
69 <param name="in_format" type="select" optional="true" multiple="true" | |
70 label="Optional: Select the allowed input datatype(s) for your tool/script"> | |
71 <options from_parameter="tool.app.datatypes_registry.upload_file_formats"> | |
72 <column name="value" index="0"/> | |
73 </options> | |
74 </param> | |
75 </repeat> | |
76 <repeat name="additional_parameters" title="Set additional parameters"> | |
77 <param name="param_name" type="text" value="parameter_name" label="Choose a parameter name" size="20"> | |
78 <sanitizer invalid_char=""> | |
79 <valid initial="string.letters,string.digits"> | |
80 <add value="@_."/> | |
81 </valid> | |
82 > | |
83 </sanitizer> | |
84 </param> | |
85 <param name="param_value" type="text" value="parameter_value" label="Enter a parameter value" size="50"> | |
86 <sanitizer> | |
87 <valid initial="string.printable"> | |
88 </valid> | |
89 <mapping initial="none"/> | |
90 </sanitizer> | |
91 </param> | |
92 </repeat> | |
93 <param name="tool_name" type="text" value="My dynamic script" label="New tool ID and title for outputs" | |
94 size="60" | |
95 help="This will become the toolshed repository name so please choose thoughtfully to avoid namespace clashes with other tool writers"> | |
96 <sanitizer invalid_char=""> | |
97 <valid initial="string.printable"/> | |
98 </sanitizer> | |
99 </param> | |
100 <conditional name="makeMode"> | |
101 <param name="make_Tool" type="select" label="Create a tar.gz file ready for local toolshed entry" | |
102 help="Ready to deploy securely!" size="60"> | |
103 <option value="yes">Generate a Galaxy ToolShed compatible toolshed.gz</option> | |
104 <option value="" selected="true">No. Just run the script please</option> | |
105 </param> | |
106 <when value="yes"> | |
107 <param name="tool_version" label="Tool Version - bump this to warn users trying to redo old analyses" | |
108 type="text" value="0.01" | |
109 help="If you change your script and regenerate the 'same' tool, you should inform Galaxy (and users) by changing (bumping is traditional) this number"/> | |
110 <param name="tool_desc" label="Tool Description" type="text" value="" size="40" | |
111 help="Supply a brief tool description for the Galaxy tool menu entry (optional - appears after the tool name)"/> | |
112 <param name="help_text" label="Tool form documentation and help text for users" type="text" area="true" | |
113 size="8x120" value="**What it Does**" | |
114 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"> | |
115 <sanitizer> | |
116 <valid initial="string.printable"> | |
117 </valid> | |
118 <mapping initial="none"/> | |
119 </sanitizer> | |
120 </param> | |
121 <param name="include_deps" type="select" | |
122 label="Include ghostscript and graphicsmagick dependencies in generated tool" size="60" | |
123 help="If an HTML file is being created, including dependencies is recommended. Otherwise this setting has no effect"> | |
124 <option value="">Rely on system ghostscript and graphicsmagick rather than include these as | |
125 dependencies | |
126 </option> | |
127 <option value="yes" selected="true">Include dependencies so target installations will always work if | |
128 HTML is being generated | |
129 </option> | |
130 </param> | |
131 | |
132 </when> | |
133 <when value=""> | |
134 </when> | |
135 </conditional> | |
136 <param name="out_format" type="text" value="txt" hidden="True"/> | |
137 <param name="make_HTML" type="select" | |
138 label="Create an HTML report with links to all output files and thumbnail links to PDF images" size="60" | |
139 help="Recommended for presenting complex outputs in an accessible manner. Turn off for simple tools so they just create one output"> | |
140 <option value="yes">Yes, arrange all outputs produced by my script as an HTML output</option> | |
141 <option value="" selected="true">No, no HTML output file thanks</option> | |
142 </param> | |
143 <conditional name="generate_simple_output"> | |
144 <param name="make_TAB" type="select" | |
145 label="Create a new history output alongside the HTML file specified above" | |
146 help="This is useful if your script creates a single new tabular file you want to appear in the history after the tool executes"> | |
147 <option value="yes" selected="true">My script writes to a new history output</option> | |
148 <option value="no">I do not want a new history output file</option> | |
149 </param> | |
150 <when value="yes"> | |
151 <param name="out_format" type="select" label="Select the datatype that your tool/script produces" | |
152 help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml" optional="True"> | |
153 <options from_parameter="tool.app.datatypes_registry.upload_file_formats"> | |
154 <column name="value" index="0"/> | |
155 </options> | |
156 </param> | |
157 </when> | |
158 <when value="no"> | |
159 <param name="out_format" type="text" value="txt" optional="True" hidden="True"/> | |
160 </when> | |
161 </conditional> | |
162 <param name="interpreter" type="select" label="Select the interpreter for your code"> | |
163 <option value="Rscript" selected="true">Rscript</option> | |
164 <option value="python">python</option> | |
165 <option value="perl">perl</option> | |
166 <option value="sh">sh</option> | |
167 </param> | |
168 <param name="dynScript" label="Copy and paste the script to be executed here" type="text" value="" area="True" | |
169 size="8x120" | |
170 help="Script must deal with two command line parameters: Path to input tabular file path (or 'None' if none selected) and path to output tabular history file (or 'None')."> | |
171 <sanitizer> | |
172 <valid initial="string.printable"> | |
173 </valid> | |
174 <mapping initial="none"/> | |
175 </sanitizer> | |
176 </param> | |
177 </inputs> | |
178 <outputs> | |
179 <!-- <data format_source="input" name="tab_file" label="${tool_name}.${out_format}"> --> | |
180 <data format_source="input" name="tab_file"> | |
181 <filter>generate_simple_output['make_TAB'] == "yes"</filter> | |
182 <actions> | |
183 <action type="format"> | |
184 <option type="from_param" name="out_format"/> | |
185 </action> | |
186 </actions> | |
187 </data> | |
188 <data format="html" name="html_file" label="${tool_name}.html"> | |
189 <filter>make_HTML == "yes"</filter> | |
190 </data> | |
191 <data format="toolshed.gz" name="new_tool" label="${tool_name}.toolshed.gz"> | |
192 <filter>makeMode['make_Tool'] == "yes"</filter> | |
193 </data> | |
194 </outputs> | |
195 <tests> | |
196 <test> | |
197 <param name="interpreter" value="Rscript"/> | |
198 <param name="make_HTML" value="yes"/> | |
199 <param name="generate_simple_output|makeTAB" value="no"/> | |
200 <param name="out_format" value="txt"/> | |
201 <param name="dynScript" value="for (i in 1:10) {; foo = runif(100); bar = rnorm(100); bar = foo + bar; pdf("anotherplot.pdf"); plot(1,2); dev.off();}"/> | |
202 <output name="html_file" file="html_output/My_dynamic_script_html.html" compare="diff"/> | |
203 </test> | |
204 </tests> | |
205 <expand macro="help_macro"/> | |
206 </tool> |