-
Notifications
You must be signed in to change notification settings - Fork 1
/
ggplot_point.xml
390 lines (374 loc) · 20.4 KB
/
ggplot_point.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<tool id="ggplot_point" name="Scatterplot w ggplot2" version="0.1.3">
<requirements>
<requirement type="package">r-getopt</requirement>
<requirement type="package">r-ggplot2</requirement>
</requirements>
<stdio>
<exit_code range="1:" />
</stdio>
<command><![CDATA[
Rscript '${__tool_directory__}/ggplotpointscript.R' --input "$input1" --title "$title"
--theme "${theme.theme_selector}" --xplot "$xplot" --yplot "$yplot" --scaling "$scaling.Plot_scaling" --points "$points.pointoptions" --dim "$dimensions.plotdim" --factor "$factor.factoring" --transform "$transformation.transform" --xlab "$xlab" --ylab "$ylab"
--axistitlecust "$axistitlecustomization.axistitlecust" --axistextcust "$axistextcustomization.axistextcust"
--plottitlecust "$plottitlecustomization.plottitlecust" --gridlinecust "$gridlinecustomization.gridlinecust" --output "Rplot.pdf"
#if str( $factor.factoring ) == "Single":
--factorcol ${factor.factorcol}
--colors ${factor.colors}
--colororder ${factor.colororder}
#elif str( $factor.factoring ) == "Multiple":
--factorcol ${factor.factorcol}
--colors=irrelevant
--colororder=1
#else:
--factorcol=1
--colors=irrelevant
--colororder=1
#end if
#if str( $points.pointoptions ) == "Defined":
--size ${points.size}
--alpha ${points.alpha}
--pointcolor ${points.pointcolor}
#else:
--size=1
--alpha=1
--pointcolor=black
#end if
#if str( $scaling.Plot_scaling ) == "Defined":
--xaxismin=${scaling.xaxismin}
--xaxismax=${scaling.xaxismax}
--yaxismin=${scaling.yaxismin}
--yaxismax=${scaling.yaxismax}
#else:
--xaxismin=0
--xaxismax=1
--yaxismin=2
--yaxismax=3
#end if
#if str( $axistitlecustomization.axistitlecust ) == "Defined":
--axistitlesize ${axistitlecustomization.axistitlesize}
--axistitlecolor ${axistitlecustomization.axistitlecolor}
--axistitleface ${axistitlecustomization.axistitleface}
#else:
--axistitlesize=12
--axistitlecolor=black
--axistitleface=plain
#end if
#if str( $axistextcustomization.axistextcust ) == "Defined":
--axistextsize ${axistextcustomization.axistextsize}
--axistextcolor ${axistextcustomization.axistextcolor}
--axistextface ${axistextcustomization.axistextface}
#else:
--axistextsize=12
--axistextcolor=black
--axistextface=plain
#end if
#if str( $plottitlecustomization.plottitlecust ) == "Defined":
--plottitlesize ${plottitlecustomization.plottitlesize}
--plottitlecolor ${plottitlecustomization.plottitlecolor}
--plottitleface ${plottitlecustomization.plottitleface}
#else:
--plottitlesize=12
--plottitlecolor=black
--plottitleface=plain
#end if
#if str( $dimensions.plotdim ) == "Defined":
--woutputdim ${dimensions.woutputdim}
--houtputdim ${dimensions.houtputdim}
#else:
--woutputdim=7
--houtputdim=7
#end if
]]></command>
<inputs>
<param name="input1" type="data" format="tabular" label="Input (tabular format)" />
<param name="xplot" type="integer" value="8" label="Column to plot on x-axis" />
<param name="yplot" type="integer" value="9" label="Column to plot on y-axis" />
<param name="title" size="30" type="text" value="plot title" label="Title of plot" />
<param name="xlab" size="30" type="text" value="title of x-axis" label="Label for x-axis"/>
<param name="ylab" size="30" type="text" value="title of y-axis" label="Label for y-axis"/>
<conditional name="points">
<param name="pointoptions" type="select" label="Advanced - data point options">
<option value="Default" selected="True">Default</option>
<option value="Defined">User defined point options</option>
</param>
<when value="Default">
<!--Do nothing here -->
</when>
<when value="Defined">
<param name="size" size="4" type="float" value="1" label="relative size of points" />
<param name="alpha" size="4" type="float" value="1" label="Transparency of points (On a scale of 0-1; 0=transparent, 1=default)" />
<param name="pointcolor" type="select" label="Color of data points" >
<option value="black">Black (default)</option>
<option value="red">Red</option>
<option value="white">White</option>
<option value="blue">Blue</option>
<option value="orange">Orange</option>
<option value="yellow">Yellow</option>
<option value="green">Green</option>
<option value="purple">Purple</option>
<option value="magenta">Magenta</option>
<option value="cyan">Cyan</option>
<option value="grey">Grey</option>
<option value="gold">Gold</option>
</param>
</when>
</conditional>
<conditional name="factor">
<param name="factoring" type="select" label="Advanced - plotting multiple groups" >
<option value="Default" selected="True">No thanks - just plot the data as one group</option>
<option value="Single">Plot multiple groups of data on one plot</option>
<option value="Multiple">Plot multiple groups of data on individual plots</option>
</param>
<when value="Default">
<!--Do nothing here -->
</when>
<when value="Single">
<param name="factorcol" size="4" type="integer" value="1" label="column differentiating the different groups" />
<param name="colors" type="select" label="Color schemes to differentiate your groups" >
<option value="Default">Default color scheme</option>
<option value="YlOrRd">Yellow to orange to red (discrete, max=9 colors)</option>
<option value="YlOrBr">Yellow to orange to brown (discrete, max=9 colors)</option>
<option value="YlGnBu">Yellow to green to blue (discrete, max=9 colors)</option>
<option value="YlGn">Yellow to green (discrete, max=9 colors)</option>
<option value="Reds">Shades of red from light to dark (discrete, max=9 colors)</option>
<option value="RdPu">Red to purple (discrete, max=9 colors)</option>
<option value="Purples">Shades of purple from light to dark (discrete, max=9 colors)</option>
<option value="PuRd">Purple to red (discrete, max=9 colors)</option>
<option value="PuBuGn">Purple to blue to green (discrete, max=9 colors)</option>
<option value="PuBu">Purple to blue(discrete, max=9 colors)</option>
<option value="OrRd">Orange to red (discrete, max=9 colors)</option>
<option value="Oranges">Shades of orange from light to dark (discrete, max=9 colors)</option>
<option value="Greys">Shades of grey from light to dark (discrete, max=9 colors)</option>
<option value="Greens">Shades of greens from light to dark (discrete, max=9 colors)</option>
<option value="GnBu">Green to blue (discrete, max=9 colors)</option>
<option value="BuPu">Blue to purple (discrete, max=9 colors)</option>
<option value="BuGn">Blue to green (discrete, max=9 colors)</option>
<option value="Blues">Shades of blue from light to dark (discrete, max=9 colors)</option>
<option value="Set1">Set 1 - predefined color pallete (discrete, max=9 colors)</option>
<option value="Set2">Set 2 - predefined color pallete (discrete, max=8 colors)</option>
<option value="Set3">Set 3 - predefined color pallete (discrete, max=12 colors)</option>
<option value="Pastel1">Pastel 1 - predefined pastel color pallete (discrete, max=9 colors)</option>
<option value="Pastel2">Pastel 2 - predefined pastel color pallete (discrete, max=8 colors)</option>
<option value="Paired">Paired - predefined color pallete (discrete, max=12 colors)</option>
<option value="Dark2">Dark 2 - predefined color pallete (discrete, max=12 colors)</option>
<option value="Accent">Accent - predefined color pallete (discrete, max=12 colors)</option>
<option value="Spectral">Spectral - Red to yellow to purple (discrete, max=11 colors)</option>
<option value="RdYlGn">Red to yellow to green (discrete, max=11 colors)</option>
<option value="RdYlBu">Red to yellow to blue (discrete, max=11 colors)</option>
<option value="RdGy">Red to grey (discrete, max=11 colors)</option>
<option value="RdBu">Red to blue (discrete, max=11 colors)</option>
<option value="PuOr">Purple to orange (discrete, max=11 colors)</option>
<option value="PRGn">Purple to green (discrete, max=11 colors)</option>
<option value="BrBG">Brown to teal (discrete, max=11 colors)</option>
</param>
<param name="colororder" type="select" label="Reverse color scheme" >
<option value="1">Default order of color scheme</option>
<option value="-1">Reverse the order of my color scheme</option>
</param>
</when>
<when value="Multiple">
<param name="factorcol" size="4" type="integer" value="1" label="column differentiating the different groups" />
</when>
</conditional>
<conditional name="transformation">
<param name="transform" type="select" label="Advanced - log transformation">
<option value="none">Plot the data as it is</option>
<option value="log2">Log2(value) transform my data</option>
<option value="log2plus1">Log2(value+1) transform my data</option>
<option value="log10">Log10(value) transform my data</option>
<option value="log10plus1">Log10(value+1) transform my data</option>
</param>
<when value="none">
<!--Do nothing here -->
</when>
<when value="log2">
<!--Do nothing here -->
</when>
<when value="log2plus1">
<!--Do nothing here -->
</when>
<when value="log10">
<!--Do nothing here -->
</when>
<when value="log10plus1">
<!--Do nothing here -->
</when>
</conditional>
<conditional name="scaling">
<param name="Plot_scaling" type="select" label="Advanced - axis scaling">
<option value="Automatic" selected="True">Automatic axis scaling</option>
<option value="Defined">User defined axis scales</option>
</param>
<when value="Automatic">
<!--Do nothing here -->
</when>
<when value="Defined">
<param name="xaxismin" size="4" type="integer" value="0" label="minimal range of x-axis" />
<param name="xaxismax" size="4" type="integer" value="3" label="maximal range of x-axis" />
<param name="yaxismin" size="4" type="integer" value="0" label="minimal range of y-axis" />
<param name="yaxismax" size="4" type="integer" value="3" label="maximal range of y-axis" />
</when>
</conditional>
<conditional name="theme">
<param name="theme_selector" type="select" label="Advanced - backgound theme for plot">
<option value="bw">Black and white</option>
<option value="Default">Default (grey)</option>
</param>
<when value="bw"/>
<when value="Default"></when>
</conditional>
<conditional name="axistitlecustomization">
<param name="axistitlecust" type="select" label="Advanced - axis label options">
<option value="Default" selected="True">Default</option>
<option value="Defined">User defined label options</option>
</param>
<when value="Default">
<!--Do nothing here -->
</when>
<when value="Defined">
<param name="axistitlesize" size="4" type="float" value="12" label="Axis label size (default = 12)"/>
<param name="axistitlecolor" type="select" label="Color of axis label">
<option value="black">Black (default)</option>
<option value="red">Red</option>
<option value="white">White</option>
<option value="blue">Blue</option>
<option value="orange">Orange</option>
<option value="yellow">Yellow</option>
<option value="green">Green</option>
<option value="purple">Purple</option>
<option value="magenta">Magenta</option>
<option value="cyan">Cyan</option>
<option value="grey">Grey</option>
<option value="gold">Gold</option>
</param>
<param name="axistitleface" size="4" type="select" label="Font effect of axis label">
<option value="plain">Normal (default)</option>
<option value="bold">Bold</option>
<option value="italic">Italic</option>
</param>
</when>
</conditional>
<conditional name="axistextcustomization">
<param name="axistextcust" type="select" label="Advanced - axis text options">
<option value="Default" selected="True">Default</option>
<option value="Defined">User defined axis text options</option>
</param>
<when value="Default">
<!--Do nothing here -->
</when>
<when value="Defined">
<param name="axistextsize" size="4" type="float" value="12" label="Axis text size (default = 12)"/>
<param name="axistextcolor" type="select" label="Color of axis text">
<option value="black">Black (default)</option>
<option value="red">Red</option>
<option value="white">White</option>
<option value="blue">Blue</option>
<option value="orange">Orange</option>
<option value="yellow">Yellow</option>
<option value="green">Green</option>
<option value="purple">Purple</option>
<option value="magenta">Magenta</option>
<option value="cyan">Cyan</option>
<option value="grey">Grey</option>
<option value="gold">Gold</option>
</param>
<param name="axistextface" size="4" type="select" label="Font effect of axis text">
<option value="plain">Normal (default)</option>
<option value="bold">Bold</option>
<option value="italic">Italic</option>
</param>
</when>
</conditional>
<conditional name="plottitlecustomization">
<param name="plottitlecust" type="select" label="Advanced - Plot title options">
<option value="Default" selected="True">Default</option>
<option value="Defined">User defined plot title options</option>
</param>
<when value="Default">
<!--Do nothing here -->
</when>
<when value="Defined">
<param name="plottitlesize" size="4" type="float" value="12" label="Plot title size (default = 12)"/>
<param name="plottitlecolor" type="select" label="Color of plot title">
<option value="black">Black (default)</option>
<option value="red">Red</option>
<option value="white">White</option>
<option value="blue">Blue</option>
<option value="orange">Orange</option>
<option value="yellow">Yellow</option>
<option value="green">Green</option>
<option value="purple">Purple</option>
<option value="magenta">Magenta</option>
<option value="cyan">Cyan</option>
<option value="grey">Grey</option>
<option value="gold">Gold</option>
</param>
<param name="plottitleface" size="4" type="select" label="Font effect of plot title">
<option value="plain">Normal (default)</option>
<option value="bold">Bold</option>
<option value="italic">Italic</option>
</param>
</when>
</conditional>
<conditional name="gridlinecustomization">
<param name="gridlinecust" type="select" label="Advanced - grid lines">
<option value="Default">Default grid lines</option>
<option value="hidemajor">Hide major grid lines</option>
<option value="hideminor">Hide minor grid lines</option>
<option value="hideboth">Hide major and minor grid lines</option>
</param>
<when value="Default">
<!--Do nothing here -->
</when>
<when value="hidemajor">
<!--Do nothing here -->
</when>
<when value="hideminor">
<!--Do nothing here -->
</when>
<when value="hideboth">
<!--Do nothing here -->
</when>
</conditional>
<conditional name="dimensions">
<param name="plotdim" type="select" label="Advanced - output dimensions">
<option value="Default" selected="True">Default</option>
<option value="Defined">User defined output dimensions</option>
</param>
<when value="Default">
<!--Do nothing here -->
</when>
<when value="Defined">
<param name="woutputdim" size="4" type="float" value="7" label="width of output (inches)" />
<param name="houtputdim" size="4" type="float" value="7" label="height of output (inches)" />
</when>
</conditional>
</inputs>
<outputs>
<!-- <data name="output1" format="png" from_work_dir="Rplot.png"/> -->
<data name="output1" format="pdf" from_work_dir="Rplot.pdf"/>
</outputs>
<tests>
<test>
<param name="input1" value="input.txt"/>
<output name="output1" file="Rplot.pdf"/>
</test>
</tests>
<help><![CDATA[
This tool will generate a scatterplot representing data from two groups/conditions.
The input data should be in tabular format and the user can determine which groups (columns) to plot.
Multiple groups can be plotted on the same or multiple plots by providing a column with a group identifier under "Advanced - plotting multiple groups".
Feel free to explore the (many) advanced options to customize your plot. Galaxy makes this type optimization easy for the user!
The ouput is a pdf file with your scatterplot. The dimensions of this file can be modified under "Advanced - output dimensions"
Please report issues at: https://github.com/MoHeydarian/Galaxy-wrapper-for-ggplot2-scatterplot
]]></help>
<citations>
<citation type="bibtex">
@misc{renameTODO,
author = {8.5.2016, FirstTODO},
year = {TODO},
title = {TODO},
url = {http://docs.ggplot2.org/current/geom_point.html},
}</citation>
</citations>
</tool>