annotate rgDynamicScriptWrapper.xml @ 4:3755b2365fb0

More edits to readme
author ross lazarus ross.lazarus@gmail.com
date Thu, 31 May 2012 09:49:38 +1000
parents fda8032fe989
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
1 <tool id="rgDynamic1" name="Dynamic Script Runner" version="0.03">
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
2 <description>DIY scripting</description>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
3 <command interpreter="python">
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
4 #if ( $__user_email__ not in ['rlazarus@bakeridi.edu.au','mziemann@bakeridi.edu.au','akaspi@bakeridi.edu.au'] ):
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
5 rgDynamicScriptWrapper.py --bad_user $__user_email__
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
6 #else:
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
7 rgDynamicScriptWrapper.py --script_path "$runme" --interpreter "$interpreter"
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
8 --tool_name "$tool_name" --input_tab "$input1" --user_email "${__user_email__}"
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
9 #if $makeHTML.value=="yes":
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
10 --output_dir "$html_file.files_path" --output_html "$html_file"
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
11 #end if
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
12 #if $makeTAB.value=="yes":
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
13 --output_tab "$tab_file"
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
14 #end if
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
15 #end if
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
16 </command>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
17 <inputs>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
18 <param name="input1" type="data" format="tabular" label="Select an optional input tabular file from your history" optional="true"
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
19 help="Your script probably needs an input - but if not, this can be left unassigned"/>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
20 <param name="tool_name" type="text" value="My dynamic script" size="80" label="Title for job outputs" help="Supply a meaningful name here to remind you what the outputs contain"/>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
21 <param name="makeHTML" type="select" label="Create an HTML output with all script outputs collected together, with thumbnails of new PDF images, the script and a run log file"
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
22 help="This is useful for presenting complex outputs and is not needed if your script doesn't create anything other than a single tabular output">
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
23 <option value="yes">Yes</option>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
24 <option value="" selected="true">No</option>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
25 </param>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
26 <param name="makeTAB" type="select" label="Create a new tabular history output"
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
27 help="This is useful if your script creates a single new tabular file you want to appear in the history after the tool executes">
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
28 <option value="yes" selected="true">Yes</option>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
29 <option value="">No</option>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
30 </param>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
31 <param name="interpreter" type="select" label="Select the interpreter for your code. This must be available on the path of the execution host">
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
32 <option value="Rscript" selected="true">Rscript</option>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
33 <option value="python">python</option>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
34 <option value="perl (ugh)">perl</option>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
35 </param>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
36 <param name="dynScript" label="Your Script Goes Here" type="text" value="" area="True" size="8x80" width="80"
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
37 help="Expect FIRST CL parameter = the optional input tabular file path (or NONE if not specified). Ensure your script writes tabular output to the path in the SECOND command line parameter it gets."/>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
38 </inputs>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
39 <outputs>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
40 <data format="tabular" name="tab_file" label="${tool_name}.xls">
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
41 <filter> makeTAB=="yes" </filter>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
42 </data>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
43 <data format="html" name="html_file" label="${tool_name}.html">
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
44 <filter> makeHTML=="yes" </filter>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
45 </data>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
46 </outputs>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
47 <configfiles>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
48 <configfile name="runme">
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
49 ${dynScript}
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
50 </configfile>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
51 </configfiles>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
52 <help>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
53 **What it does**
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
54 This tool enables a user to paste and submit an arbitrary R/python/perl script to run in Galaxy.
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
55 This is (extremely) insecure.
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
56
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
57 **Restrictions**
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
58 This tool will ONLY work if your user id has been added to the local copy's list of permitted users.
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
59 Ask your friendly Galaxy administrator to edit this tool's source for you if you need this.
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
60
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
61 **Note to system administrators**
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
62 Under no circumstances should you allow any user to use this tool unless you really, really trust them to do
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
63 no harm.
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
64
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
65 **Use on public servers**
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
66 is STRONGLY discouraged for obvious reasons
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
67
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
68 **Scripting conventions**
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
69 The pasted script will be executed.
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
70 It will get the path to the (optional) input tabular data file path or NONE if you do not select one
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
71 as the first command line parameter
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
72
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
73 The script must write it's output as tab delimited text to the path found as the second command line parameter
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
74 Note that if an optional HTML output is selected, all the output files spewed by your script will be nicely presented as links to the user.
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
75 Any pdf images will automagically be converted to show thumbnails in that output.
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
76 This can be handy for complex scripts creating lots of output.
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
77
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
78 **Simple Rscript example**
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
79
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
80 A simple "filter" that takes an input file, does something and writes the results to a new tabular file might look like this::
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
81
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
82 ourargs = commandArgs(TRUE)
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
83 inf = ourargs[1]
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
84 outf = ourargs[2]
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
85 inp = read.table(inf,head=F,row.names=NULL,sep='\t')
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
86 inp[,5] = runif ( nrow(inp) )
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
87 write.table(inp,outf, quote=FALSE, sep="\t",row.names=F,col.names=F)
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
88
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
89
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
90 </help>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
91
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
92 </tool>
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
93
fda8032fe989 Initial checkin of dynamic script runner. Goal is to add code to generate a new toolshed entry once the script works correctly
ross lazarus ross.lazarus@gmail.com
parents:
diff changeset
94