Mercurial > repos > bebatut > plot_grouped_barplot
comparison plot_grouped_barplot.xml @ 0:6c9aac0d6ca2 draft default tip
planemo upload for repository https://github.com/asaim/galaxytools/tree/master/tools/plot_grouped_barplot commit c6ba903395dc6d41cb318c7d95a2d9cf3ca65313-dirty
author | bebatut |
---|---|
date | Mon, 18 Apr 2016 10:08:25 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6c9aac0d6ca2 |
---|---|
1 <tool id="plot_grouped_barplot" name="Plot grouped 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_grouped_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 #set $column_with_data="" | |
28 #set $colors="" | |
29 #set $names="" | |
30 #set $sep="" | |
31 #for sample in $samples: | |
32 #set $column_with_data = $column_with_data + $sep + str($sample.column_id) | |
33 #set $colors = $colors + $sep + str($sample.color) | |
34 #set $names = $names + $sep +str($sample.name) | |
35 #set $sep="," | |
36 #end for | |
37 #set $column_with_data = $column_with_data | |
38 #set $colors = $colors | |
39 #set $names = $names | |
40 | |
41 --data_column $column_with_data | |
42 --col "$colors" | |
43 --names "$names" | |
44 --replace_null $replace_null | |
45 --order $order | |
46 --names_column $names_column | |
47 --xlab "$xlab" | |
48 --log $log | |
49 --bottom_margin $bottom_margin | |
50 --left_margin $left_margin | |
51 --top_margin $top_margin | |
52 --right_margin $right_margin | |
53 --legend_pos $legend_pos | |
54 ]]></command> | |
55 | |
56 <inputs> | |
57 <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)"/> | |
58 | |
59 <param name="header" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Header in first line?" help="(--header)"/> | |
60 | |
61 <param name="output_format" label="Format for output image" type="select" help=""> | |
62 <option value="pdf" selected="True">PDF</option> | |
63 <option value="svg">SVG</option> | |
64 </param> | |
65 | |
66 <repeat name="samples" title="Add sample information (column id, name, color)" > | |
67 <param name="name" type="text" label="Name of the data" help="(--sample_name)"/> | |
68 <param name="column_id" type="data_column" data_ref="input_file" label="Column containing corresponding data" multiple="false" numerical="true" help="(after normalization, --charact_input_file)"/> | |
69 <param name="color" label="Bar color" type="text" value= "blue" help="R color (--col)"/> | |
70 </repeat> | |
71 <param name="replace_null" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Replace null values by NA?" help="(--replace_null)"/> | |
72 <param name="order" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Order given the first chosen data?" help="(--order)"/> | |
73 | |
74 <param name="names_column" type="data_column" data_ref="input_file" multiple="false" numerical="false" label="Column containing data names?" help="(--names_column)" /> | |
75 | |
76 <param name="xlab" type="text" value="" label="Label for x axis" help="(--xlab)"/> | |
77 | |
78 <param name="log" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Log scale?" help="(--log)"/> | |
79 | |
80 <param name="bottom_margin" type="integer" value="5" label="Bottom margin" help="(--bottom_margin)"/> | |
81 <param name="left_margin" type="integer" value="19" label="Left margin" help="(--left_margin)"/> | |
82 <param name="top_margin" type="integer" value="1" label="Top margin" help="(--top_margin)"/> | |
83 <param name="right_margin" type="integer" value="1" label="Right margin" help="(--right_margin)"/> | |
84 <param name="legend_pos" label="Position of the legend" type="select" help=""> | |
85 <option value="topright" selected="True">Top right</option> | |
86 <option value="topleft">Top left</option> | |
87 <option value="bottomright">Bottom right</option> | |
88 <option value="bottomleft">Bottom left</option> | |
89 </param> | |
90 </inputs> | |
91 | |
92 <outputs> | |
93 <data name="output_pdf_file" format="pdf" | |
94 label="${tool.name} on ${on_string}: PDF barplot"> | |
95 <filter>output_format=="pdf"</filter> | |
96 </data> | |
97 <data name="output_png_file" format="png" | |
98 label="${tool.name} on ${on_string}: PNG barplot"> | |
99 <filter>output_format=="png"</filter> | |
100 </data> | |
101 <data name="output_svg_file" format="svg" | |
102 label="${tool.name} on ${on_string}: SVG barplot"> | |
103 <filter>output_format=="svg"</filter> | |
104 </data> | |
105 </outputs> | |
106 | |
107 <tests> | |
108 <test> | |
109 <param name="input_file" value="input_file.txt"/> | |
110 <param name='header' value="FALSE"/> | |
111 <param name="output_format" value="pdf"/> | |
112 <param name="samples_0|name" value="A"/> | |
113 <param name="samples_0|column_id" value="2"/> | |
114 <param name="samples_0|color" value="blue"/> | |
115 <param name="samples_1|name" value="B"/> | |
116 <param name="samples_1|column_id" value="3"/> | |
117 <param name="samples_1|color" value="red"/> | |
118 <param name="replace_null" value="FALSE"/> | |
119 <param name="order" value="FALSE"/> | |
120 <param name="names_column" value="1"/> | |
121 <param name='xlab' value=""/> | |
122 <param name='log' value="FALSE"/> | |
123 <param name='bottom_margin' value="5"/> | |
124 <param name="left_margin" value="19"/> | |
125 <param name='top_margin' value="1"/> | |
126 <param name='right_margin' value="1"/> | |
127 <param name="legend_pos" value="topright"/> | |
128 <output name="output_pdf_file" file="output_file.pdf"/> | |
129 </test> | |
130 </tests> | |
131 | |
132 <help><![CDATA[ | |
133 **What it does** | |
134 | |
135 This tool plot a grouped barplot with multiple data: | |
136 | |
137 .. image:: $PATH_TO_IMAGES/output.png | |
138 :scale: 50 % | |
139 | |
140 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. | |
141 ]]></help> | |
142 | |
143 <citations> | |
144 </citations> | |
145 </tool> |