annotate fubar-galaxytoolfactory-58871556de57/rgToolFactory.xml @ 6:cb4937b0c21d draft

This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
author fubar
date Sun, 24 Feb 2013 17:15:29 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
1 <tool id="rgTF" name="Tool Factory" version="0.10">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
2 <description>Makes scripts into tools</description>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
3 <command interpreter="python">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
4 #if ( $__user_email__ not in $__admin_users__ ):
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
5 rgToolFactory.py --bad_user $__user_email__
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
6 #else:
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
7 rgToolFactory.py --script_path "$runme" --interpreter "$interpreter"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
8 --tool_name "$tool_name" --user_email "$__user_email__"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
9 #if $make_TAB.value=="yes":
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
10 --output_tab "$tab_file"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
11 #end if
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
12 #if $makeMode.make_Tool=="yes":
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
13 --make_Tool "$makeMode.make_Tool"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
14 --tool_desc "$makeMode.tool_desc"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
15 --tool_version "$makeMode.tool_version"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
16 --new_tool "$new_tool"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
17 --help_text "$helpme"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
18 #end if
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
19 #if $make_HTML.value=="yes":
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
20 --output_dir "$html_file.files_path" --output_html "$html_file" --make_HTML "yes"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
21 #end if
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
22 #if $input1 != 'None':
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
23 --input_tab "$input1"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
24 #end if
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
25 #end if
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
26 </command>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
27 <inputs>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
28 <param name="input1" type="data" label="Select an input file from your history" optional="true" size="120"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
29 help="Most scripts will need an input - your script MUST be ready for whatever format you choose"/>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
30 <param name="tool_name" type="text" value="My dynamic script" label="New tool ID and title for outputs" size="60"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
31 help="This will become the toolshed repository name so please choose thoughtfully to avoid namespace clashes with other tool writers">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
32 <sanitizer invalid_char="">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
33 <valid initial="string.letters,string.digits"/>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
34 </sanitizer>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
35 </param>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
36 <conditional name="makeMode">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
37 <param name="make_Tool" type="select" label="Create a tar.gz file ready for local toolshed entry" help="Ready to deploy securely!" size="60">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
38 <option value="yes">Generate a Galaxy ToolShed compatible toolshed.gz</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
39 <option value="" selected="true">No. Just run the script please</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
40 </param>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
41 <when value = "yes">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
42 <param name="tool_version" label="Tool Version - bump this to warn users trying to redo old analyses" type="text" value="0.01"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
43 help="If you change your script and regenerate the 'same' tool, you should inform Galaxy (and users) by changing (bumping is traditional) this number"/>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
44 <param name="tool_desc" label="Tool Description" type="text" value="" size="40"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
45 help="Supply a brief tool description for the Galaxy tool menu entry (optional - appears after the tool name)" />
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
46 <param name="help_text" label="Tool form documentation and help text for users" type="text" area="true"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
47 size="8x120" value="**What it Does**"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
48 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" >
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
49 <sanitizer>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
50 <valid initial="string.printable">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
51 </valid>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
52 <mapping initial="none"/>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
53 </sanitizer>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
54 </param>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
55 </when>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
56 <when value = "">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
57 </when>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
58 </conditional>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
59 <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"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
60 help="Recommended for presenting complex outputs in an accessible manner. Turn off for simple tools so they just create one output">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
61 <option value="yes">Yes, arrange all outputs in an HTML output</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
62 <option value="" selected="true">No, no HTML output file thanks</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
63 </param>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
64
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
65
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
66 <param name="make_TAB" type="select" label="Create a new (default tabular) history output"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
67 help="This is useful if your script creates a single new tabular file you want to appear in the history after the tool executes">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
68 <option value="yes" selected="true">My script writes to a new history output</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
69 <option value="">I only want an HTML output file</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
70 </param>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
71 <param name="out_format" type="select" label="Galaxy datatype for your tool's output file" help="You may need to edit the xml to extend this list">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
72 <option value="tabular" selected="true">Tabular</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
73 <option value="interval">Interval</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
74 <option value="gz">gz</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
75 <option value="text">text</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
76 </param>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
77 <param name="interpreter" type="select" label="Select the interpreter for your code. This must be available on the path of the execution host">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
78 <option value="Rscript" selected="true">Rscript</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
79 <option value="python">python</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
80 <option value="perl">perl</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
81 <option value="sh">sh</option>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
82 </param>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
83 <param name="dynScript" label="Cut and paste the script to be executed here" type="text" value="" area="True" size="8x120"
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
84 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').">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
85 <sanitizer>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
86 <valid initial="string.printable">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
87 </valid>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
88 <mapping initial="none"/>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
89 </sanitizer>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
90 </param>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
91 </inputs>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
92 <outputs>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
93 <data format="tabular" name="tab_file" label="${tool_name}.${out_format}">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
94 <filter>make_TAB=="yes"</filter>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
95 <change_format>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
96 <when input="out_format" value="interval" format="interval" />
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
97 <when input="out_format" value="gz" format="gz" />
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
98 <when input="out_format" value="text" format="text" />
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
99 </change_format>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
100 </data>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
101 <data format="html" name="html_file" label="${tool_name}.html">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
102 <filter>make_HTML == "yes"</filter>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
103 </data>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
104 <data format="toolshed.gz" name="new_tool" label="${tool_name}.toolshed.gz">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
105 <filter>makeMode['make_Tool'] == "yes"</filter>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
106 </data>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
107 </outputs>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
108 <configfiles>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
109 <configfile name="runme">$dynScript</configfile>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
110 <configfile name="helpme">
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
111 #if $makeMode.make_Tool == "yes":
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
112 ${makeMode.help_text}
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
113 #end if
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
114 </configfile>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
115 </configfiles>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
116 <help>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
117
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
118 .. class:: warningmark
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
119
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
120 **Details and attribution** GTF_
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
121
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
122 **Local Admins ONLY** Only users whose IDs found in the local admin_user configuration setting in universe_wsgi.ini can run this tool.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
123
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
124 **If you find a bug** please raise an issue at the bitbucket repository GTFI_
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
125
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
126 **What it does** This tool enables a user to paste and submit an arbitrary R/python/perl script to Galaxy.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
127
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
128 **Input options** This version is limited to simple transformation or reporting requiring only a single input file selected from the history.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
129
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
130 **Output options** Optional script outputs include one single new history tabular file, or for scripts that create multiple outputs,
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
131 a new HTML report linking all the files and images created by the script can be automatically generated.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
132
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
133 **Tool Generation option** Once the script is working with test data, this tool will optionally generate a new Galaxy tool in a gzip file
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
134 ready to upload to your local toolshed for sharing and installation. Provide a small sample input when you run generate the tool because
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
135 it will become the input for the generated functional test.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
136
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
137 .. class:: warningmark
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
138
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
139 **Note to system administrators** This tool offers *NO* built in protection against malicious scripts. It should only be installed on private/personnal Galaxy instances.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
140 Admin_users will have the power to do anything they want as the Galaxy user if you install this tool.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
141
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
142 .. class:: warningmark
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
143
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
144 **Use on public servers** is STRONGLY discouraged for obvious reasons
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
145
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
146 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.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
147 We recommend that you follow the good code hygiene practices associated with safe toolshed.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
148
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
149 **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
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
150 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.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
151 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.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
152 This can be handy for complex scripts creating lots of output.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
153
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
154 **Examples**
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
155 <![CDATA[
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
156
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
157 Each of these following trivial examples can be cut and pasted into the script box for testing.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
158 Please make sure you choose the appropriate interpreter and upload and select a suitable small matching test data input
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
159
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
160 A simple Rscript "filter" showing how the command line parameters can be handled, takes an input file, does something (transpose in this case) and
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
161 writes the results to a new tabular file. Note the use of colClasses to ensure that no fiddling takes place with numeric values by treating everything
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
162 as a string::
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
163
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
164 # transpose a tabular input file and write as a tabular output file
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
165 ourargs = commandArgs(TRUE)
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
166 inf = ourargs[1]
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
167 outf = ourargs[2]
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
168 inp = read.table(inf,head=F,row.names=NULL,sep='\t',colClasses="character")
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
169 outp = t(inp)
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
170 write.table(outp,outf, quote=FALSE, sep="\t",row.names=F,col.names=F)
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
171
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
172 Calculate a multiple test adjusted p value from a column of p values - for this script to be useful, it needs the right column for the input to be specified in the code for the
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
173 given input file type(s) specified when the tool is generated ::
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
174
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
175 # use p.adjust - assumes a HEADER row and column 1 - please fix for any real use
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
176 column = 1 # adjust if necessary for some other kind of input
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
177 ourargs = commandArgs(TRUE)
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
178 inf = ourargs[1]
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
179 outf = ourargs[2]
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
180 inp = read.table(inf,head=T,row.names=NULL,sep='\t')
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
181 p = inp[,column]
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
182 q = p.adjust(p,method='BH')
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
183 outp = cbind(inp,'BH Adjusted p-value'=q)
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
184 write.table(outp,outf, quote=FALSE, sep="\t",row.names=F,col.names=T)
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
185
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
186
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
187 A demonstration Rscript example takes no input file but generates some random data based pdf images
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
188 You must make sure the option to create an HTML output file is
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
189 turned on for this to work. Images (pdf) are linked via thumbnails and
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
190 all files have a link on the resulting HTML page::
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
191
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
192 # note this script takes NO input or output because it generates random data
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
193 foo = data.frame(a=runif(100),b=runif(100),c=runif(100),d=runif(100),e=runif(100),f=runif(100))
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
194 bar = as.matrix(foo)
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
195 pdf( "heattest.pdf" )
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
196 heatmap(bar,main='Random Heatmap')
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
197 dev.off()
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
198 for (i in 1:49) {
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
199 foo = runif(100)
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
200 bar = rnorm(100)
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
201 pdf(paste('yet',i,"anotherplot.pdf",sep='_'))
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
202 plot(foo,bar,main=paste("Foo by Bar plot #",i),col="maroon", pch=3,cex=0.6)
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
203 dev.off()
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
204 }
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
205
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
206 A Python example that reverses each row of a tabular file (you'll need to remove the leading spaces
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
207 for this to work if cut and pasted into the script box)::
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
208
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
209 # reverse order of columns in a tabular file
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
210 import sys
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
211 inp = sys.argv[1]
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
212 outp = sys.argv[2]
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
213 i = open(inp,'r')
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
214 o = open(outp,'w')
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
215 for row in i:
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
216 rs = row.rstrip().split('\t')
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
217 rs.reverse()
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
218 o.write('\t'.join(rs))
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
219 o.write('\n')
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
220 i.close()
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
221 o.close()
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
222
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
223 A trivial shell script example to show that it works::
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
224
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
225 #!/bin/bash
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
226 INF=$1
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
227 OUTF=$2
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
228 cut -c2,4,6,8,10,12 $INF > $OUTF
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
229
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
230 A trivial perl script example to show that even perl works::
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
231
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
232 #
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
233 # change all occurances of a string in a file to another string
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
234 #
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
235 $oldfile = $ARGV[0];
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
236 $newfile = $ARGV[1];
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
237 $old = "gene";
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
238 $new = "foo";
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
239 open(OF, $oldfile);
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
240 open(NF, ">$newfile");
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
241 # read in each line of the file
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
242 while ($line = <OF>) {
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
243 $line =~ s/$old/$new/;
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
244 print NF $line;
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
245 }
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
246 close(OF);
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
247 close(NF);
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
248
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
249 ]]>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
250
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
251 **Citation**
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
252
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
253
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
254 Paper_ :
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
255
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
256 Creating re-usable tools from scripts: The Galaxy Tool Factory
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
257 Ross Lazarus; Antony Kaspi; Mark Ziemann; The Galaxy Team
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
258 Bioinformatics 2012; doi: 10.1093/bioinformatics/bts573
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
259
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
260
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
261 **Licensing**
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
262
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
263 Copyright Ross Lazarus (ross period lazarus at gmail period com) May 2012
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
264 All rights reserved.
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
265 Licensed under the LGPL_
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
266
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
267 .. _LGPL: http://www.gnu.org/copyleft/lesser.html
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
268 .. _GTF: https://bitbucket.org/fubar/galaxytoolfactory
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
269 .. _GTFI: https://bitbucket.org/fubar/galaxytoolfactory/issues
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
270 .. _Paper: http://bioinformatics.oxfordjournals.org/cgi/reprint/bts573?ijkey=lczQh1sWrMwdYWJ&amp;keytype=ref
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
271
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
272
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
273 </help>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
274
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
275 </tool>
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
276
cb4937b0c21d This fixes a problem reported by Carlos with perl scripts - now use CDATA segments to protect that horrible syntax from Cheetah - seems to work properly now.
fubar
parents:
diff changeset
277