Mercurial > repos > mvdbeek > docker_scriptrunner
comparison scriptrunner.xml @ 0:21d312776891 draft
planemo upload for repository https://github.com/mvdbeek/docker_scriptrunner/ commit 30f8264cdd67d40dec8acde6407f32152e6a29c1-dirty
author | mvdbeek |
---|---|
date | Sat, 09 Jul 2016 16:57:13 -0400 |
parents | |
children | 315a7e9ed6eb |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:21d312776891 |
---|---|
1 <tool id="docker_scriptrunner" name="docker scriptrunner" version="0.1.6"> | |
2 <description>Runs scripts using docker</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <requirements> | |
7 <requirement type="package" version="0.4.0">docker-py</requirement> | |
8 </requirements> | |
9 <command> | |
10 python "$__tool_directory__/scriptrunner.py" | |
11 --script_path "$runme" | |
12 --interpreter "$interpreter" | |
13 --user_email "$__user_email__" | |
14 #if $generate_simple_output.make_TAB=="yes": | |
15 --output_tab "$tab_file" | |
16 #end if | |
17 #if $make_HTML.value=="yes": | |
18 --output_dir "$html_file.files_path" --output_html "$html_file" --make_HTML "yes" | |
19 #else: | |
20 --output_dir "." | |
21 #end if | |
22 #if $additional_parameters != 'None': | |
23 #for i in $additional_parameters: | |
24 --additional_parameters | |
25 "$i.param_name, $i.param_value" | |
26 #end for | |
27 #end if | |
28 #if $input_files != 'None': | |
29 --input_tab | |
30 #for i in $input_files: | |
31 $i.input | |
32 #end for | |
33 #for i in $input_files: | |
34 --input_format "Any" | |
35 #end for | |
36 #end if | |
37 --docker_image "$docker_image" | |
38 </command> | |
39 <configfiles> | |
40 <configfile name="runme">$dynScript</configfile> | |
41 </configfiles> | |
42 <inputs> | |
43 <repeat name="input_files" title="Select input files"> | |
44 <param name="input" format="data" type="data" label="Select an input file from your history" optional="true" size="120" | |
45 help="Most scripts will need an input - your script MUST be ready for whatever format you choose"/> | |
46 </repeat> | |
47 <repeat name="additional_parameters" title="Set additional parameters"> | |
48 <param name="param_name" type="text" value="parameter_name" label="Choose a parameter name" size="20"> | |
49 <sanitizer invalid_char=""> | |
50 <valid initial="string.letters,string.digits"><add value="@_."/></valid>> | |
51 </sanitizer> | |
52 </param> | |
53 <param name="param_value" type="text" value="parameter_value" label="Enter a parameter value" size="50"> | |
54 <sanitizer> | |
55 <valid initial="string.printable"> | |
56 </valid> | |
57 <mapping initial="none"/> | |
58 </sanitizer> | |
59 </param> | |
60 </repeat> | |
61 <param name="make_HTML" type="select" label="Create an HTML report with links to all output files and thumbnail links to PDF images" size="60" | |
62 help="Recommended for presenting complex outputs in an accessible manner. Turn off for simple tools so they just create one output"> | |
63 <option value="yes">Yes, arrange all outputs produced by my script as an HTML output</option> | |
64 <option value="" selected="true">No, no HTML output file thanks</option> | |
65 </param> | |
66 <conditional name="generate_simple_output"> | |
67 <param name="make_TAB" type="select" label="Create a new history output alongside the HTML file specified above" | |
68 help="This is useful if your script creates a single new tabular file you want to appear in the history after the tool executes"> | |
69 <option value="yes" selected="true">My script writes to a new history output</option> | |
70 <option value="">I do not want a new history output file</option> | |
71 </param> | |
72 <when value="yes"> | |
73 <param name="out_format" type="select" label="Select the datatype that your tool/script produces" help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml"> | |
74 <options from_parameter="tool.app.datatypes_registry.upload_file_formats"> | |
75 <column name="value" index="0"/> | |
76 </options> | |
77 </param> | |
78 </when> | |
79 <when value=""> | |
80 </when> | |
81 </conditional> | |
82 <param name="interpreter" type="select" label="Select the interpreter for your code"> | |
83 <option value="Rscript" selected="true">Rscript</option> | |
84 <option value="python">python</option> | |
85 <option value="perl">perl</option> | |
86 <option value="sh">sh</option> | |
87 </param> | |
88 <param help="The script you are pasting will be run in this image. Make sure it contains the necessary tools" label="Select a docker image" name="docker_image" type="select"> | |
89 <options from_data_table="docker_scriptrunner_images"/> | |
90 </param> | |
91 <param name="dynScript" label="Copy and paste the script to be executed here" type="text" value="" area="True" size="8x120" | |
92 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')."> | |
93 <sanitizer> | |
94 <valid initial="string.printable"> | |
95 </valid> | |
96 <mapping initial="none"/> | |
97 </sanitizer> | |
98 </param> | |
99 </inputs> | |
100 <outputs> | |
101 <data format_source="input" name="tab_file"> | |
102 <filter>generate_simple_output['make_TAB'] == "yes"</filter> | |
103 <actions> | |
104 <action type="format"> | |
105 <option type="from_param" name="generate_simple_output.out_format" /> | |
106 </action> | |
107 </actions> | |
108 </data> | |
109 <data format="html" name="html_file" > | |
110 <filter>make_HTML == "yes"</filter> | |
111 </data> | |
112 </outputs> | |
113 <tests> | |
114 <test> | |
115 <param name='input_tab' value='tf2_test_in.xls' ftype='tabular' /> | |
116 <param name="make_TAB" value="yes" /> | |
117 <param name="make_HTML" value="yes" /> | |
118 <param name="out_format" value="tabular" /> | |
119 <param name="interpreter" value='python' /> | |
120 <param name="runme" value="tf2_test_runme.py"/> | |
121 <output name='output1' file='tf2_test_out.xls' compare='diff' lines_diff = '10'/> | |
122 <output name='html_file' file="tf2_test.html" compare='diff' lines_diff = '10'/> | |
123 </test> | |
124 </tests> | |
125 <expand macro="help_macro" /> | |
126 <expand macro="test_data_macro" /> | |
127 </tool> |