-
Notifications
You must be signed in to change notification settings - Fork 0
/
ggplot_histogram.xml
192 lines (186 loc) · 10.6 KB
/
ggplot_histogram.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
<tool id="ggplot_histogram" name="Histogram w ggplot2" version="0.1.3">
<requirements>
<requirement type="package">r-getopt</requirement>
<requirement type="package">r-ggplot2</requirement>
<requirement type="package">r-reshape2</requirement>
</requirements>
<stdio>
<exit_code range="1:" />
</stdio>
<command><![CDATA[
Rscript ${__tool_directory__}/ggplotscripthistogram.R --input "$input1" --title "$title"
--xlab "$xlab" --ylab "$ylab" --transform "$transformation.transform" --scaling "$scaling.Plot_scaling" --density "$distribution.density"
--colorscheme "$coloring.colorscheme" --dim "$dimensions.plotdim" --facet "$group.facet"
--size "$size" --binwidth "$binwidth" --legend "$showlegend.legend" --output "Rplot.pdf"
#if str( $coloring.colorscheme ) == "Defined":
--colors ${coloring.colors}
--colororder ${coloring.colororder}
#else:
--colors=irrelevant
--colororder=1
#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( $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 should have column headers - these will be the columns that are plotted"/>
<param name="title" size="30" type="text" format="txt"/>
<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"/>
<param name="size" size="4" type="float" value="1" label="relative line width" />
<param name="binwidth" size="4" type="float" value="0.5" label="Bin width for plotting"/>
<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>
</conditional>
<conditional name="distribution">
<param name="density" type="select" label="Advanced - plot counts or density">
<option value="counts">Plot counts on the y-axis</option>
<option value="freq">Plot frequency on the y-axis</option>
<option value="nfreq">Plot normalized frequency on the y-axis</option>
</param>
</conditional>
<conditional name="group">
<param name="facet" type="select" label="Advanced - faceting">
<option value="none">Plot my groups on one plot</option>
<option value="facet">Plot my groups on individual plots</option>
</param>
</conditional>
<conditional name="coloring">
<param name="colorscheme" type="select" label="Advanced - coloring groups" >
<option value="Default" selected="True">No thanks - just use the default scheme to color code my groups (columns)</option>
<option value="Defined">I want to use defined color palettes to differentiate my groups (columns) </option>
</param>
<when value="Default">
</when>
<when value="Defined">
<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>
</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 deined 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="dimensions">
<param name="plotdim" type="select" label="Advanced - output dimensions">
<option value="Default" selected="True">Default</option>
<option value="Defined">User deined 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>
<conditional name="showlegend">
<param name="legend" type="select" label="Legend options">
<option value="yes">Include legend on plot</option>
<option value="no">Hide legend</option>
</param>
</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 histogram representing the distrinutions of each numerical column. Each column should have a descriptive header with no spaces, which will be used in the plot legend to represent the corresponding column (group).
Input data example:
ID Cond_A Cond_B
gene_A 10 15
gene_B 8 12
gene_C 10 15
gene_D 6 9
gene_E 9 13.5
gene_F 8 12
]]></help>
<citations>
<citation type="bibtex">
@misc{renameTODO,
author = {TODO, FirstTODO},
year = {TODO},
title = {TODO},
url = {under construction},
}</citation>
</citations>
</tool>