|
0
|
1 <tool id="ggplot_histogram" name="Histogram w ggplot2" version="0.1.1">
|
|
|
2 <requirements>
|
|
|
3 <requirement type="package">r-getopt</requirement>
|
|
|
4 <requirement type="package">r-ggplot2</requirement>
|
|
|
5 <requirement type="package">r-reshape2</requirement>
|
|
|
6 </requirements>
|
|
|
7 <stdio>
|
|
|
8 <exit_code range="1:" />
|
|
|
9 </stdio>
|
|
|
10 <command><![CDATA[
|
|
4
|
11 Rscript ${__tool_directory__}/ggplotscripthistogram.R --input "$input1" --title "$title"
|
|
|
12 --xlab "$xlab" --ylab "$ylab" --transform "$transformation.transform" --scaling "$scaling.Plot_scaling"
|
|
|
13 --colorscheme "$coloring.colorscheme" --dim "$dimensions.plotdim" --facet "$group.facet"
|
|
6
|
14 --size "$size" --binwidth "$binwidth" --legend "$showlegend.legend" --output "Rplot.pdf"
|
|
0
|
15 #if str( $coloring.colorscheme ) == "Defined":
|
|
|
16 --colors ${coloring.colors}
|
|
|
17 --colororder ${coloring.colororder}
|
|
|
18 #else:
|
|
|
19 --colors=irrelevant
|
|
|
20 --colororder=1
|
|
|
21 #end if
|
|
|
22
|
|
|
23 #if str( $scaling.Plot_scaling ) == "Defined":
|
|
|
24 --xaxismin=${scaling.xaxismin}
|
|
|
25 --xaxismax=${scaling.xaxismax}
|
|
|
26 --yaxismin=${scaling.yaxismin}
|
|
|
27 --yaxismax=${scaling.yaxismax}
|
|
|
28 #else:
|
|
|
29 --xaxismin=0
|
|
|
30 --xaxismax=1
|
|
|
31 --yaxismin=2
|
|
|
32 --yaxismax=3
|
|
|
33 #end if
|
|
|
34
|
|
|
35 #if str( $dimensions.plotdim ) == "Defined":
|
|
|
36 --woutputdim ${dimensions.woutputdim}
|
|
|
37 --houtputdim ${dimensions.houtputdim}
|
|
|
38 #else:
|
|
|
39 --woutputdim=7
|
|
|
40 --houtputdim=7
|
|
|
41 #end if
|
|
|
42
|
|
|
43 ]]></command>
|
|
|
44 <inputs>
|
|
|
45 <param name="input1" type="data" format="tabular" label="Input should have column headers - these will be the columns that are plotted"/>
|
|
|
46 <param name="title" size="30" type="text" format="txt"/>
|
|
2
|
47 <param name="xlab" size="30" type="text" value="title of x-axis" label="Label for x-axis"/>
|
|
|
48 <param name="ylab" size="30" type="text" value="title of y-axis" label="Label for y-axis"/>
|
|
0
|
49 <param name="size" size="4" type="float" value="1" label="relative line width" />
|
|
|
50 <param name="binwidth" size="4" type="float" value="0.5" label="Bin width for plotting"/>
|
|
|
51 <conditional name="transformation">
|
|
|
52 <param name="transform" type="select" label="Advanced - log transformation">
|
|
|
53 <option value="none">Plot the data as it is</option>
|
|
|
54 <option value="log2">Log2(value) transform my data</option>
|
|
|
55 <option value="log2plus1">Log2(value+1) transform my data</option>
|
|
|
56 <option value="log10">Log10(value) transform my data</option>
|
|
|
57 <option value="log10plus1">Log10(value+1) transform my data</option>
|
|
|
58 </param>
|
|
|
59 </conditional>
|
|
|
60 <conditional name="group">
|
|
|
61 <param name="facet" type="select" label="Advanced - faceting">
|
|
|
62 <option value="none">Plot my groups on one plot</option>
|
|
|
63 <option value="facet">Plot my groups on individual plots</option>
|
|
|
64 </param>
|
|
|
65 </conditional>
|
|
|
66 <conditional name="coloring">
|
|
|
67 <param name="colorscheme" type="select" label="Advanced - coloring groups" >
|
|
|
68 <option value="Default" selected="True">No thanks - just use the default scheme to color code my groups (columns)</option>
|
|
|
69 <option value="Defined">I want to use defined color palettes to differentiate my groups (columns) </option>
|
|
|
70 </param>
|
|
|
71 <when value="Default">
|
|
|
72 </when>
|
|
|
73 <when value="Defined">
|
|
|
74 <param name="colors" type="select" label="Color schemes to differentiate your groups" >
|
|
|
75 <option value="Default">Default color scheme</option>
|
|
|
76 <option value="YlOrRd">Yellow to orange to red (discrete, max=9 colors)</option>
|
|
|
77 <option value="YlOrBr">Yellow to orange to brown (discrete, max=9 colors)</option>
|
|
|
78 <option value="YlGnBu">Yellow to green to blue (discrete, max=9 colors)</option>
|
|
|
79 <option value="YlGn">Yellow to green (discrete, max=9 colors)</option>
|
|
|
80 <option value="Reds">Shades of red from light to dark (discrete, max=9 colors)</option>
|
|
|
81 <option value="RdPu">Red to purple (discrete, max=9 colors)</option>
|
|
|
82 <option value="Purples">Shades of purple from light to dark (discrete, max=9 colors)</option>
|
|
|
83 <option value="PuRd">Purple to red (discrete, max=9 colors)</option>
|
|
|
84 <option value="PuBuGn">Purple to blue to green (discrete, max=9 colors)</option>
|
|
|
85 <option value="PuBu">Purple to blue(discrete, max=9 colors)</option>
|
|
|
86 <option value="OrRd">Orange to red (discrete, max=9 colors)</option>
|
|
|
87 <option value="Oranges">Shades of orange from light to dark (discrete, max=9 colors)</option>
|
|
|
88 <option value="Greys">Shades of grey from light to dark (discrete, max=9 colors)</option>
|
|
|
89 <option value="Greens">Shades of greens from light to dark (discrete, max=9 colors)</option>
|
|
|
90 <option value="GnBu">Green to blue (discrete, max=9 colors)</option>
|
|
|
91 <option value="BuPu">Blue to purple (discrete, max=9 colors)</option>
|
|
|
92 <option value="BuGn">Blue to green (discrete, max=9 colors)</option>
|
|
|
93 <option value="Blues">Shades of blue from light to dark (discrete, max=9 colors)</option>
|
|
|
94 <option value="Set1">Set 1 - predefined color pallete (discrete, max=9 colors)</option>
|
|
|
95 <option value="Set2">Set 2 - predefined color pallete (discrete, max=8 colors)</option>
|
|
|
96 <option value="Set3">Set 3 - predefined color pallete (discrete, max=12 colors)</option>
|
|
|
97 <option value="Pastel1">Pastel 1 - predefined pastel color pallete (discrete, max=9 colors)</option>
|
|
|
98 <option value="Pastel2">Pastel 2 - predefined pastel color pallete (discrete, max=8 colors)</option>
|
|
|
99 <option value="Paired">Paired - predefined color pallete (discrete, max=12 colors)</option>
|
|
|
100 <option value="Dark2">Dark 2 - predefined color pallete (discrete, max=12 colors)</option>
|
|
|
101 <option value="Accent">Accent - predefined color pallete (discrete, max=12 colors)</option>
|
|
|
102 <option value="Spectral">Spectral - Red to yellow to purple (discrete, max=11 colors)</option>
|
|
|
103 <option value="RdYlGn">Red to yellow to green (discrete, max=11 colors)</option>
|
|
|
104 <option value="RdYlBu">Red to yellow to blue (discrete, max=11 colors)</option>
|
|
|
105 <option value="RdGy">Red to grey (discrete, max=11 colors)</option>
|
|
|
106 <option value="RdBu">Red to blue (discrete, max=11 colors)</option>
|
|
|
107 <option value="PuOr">Purple to orange (discrete, max=11 colors)</option>
|
|
|
108 <option value="PRGn">Purple to green (discrete, max=11 colors)</option>
|
|
|
109 <option value="BrBG">Brown to teal (discrete, max=11 colors)</option>
|
|
|
110 </param>
|
|
|
111 <param name="colororder" type="select" label="Reverse color scheme" >
|
|
|
112 <option value="1">Default order of color scheme</option>
|
|
|
113 <option value="-1">Reverse the order of my color scheme</option>
|
|
|
114 </param>
|
|
|
115 </when>
|
|
|
116 </conditional>
|
|
|
117 <conditional name="scaling">
|
|
|
118 <param name="Plot_scaling" type="select" label="Advanced - Axis scaling">
|
|
|
119 <option value="Automatic" selected="True">Automatic axis scaling</option>
|
|
|
120 <option value="Defined">User deined axis scales</option>
|
|
|
121 </param>
|
|
|
122 <when value="Automatic">
|
|
|
123 <!--Do nothing here -->
|
|
|
124 </when>
|
|
|
125 <when value="Defined">
|
|
|
126 <param name="xaxismin" size="4" type="integer" value="0" label="minimal range of x-axis" />
|
|
|
127 <param name="xaxismax" size="4" type="integer" value="3" label="maximal range of x-axis" />
|
|
|
128 <param name="yaxismin" size="4" type="integer" value="0" label="minimal range of y-axis" />
|
|
|
129 <param name="yaxismax" size="4" type="integer" value="3" label="maximal range of y-axis" />
|
|
|
130 </when>
|
|
|
131 </conditional>
|
|
|
132 <conditional name="dimensions">
|
|
|
133 <param name="plotdim" type="select" label="Advanced - output dimensions">
|
|
|
134 <option value="Default" selected="True">Default</option>
|
|
|
135 <option value="Defined">User deined output dimensions</option>
|
|
|
136 </param>
|
|
|
137 <when value="Default">
|
|
|
138 <!--Do nothing here -->
|
|
|
139 </when>
|
|
|
140 <when value="Defined">
|
|
|
141 <param name="woutputdim" size="4" type="float" value="7" label="width of output (inches)" />
|
|
|
142 <param name="houtputdim" size="4" type="float" value="7" label="height of output (inches)" />
|
|
|
143 </when>
|
|
|
144 </conditional>
|
|
6
|
145 <conditional name="showlegend">
|
|
4
|
146 <param name="legend" type="select" label="Legend options">
|
|
7
|
147 <option value="NULL">Include legend on plot</option>
|
|
|
148 <option value="theme(legend.position="none")">Hide legend</option>
|
|
4
|
149 </param>
|
|
|
150 </conditional>
|
|
0
|
151 </inputs>
|
|
|
152 <outputs>
|
|
|
153 <!-- <data name="output1" format="png" from_work_dir="Rplot.png"/> -->
|
|
|
154 <data name="output1" format="pdf" from_work_dir="Rplot.pdf"/>
|
|
|
155 </outputs>
|
|
|
156 <tests>
|
|
|
157 <test>
|
|
|
158 <param name="input1" value="input.txt"/>
|
|
|
159 <output name="output1" file="Rplot.pdf"/>
|
|
|
160 </test>
|
|
|
161 </tests>
|
|
|
162 <help><![CDATA[
|
|
3
|
163
|
|
2
|
164 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).
|
|
|
165
|
|
|
166 Input data example:
|
|
|
167 ID Cond_A Cond_B
|
|
|
168 gene_A 10 15
|
|
|
169 gene_B 8 12
|
|
|
170 gene_C 10 15
|
|
|
171 gene_D 6 9
|
|
|
172 gene_E 9 13.5
|
|
|
173 gene_F 8 12
|
|
0
|
174
|
|
|
175 ]]></help>
|
|
|
176 <citations>
|
|
|
177 <citation type="bibtex">
|
|
|
178 @misc{renameTODO,
|
|
3
|
179 author = {TODO, FirstTODO},
|
|
0
|
180 year = {TODO},
|
|
|
181 title = {TODO},
|
|
|
182 url = {under construction},
|
|
|
183 }</citation>
|
|
|
184 </citations>
|
|
|
185 </tool>
|