Mercurial > repos > iuc > ggplot2_pca
comparison macros.xml @ 0:c21099566418 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ggplot2 commit f9fb73a88ab8b52ce11c25a966d4fe99e67c9fbf
author | iuc |
---|---|
date | Mon, 11 Jun 2018 16:05:29 -0400 |
parents | |
children | 1b9406a1a769 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c21099566418 |
---|---|
1 <?xml version="1.0"?> | |
2 <macros> | |
3 <xml name="requirements"> | |
4 <requirements> | |
5 <requirement type="package" version="@VERSION@">r-ggplot2</requirement> | |
6 <yield /> | |
7 </requirements> | |
8 </xml> | |
9 <token name="@VERSION@">2.2.1</token> | |
10 | |
11 <token name="@R_INIT@"><![CDATA[ | |
12 ## Setup R error handling to go to stderr | |
13 options(show.error.messages=F, error=function(){cat(geterrmessage(), file=stderr()); q("no",1,F)}) | |
14 | |
15 ## Unify locale settings | |
16 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") | |
17 ]]></token> | |
18 | |
19 <token name="@TRANSFORM@"><![CDATA[ | |
20 #if $adv.transform == "log2" | |
21 input["value"] <- log2(input["value"]) | |
22 #elif $adv.transform == "log2plus1" | |
23 input["value"] <- log2(input["value"]+1) | |
24 #elif $adv.transform == "log10" | |
25 input["value"] <- log10(input["value"]) | |
26 #elif $adv.transform == "log10plus1" | |
27 input["value"] <- log10(input["value"]+1) | |
28 #end if | |
29 ]]></token> | |
30 | |
31 <token name="@XY_SCALING@"><![CDATA[ | |
32 #Choose between automatically scaled x and y axis or user defined | |
33 #if $adv.scaling.plot_scaling == "Automatic" | |
34 gg_scalex = NULL | |
35 gg_scaley = NULL | |
36 #else | |
37 gg_scalex = xlim($adv.scaling.xaxismin, $adv.scaling.xaxismax) | |
38 gg_scaley = ylim($adv.scaling.yaxismin, $adv.scaling.yaxismax) | |
39 cat("\n xaxismin: ", $adv.scaling.xaxismin) | |
40 cat("\n xaxismax: ", $adv.scaling.xaxismax) | |
41 cat("\n yaxismin: ", $adv.scaling.yaxismin) | |
42 cat("\n yaxismax: ", $adv.scaling.yaxismax) | |
43 #end if | |
44 ]]></token> | |
45 | |
46 <token name="@THEME@"><![CDATA[ | |
47 ## Choose theme for plot | |
48 #if $adv.theme == "bw" | |
49 gg_theme = theme_bw() | |
50 #else | |
51 gg_theme = NULL | |
52 #end if | |
53 ]]></token> | |
54 | |
55 <token name="@LEGEND@"><![CDATA[ | |
56 ## Show/hide legend | |
57 #if $adv.legend == "yes" | |
58 gg_legend = theme(legend.position="right") | |
59 #else | |
60 gg_legend = theme(legend.position="none") | |
61 cat("\n no legend") | |
62 #end if | |
63 ]]></token> | |
64 <token name="@SAVE_OUTPUT@"><![CDATA[ | |
65 ## output options need to be in out section | |
66 gg_width <- as.double('$out.width_output_dim') | |
67 gg_height <- as.double('$out.height_output_dim') | |
68 gg_unit <- '$out.unit_output_dim' | |
69 gg_dpi <- as.double('$out.dpi_output_dim') | |
70 gg_add_device <- '$out.additional_output_format' | |
71 output1 <- '$output1' | |
72 output2 <- '$output2' | |
73 | |
74 ## ggsave to png | |
75 ggsave(filename = output1, plot = plot_out, width = gg_width, height = gg_height, units = gg_unit, dpi = gg_dpi, device = "png") | |
76 if(gg_add_device != "none"){ | |
77 ggsave(filename = output2, plot = plot_out, width = gg_width, height = gg_height, units = gg_unit, dpi = gg_dpi, device = gg_add_device) | |
78 } | |
79 ]]></token> | |
80 <xml name="read_complex_input"> | |
81 <param name="input1" type="data" format="tabular" label="Select table"/> | |
82 <conditional name="inputdata"> | |
83 <param name="input_type" type="select" label="Select input dataset options" help="specific dataset input for reading"> | |
84 <option value="with_header" selected="true">Dataset with header</option> | |
85 <option value="with_rownames">Dataset with row names</option> | |
86 <option value="with_header_rownames">Dataset with header and row names</option> | |
87 <option value="no_header_rownames">Dataset without header or row names</option> | |
88 </param> | |
89 <when value="with_header"> | |
90 <param name="header" type="hidden" value="TRUE"/> | |
91 <param name="row_names_index" type="hidden" value="0"/> | |
92 <param name="sample_name_orientation" type="select" display="radio" multiple="false" label="Sample names orientation" help="Default horizontal: header names are interpreted as sample names"> | |
93 <option value="TRUE" selected="true">horizontal</option> | |
94 <option value="FALSE">vertial</option> | |
95 </param> | |
96 </when> | |
97 <when value="with_rownames"> | |
98 <param name="header" type="hidden" value="FALSE"/> | |
99 <param name="row_names_index" type="data_column" data_ref="input1" label="Select column, for row names" help="WARNING: please consider that using row names might shift the grouping columns"/> | |
100 <param name="sample_name_orientation" type="select" display="radio" label="Sample names orientation" help="default vertial: row names are interpreted as sample names"> | |
101 <option value="TRUE">horizontal</option> | |
102 <option value="FALSE" selected="true">vertial</option> | |
103 </param> | |
104 </when> | |
105 <when value="with_header_rownames"> | |
106 <param name="header" type="hidden" value="TRUE"/> | |
107 <param name="row_names_index" type="data_column" data_ref="input1" label="Select column, for row names" help="WARNING: please consider that using row names might shift the grouping columns"/> | |
108 <param name="sample_name_orientation" type="select" label="Sample names orientation" display="radio" multiple="false" help="deside whether header names or row names are interpreted as sample names"> | |
109 <option value="TRUE" selected="true">horizontal</option> | |
110 <option value="FALSE">vertial</option> | |
111 </param> | |
112 </when> | |
113 <when value="no_header_rownames"> | |
114 <param name="header" type="hidden" value="FALSE"/> | |
115 <param name="row_names_index" type="hidden" value="0"/> | |
116 <param name="sample_name_orientation" type="hidden" value="TRUE"/> | |
117 </when> | |
118 </conditional> | |
119 </xml> | |
120 <xml name="transform"> | |
121 <param name="transform" type="select" label="Data transformation"> | |
122 <option value="none">Plot the data as it is</option> | |
123 <option value="log2">Log2(value) transform my data</option> | |
124 <option value="log2plus1">Log2(value+1) transform my data</option> | |
125 <option value="log10">Log10(value) transform my data</option> | |
126 <option value="log10plus1">Log10(value+1) transform my data</option> | |
127 </param> | |
128 </xml> | |
129 <xml name="xy_scaling"> | |
130 <conditional name="scaling"> | |
131 <param name="plot_scaling" type="select" label="Axis scaling"> | |
132 <option value="Automatic" selected="true">Automatic axis scaling</option> | |
133 <option value="Defined">User-defined axis scales</option> | |
134 </param> | |
135 <when value="Automatic"> | |
136 <!--Do nothing here --> | |
137 </when> | |
138 <when value="Defined"> | |
139 <param name="xaxismin" type="integer" value="0" label="minimal range of x-axis" /> | |
140 <param name="xaxismax" type="integer" value="3" label="maximal range of x-axis" /> | |
141 <param name="yaxismin" type="integer" value="0" label="minimal range of y-axis" /> | |
142 <param name="yaxismax" type="integer" value="3" label="maximal range of y-axis" /> | |
143 </when> | |
144 </conditional> | |
145 </xml> | |
146 <xml name="title"> | |
147 <param name="title" type="text" value="" label="Plot title"> | |
148 <!--<sanitizer sanitize="false"/> --> | |
149 </param> | |
150 </xml> | |
151 <xml name="xy_lab"> | |
152 <param name="xlab" type="text" value="title of x-axis" label="Label for x axis"> | |
153 <sanitizer sanitize="false"/> | |
154 </param> | |
155 <param name="ylab" type="text" value="title of y-axis" label="Label for y axis"> | |
156 <sanitizer sanitize="false"/> | |
157 </param> | |
158 </xml> | |
159 <xml name="legend"> | |
160 <param name="legend" type="select" label="Legend options"> | |
161 <option value="yes">Include legend on plot</option> | |
162 <option value="no">Hide legend</option> | |
163 </param> | |
164 </xml> | |
165 <xml name="theme"> | |
166 <param name="theme" type="select" label="Backgound theme for plot"> | |
167 <option value="bw">Black and white</option> | |
168 <option value="Default">Default (grey)</option> | |
169 </param> | |
170 </xml> | |
171 <xml name="dimensions"> | |
172 <param name="unit_output_dim" type="select" label="Unit of output dimensions" help="default inches"> | |
173 <option value="in" selected="true">Inches (in)</option> | |
174 <option value="cm">Centimeters (cm)</option> | |
175 <option value="mm">Millimeters (mm)</option> | |
176 </param> | |
177 <param name="width_output_dim" type="float" value="7" label="width of output"/> | |
178 <param name="height_output_dim" type="float" value="7" label="height of output"/> | |
179 <param name="dpi_output_dim" type="float" value="300" label="dpi of output" help="Plot resolution. Applies only to raster output types."/> | |
180 <param name="additional_output_format" type="select" label="Additional output format" help="PNG is always selected as output format"> | |
181 <option value="none" selected="true">only PNG</option> | |
182 <option value="pdf">PDF</option> | |
183 <option value="svg">SVG</option> | |
184 <option value="eps">EPS</option> | |
185 <option value="ps">PS</option> | |
186 <option value="tex">TEX (pictex)</option> | |
187 <option value="jpeg">JPEG</option> | |
188 <option value="tiff">TIFF</option> | |
189 <option value="bmp">BMP</option> | |
190 </param> | |
191 </xml> | |
192 <xml name="citations"> | |
193 <citations> | |
194 <citation type="bibtex">@book{wickham2009ggplot2, | |
195 author = {Hadley Wickham}, | |
196 title = {ggplot2: Elegant Graphics for Data Analysis}, | |
197 publisher = {Springer-Verlag New York}, | |
198 year = {2009}, | |
199 isbn = {978-0-387-98140-6}, | |
200 url = {http://ggplot2.org}, | |
201 } | |
202 </citation> | |
203 <yield /> | |
204 </citations> | |
205 </xml> | |
206 <xml name="axis_customization" token_label="Axis title options"> | |
207 <param name="axis_customization" type="select" label="@LABEL@"> | |
208 <option value="default" selected="true">Default</option> | |
209 <option value="defined">User defined label options</option> | |
210 </param> | |
211 <when value="default"> | |
212 <!--Do nothing here --> | |
213 </when> | |
214 <when value="defined"> | |
215 <param name="size" type="float" value="12" label="Axis label size (default = 12)"/> | |
216 <param name="color" type="select" label="Color of axis label"> | |
217 <option value="black">Black (default)</option> | |
218 <option value="red">Red</option> | |
219 <option value="white">White</option> | |
220 <option value="blue">Blue</option> | |
221 <option value="orange">Orange</option> | |
222 <option value="yellow">Yellow</option> | |
223 <option value="green">Green</option> | |
224 <option value="purple">Purple</option> | |
225 <option value="magenta">Magenta</option> | |
226 <option value="cyan">Cyan</option> | |
227 <option value="grey">Grey</option> | |
228 <option value="gold">Gold</option> | |
229 </param> | |
230 <param name="face" type="select" label="Font effect of axis label"> | |
231 <option value="plain">Normal (default)</option> | |
232 <option value="bold">Bold</option> | |
233 <option value="italic">Italic</option> | |
234 </param> | |
235 </when> | |
236 </xml> | |
237 <xml name="colors"> | |
238 <param name="colors" type="select" label="Color schemes to differentiate your groups" > | |
239 <option value="Default">Default color scheme</option> | |
240 <option value="YlOrRd">Yellow to orange to red (discrete, max=9 colors)</option> | |
241 <option value="YlOrBr">Yellow to orange to brown (discrete, max=9 colors)</option> | |
242 <option value="YlGnBu">Yellow to green to blue (discrete, max=9 colors)</option> | |
243 <option value="YlGn">Yellow to green (discrete, max=9 colors)</option> | |
244 <option value="Reds">Shades of red from light to dark (discrete, max=9 colors)</option> | |
245 <option value="RdPu">Red to purple (discrete, max=9 colors)</option> | |
246 <option value="Purples">Shades of purple from light to dark (discrete, max=9 colors)</option> | |
247 <option value="PuRd">Purple to red (discrete, max=9 colors)</option> | |
248 <option value="PuBuGn">Purple to blue to green (discrete, max=9 colors)</option> | |
249 <option value="PuBu">Purple to blue(discrete, max=9 colors)</option> | |
250 <option value="OrRd">Orange to red (discrete, max=9 colors)</option> | |
251 <option value="Oranges">Shades of orange from light to dark (discrete, max=9 colors)</option> | |
252 <option value="Greys">Shades of grey from light to dark (discrete, max=9 colors)</option> | |
253 <option value="Greens">Shades of greens from light to dark (discrete, max=9 colors)</option> | |
254 <option value="GnBu">Green to blue (discrete, max=9 colors)</option> | |
255 <option value="BuPu">Blue to purple (discrete, max=9 colors)</option> | |
256 <option value="BuGn">Blue to green (discrete, max=9 colors)</option> | |
257 <option value="Blues">Shades of blue from light to dark (discrete, max=9 colors)</option> | |
258 <option value="Set1">Set 1 - predefined color pallete (discrete, max=9 colors)</option> | |
259 <option value="Set2">Set 2 - predefined color pallete (discrete, max=8 colors)</option> | |
260 <option value="Set3">Set 3 - predefined color pallete (discrete, max=12 colors)</option> | |
261 <option value="Pastel1">Pastel 1 - predefined pastel color pallete (discrete, max=9 colors)</option> | |
262 <option value="Pastel2">Pastel 2 - predefined pastel color pallete (discrete, max=8 colors)</option> | |
263 <option value="Paired">Paired - predefined color pallete (discrete, max=12 colors)</option> | |
264 <option value="Dark2">Dark 2 - predefined color pallete (discrete, max=12 colors)</option> | |
265 <option value="Accent">Accent - predefined color pallete (discrete, max=12 colors)</option> | |
266 <option value="Spectral">Spectral - Red to yellow to purple (discrete, max=11 colors)</option> | |
267 <option value="RdYlGn">Red to yellow to green (discrete, max=11 colors)</option> | |
268 <option value="RdYlBu">Red to yellow to blue (discrete, max=11 colors)</option> | |
269 <option value="RdGy">Red to grey (discrete, max=11 colors)</option> | |
270 <option value="RdBu">Red to blue (discrete, max=11 colors)</option> | |
271 <option value="PuOr">Purple to orange (discrete, max=11 colors)</option> | |
272 <option value="PRGn">Purple to green (discrete, max=11 colors)</option> | |
273 <option value="BrBG">Brown to teal (discrete, max=11 colors)</option> | |
274 </param> | |
275 </xml> | |
276 <xml name="additional_output"> | |
277 <data name="output1" format="png" label="${tool.name} on ${on_string}: png"/> | |
278 <data format="pdf" name="output2" label="${tool.name} on ${on_string}: ${out.additional_output_format}"> | |
279 <change_format> | |
280 <when input="out.additional_output_format" value="svg" format="svg" /> | |
281 <when input="out.additional_output_format" value="eps" format="eps" /> | |
282 <when input="out.additional_output_format" value="ps" format="ps" /> | |
283 <when input="out.additional_output_format" value="tex" format="txt" /> | |
284 <when input="out.additional_output_format" value="jpeg" format="jpg" /> | |
285 <when input="out.additional_output_format" value="tiff" format="tiff" /> | |
286 <when input="out.additional_output_format" value="bmp" format="bmp" /> | |
287 </change_format> | |
288 <filter>out['additional_output_format'] != "none"</filter> | |
289 </data> | |
290 </xml> | |
291 </macros> |