Mercurial > repos > iuc > ggplot2_point
diff macros.xml @ 0:1bff6682e780 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ggplot2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
author | iuc |
---|---|
date | Tue, 22 Aug 2017 06:42:21 -0400 |
parents | |
children | 9a482995958c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Tue Aug 22 06:42:21 2017 -0400 @@ -0,0 +1,166 @@ +<?xml version="1.0"?> +<macros> + <xml name="requirements"> + <requirements> + <requirement type="package" version="@VERSION@">r-ggplot2</requirement> + <yield /> + </requirements> + </xml> + <token name="@VERSION@">2.2.1</token> + + <token name="@R_INIT@"><![CDATA[ +## Setup R error handling to go to stderr +options(show.error.messages=F, error=function(){cat(geterrmessage(), file=stderr()); q("no",1,F)}) + +## Unify locale settings +loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") + ]]></token> + + <token name="@TRANSFORM@"><![CDATA[ +#if $transform == "log2" + input["value"] <- log2(input["value"]) +#elif $transform == "log2plus1" + input["value"] <- log2(input["value"]+1) +#elif $transform == "log10" + input["value"] <- log10(input["value"]) +#elif $transform == "log10plus1" + input["value"] <- log10(input["value"]+1) +#end if + ]]></token> + + <xml name="transform"> + <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> + </xml> + + <token name="@XY_SCALING@"><![CDATA[ +#Choose between automatically scaled x and y axis or user defined +#if $scaling.plot_scaling == "Automatic" + gg_scalex = NULL + gg_scaley = NULL +#else + gg_scalex = xlim($scaling.xaxismin, $scaling.xaxismax) + gg_scaley = ylim($scaling.yaxismin, $scaling.yaxismax) +#end if + ]]></token> + + <xml name="xy_scaling"> + <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" type="integer" value="0" label="minimal range of x-axis" /> + <param name="xaxismax" type="integer" value="3" label="maximal range of x-axis" /> + <param name="yaxismin" type="integer" value="0" label="minimal range of y-axis" /> + <param name="yaxismax" type="integer" value="3" label="maximal range of y-axis" /> + </when> + </conditional> + </xml> + <xml name="title"> + <param name="title" type="text" value="plot title" label="Title of plot" /> + </xml> + <xml name="xy_lab"> + <param name="xlab" type="text" value="title of x-axis" label="Label for x-axis"/> + <param name="ylab" type="text" value="title of y-axis" label="Label for y-axis"/> + </xml> + <xml name="dimensions"> + <param name="with_output_dim" type="float" value="7" label="width of output" help="in inches" /> + <param name="height_output_dim" type="float" value="7" label="height of output" help="in inches" /> + </xml> + <xml name="citations"> + <citations> + <citation type="bibtex">@Book{ + author = {Hadley Wickham}, + title = {ggplot2: Elegant Graphics for Data Analysis}, + publisher = {Springer-Verlag New York}, + year = {2009}, + isbn = {978-0-387-98140-6}, + url = {http://ggplot2.org} + } + </citation> + </citations> + </xml> + + <xml name="axis_customization" token_label="Advanced - axis title options"> + <param name="axis_customization" type="select" label="@LABEL@"> + <option value="default" selected="True">Default</option> + <option value="defined">User defined label options</option> + </param> + <when value="default"> + <!--Do nothing here --> + </when> + <when value="defined"> + <param name="size" type="float" value="12" label="Axis label size (default = 12)"/> + <param name="color" type="select" label="Color of axis label"> + <option value="black">Black (default)</option> + <option value="red">Red</option> + <option value="white">White</option> + <option value="blue">Blue</option> + <option value="orange">Orange</option> + <option value="yellow">Yellow</option> + <option value="green">Green</option> + <option value="purple">Purple</option> + <option value="magenta">Magenta</option> + <option value="cyan">Cyan</option> + <option value="grey">Grey</option> + <option value="gold">Gold</option> + </param> + <param name="face" type="select" label="Font effect of axis label"> + <option value="plain">Normal (default)</option> + <option value="bold">Bold</option> + <option value="italic">Italic</option> + </param> + </when> + </xml> + + <xml name="colors"> + <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> + </xml> + +</macros>