comparison plot_barplot.xml @ 0:a8e03ffaaedc draft

planemo upload for repository https://github.com/asaim/galaxytools/tree/master/tools/plot_barplot commit 74beefba9d138c892208b103b52e706ab4313a4a-dirty
author bebatut
date Mon, 18 Apr 2016 10:35:54 -0400
parents
children 7e3103db022d
comparison
equal deleted inserted replaced
-1:000000000000 0:a8e03ffaaedc
1 <tool id="plot_barplot" name="Plot barplot" version="0.1.0">
2 <description>with R</description>
3
4 <requirements>
5 <requirement type="package" version="3.2.1">R</requirement>
6 <requirement type="package" version="1.20.0">r-getopt</requirement>
7 </requirements>
8
9 <stdio>
10 <exit_code range="1:" />
11 <exit_code range=":-1" />
12 </stdio>
13
14 <version_command></version_command>
15
16 <command><![CDATA[
17 Rscript $__tool_directory__/plot_barplot.R
18 --input_file $input_file
19 --header $header
20
21 #if str($output_format)=="pdf"
22 --output_pdf_file $output_pdf_file
23 #else
24 --output_svg_file $output_svg_file
25 #end if
26
27
28 --data_column $column_with_data
29 --names_column $names_column
30 --xlab "$xlab"
31 --col $col
32 --bottom_margin $bottom_margin
33 --left_margin $left_margin
34 --top_margin $top_margin
35 --right_margin $right_margin
36 ]]></command>
37
38 <inputs>
39 <param name="input_file" type="data" format="tabular,tsv,csv" label="Input file" help="File in tabular format with tab-separated columns and header in first line (--input_file)"/>
40
41 <param name="header" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Header in first line?" help="(--header)"/>
42
43 <param name="output_format" label="Format for output image" type="select" help="">
44 <option value="pdf" selected="True">PDF</option>
45 <option value="svg">SVG</option>
46 </param>
47
48 <param name="column_with_data" type="data_column" data_ref="input_file" multiple="false" numerical="true" label="Column containing data?" help="(--data_column)" />
49
50 <param name="names_column" type="data_column" data_ref="input_file" multiple="false" numerical="false" label="Column containing data names?" help="(--names_column)" />
51
52 <param name="xlab" type="text" value="" label="Label for x axis" help="(--xlab)"/>
53
54 <param name="col" label="Bar color" type="text" value= "blue" help="R color (--col)"/>
55
56 <param name="bottom_margin" type="integer" value="5" label="Bottom margin" help="(--bottom_margin)"/>
57 <param name="left_margin" type="integer" value="19" label="Left margin" help="(--left_margin)"/>
58 <param name="top_margin" type="integer" value="1" label="Top margin" help="(--top_margin)"/>
59 <param name="right_margin" type="integer" value="1" label="Right margin" help="(--right_margin)"/>
60 </inputs>
61
62 <outputs>
63 <data name="output_pdf_file" format="pdf"
64 label="${tool.name} on ${on_string}: PDF barplot">
65 <filter>output_format=="pdf"</filter>
66 </data>
67 <data name="output_png_file" format="png"
68 label="${tool.name} on ${on_string}: PNG barplot">
69 <filter>output_format=="png"</filter>
70 </data>
71 <data name="output_svg_file" format="svg"
72 label="${tool.name} on ${on_string}: SVG barplot">
73 <filter>output_format=="svg"</filter>
74 </data>
75 </outputs>
76
77 <tests>
78 <test>
79 <param name="input_file" value="input_file.txt"/>
80 <param name="header" value="FALSE"/>
81 <param name="output_format" value="pdf"/>
82 <param name="column_with_data" value="2"/>
83 <param name="names_column" value="1"/>
84 <param name="xlab" value=""/>
85 <param name="col" value="blue"/>
86 <param name="bottom_margin" value="5"/>
87 <param name="left_margin" value="19"/>
88 <param name="top_margin" value="1"/>
89 <param name="right_margin" value="1"/>
90 <output name="output_pdf_file" file="output_test_col_2.pdf"/>
91 </test>
92 <test>
93 <param name="input_file" value="input_file.txt"/>
94 <param name="header" value="FALSE"/>
95 <param name="output_format" value="pdf"/>
96 <param name="column_with_data" value="3"/>
97 <param name="names_column" value="1"/>
98 <param name="xlab" value=""/>
99 <param name="col" value="red"/>
100 <param name="bottom_margin" value="5"/>
101 <param name="left_margin" value="19"/>
102 <param name="top_margin" value="1"/>
103 <param name="right_margin" value="1"/>
104 <output name="output_pdf_file" file="output_test_col_3.pdf"/>
105 </test>
106 </tests>
107
108 <help><![CDATA[
109 **What it does**
110
111 This tool plot a barplot.
112
113 .. image:: $PATH_TO_IMAGES/output.png
114 :scale: 50 %
115
116 This tool relies on R's barplot function. The input file must be a tabular file with multiple columns: a column with row names (for bar names) and a least a column with data. The output image is customizable (margin, legend positions, ...) and can be export in different format.
117 ]]></help>
118
119 <citations>
120 </citations>
121 </tool>