annotate ggplot_histogram.xml @ 31:0d872b4dfca1 draft default tip

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