Mercurial > repos > iuc > ggplot2_point
comparison ggplot_point.xml @ 4:52b8083a6159 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ggplot2 commit d1da3cf72a15d88fc265edc5d64e6b820b6a2b2f
author | iuc |
---|---|
date | Sun, 24 Mar 2019 13:21:18 -0400 |
parents | 9a482995958c |
children | 9cec81e1b90e |
comparison
equal
deleted
inserted
replaced
3:46f91106439b | 4:52b8083a6159 |
---|---|
1 <tool id="ggplot2_point" name="Scatterplot w ggplot2" version="@VERSION@+galaxy0"> | 1 <tool id="ggplot2_point" name="Scatterplot w ggplot2" version="@VERSION@+galaxy1"> |
2 <macros> | 2 <macros> |
3 <import>macros.xml</import> | 3 <import>macros.xml</import> |
4 </macros> | 4 </macros> |
5 <expand macro="requirements"> | 5 <expand macro="requirements"> |
6 <requirement type="package" version="1.2.1">r-svglite</requirement> | 6 <requirement type="package" version="1.2.1">r-svglite</requirement> |
33 gg_facet = facet_wrap( ~ factor) | 33 gg_facet = facet_wrap( ~ factor) |
34 gg_factor = NULL | 34 gg_factor = NULL |
35 color_scale = NULL | 35 color_scale = NULL |
36 #if $adv.points.pointoptions == "Default" | 36 #if $adv.points.pointoptions == "Default" |
37 gg_point = geom_point(size=1, alpha=1, gg_factor) | 37 gg_point = geom_point(size=1, alpha=1, gg_factor) |
38 gg_line = geom_line(size=1, alpha=1, gg_factor) | |
38 #else | 39 #else |
39 gg_point = geom_point(size='$adv.points.size', alpha='$adv.points.alpha', colour='$adv.points.pointcolor') | 40 gg_point = geom_point(size='$adv.points.size', alpha='$adv.points.alpha', colour='$adv.points.pointcolor') |
41 gg_line = geom_line(size='$adv.points.size', alpha='$adv.points.alpha', colour='$adv.points.pointcolor') | |
40 #end if | 42 #end if |
41 | 43 |
42 names(input)[$adv.factor.factorcol] <- "factor" | 44 names(input)[$adv.factor.factorcol] <- "factor" |
43 | 45 |
44 #elif $adv.factor.factoring == "Single" | 46 #elif $adv.factor.factoring == "Single" |
45 gg_facet = NULL | 47 gg_facet = NULL |
46 gg_factor = aes(colour=factor(factor)) | 48 gg_factor = aes(colour=factor(factor)) |
47 | 49 |
48 #if $adv.points.pointoptions == "default" | 50 #if $adv.points.pointoptions == "default" |
49 gg_point = geom_point(size=1, alpha=1, gg_factor) | 51 gg_point = geom_point(size=1, alpha=1, gg_factor) |
52 gg_line = geom_line(size=1, alpha=1, gg_factor) | |
50 #else | 53 #else |
51 gg_point = geom_point(size=$adv.points.size, alpha='$adv.points.alpha', gg_factor) | 54 gg_point = geom_point(size=$adv.points.size, alpha='$adv.points.alpha', gg_factor) |
55 gg_line = geom_line(size=$adv.points.size, alpha='$adv.points.alpha', gg_factor) | |
52 #end if | 56 #end if |
53 | 57 |
54 #if $adv.colors == "Default" | 58 #if $adv.factor.colororder == 1 |
55 color_scale = scale_colour_hue(direction='$adv.factor.colororder') | 59 color_scale = scale_colour_hue(direction='$adv.factor.colororder') |
56 #else | 60 #else |
57 color_scale = scale_color_brewer(palette='$adv.colors', direction='$adv.factor.colororder') | 61 color_scale = scale_color_brewer(palette='$adv.factor.colors', direction='$adv.factor.colororder') |
58 #end if | 62 #end if |
59 | 63 |
60 names(input)[$adv.factor.factorcol] <- "factor" | 64 names(input)[$adv.factor.factorcol] <- "factor" |
61 #else | 65 #else |
62 gg_facet = NULL | 66 gg_facet = NULL |
63 gg_factor = NULL | 67 gg_factor = NULL |
64 color_scale = NULL | 68 color_scale = NULL |
65 | 69 |
66 #if $adv.points.pointoptions == "default" | 70 #if $adv.points.pointoptions == "default" |
67 gg_point = geom_point(size=1, alpha=1, gg_factor) | 71 gg_point = geom_point(size=1, alpha=1, gg_factor) |
72 gg_line = geom_line(size=1, alpha=1, gg_factor) | |
68 #else | 73 #else |
69 gg_point = geom_point(size=$adv.points.size, alpha='$adv.points.alpha', colour='$adv.points.pointcolor') | 74 gg_point = geom_point(size=$adv.points.size, alpha='$adv.points.alpha', colour='$adv.points.pointcolor') |
75 gg_line = geom_line(size=$adv.points.size, alpha='$adv.points.alpha', colour='$adv.points.pointcolor') | |
70 #end if | 76 #end if |
71 #end if | 77 #end if |
72 | 78 |
73 @TRANSFORM@ | 79 @TRANSFORM@ |
74 | 80 |
102 gg_gridline = theme(panel.grid.minor = element_blank()) | 108 gg_gridline = theme(panel.grid.minor = element_blank()) |
103 #elif $adv.gridlinecust == "hideboth" | 109 #elif $adv.gridlinecust == "hideboth" |
104 gg_gridline = theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank()) | 110 gg_gridline = theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank()) |
105 #end if | 111 #end if |
106 | 112 |
113 ## choose between graph types (points/lines/both) | |
114 #if $adv.type == "points" | |
115 gg_line = NULL | |
116 #elif $adv.type == "lines" | |
117 gg_point = NULL | |
118 #end if | |
119 | |
107 #this is the actual ggplot command to make the final plot(s) | 120 #this is the actual ggplot command to make the final plot(s) |
108 plot_out <- ggplot(input, aes(xcol, ycol)) + gg_point + gg_facet + | 121 plot_out <- ggplot(input, aes(xcol, ycol)) + gg_point + gg_line + gg_facet + |
109 gg_theme + gg_scalex + gg_scaley + color_scale + gg_legend + ggtitle('$title') + xlab('$xlab') + ylab('$ylab')+ | 122 gg_theme + gg_scalex + gg_scaley + color_scale + gg_legend + ggtitle('$title') + xlab('$xlab') + ylab('$ylab')+ |
110 gg_axistitle + gg_axistext + gg_plottitle + gg_gridline | 123 gg_axistitle + gg_axistext + gg_plottitle + gg_gridline |
111 | 124 |
112 @SAVE_OUTPUT@ | 125 @SAVE_OUTPUT@ |
113 ]]></configfile> | 126 ]]></configfile> |
118 <param name="yplot" type="integer" value="9" label="Column to plot on y-axis" /> | 131 <param name="yplot" type="integer" value="9" label="Column to plot on y-axis" /> |
119 | 132 |
120 <expand macro="title" /> | 133 <expand macro="title" /> |
121 <expand macro="xy_lab" /> | 134 <expand macro="xy_lab" /> |
122 <section name="adv" title="Advanced Options" expanded="false"> | 135 <section name="adv" title="Advanced Options" expanded="false"> |
136 <param name="type" type="select" label="Type of plot" > | |
137 <option value="points">Points only (default)</option> | |
138 <option value="lines">Lines only </option> | |
139 <option value="pointslines">Points and Lines</option> | |
140 </param> | |
123 <conditional name="points"> | 141 <conditional name="points"> |
124 <param name="pointoptions" type="select" label="Data point options"> | 142 <param name="pointoptions" type="select" label="Data point options"> |
125 <option value="default" selected="true">Default</option> | 143 <option value="default" selected="true">Default</option> |
126 <option value="defined">User defined point options</option> | 144 <option value="defined">User defined point options</option> |
127 </param> | 145 </param> |