annotate ggplot_histogram.xml @ 6:dafa19165908 draft

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