changeset 0:71c4282199f0

Uploaded
author dsobral
date Fri, 23 Mar 2012 03:21:42 -0400
parents
children 74753a2845b9
files batch_plot.xml
diffstat 1 files changed, 48 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/batch_plot.xml	Fri Mar 23 03:21:42 2012 -0400
@@ -0,0 +1,48 @@
+<tool id="batch_plot" name="batch plot" version="0.1">
+  <description>Batch plot in R</description>
+  <command interpreter="bash">r_wrapper.sh $script_file</command>
+
+  <inputs>
+   	<param name="input" type="data" format="tabular" label="Data to plot (tab separated)"/>	
+   	<param name="group" type="text" value="Group" label="Name of Column to Group (case-sensitive, avoid spaces)"/>
+  </inputs>
+
+  <configfiles>
+    <configfile name="script_file">
+		## Setup R error handling to go to stderr
+		options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
+		
+		data=read.table("${input}",sep="\t",header=TRUE)
+		pdf("${output}"); 
+		with(data, { sapply(names(data[,sapply(data, is.numeric)]), function(x) { boxplot(data[[x]] ~ $group); points(data[[x]] ~ $group); title(x);} ); "OK" } ); 
+		dev.off();
+
+    </configfile>
+  </configfiles>
+  
+  <outputs>
+    <data format="pdf" name="output" />
+  </outputs>
+  
+    <tests>
+        <test>
+            <param name="input" value="test_counts.tab"/>
+            <output name="out_file" file="output.pdf"/>
+        </test>
+    </tests>
+    
+<help>
+
+.. class:: infomark
+
+This tool makes a PDF of groups of box plots from a tabulated file.
+It creates one plot per column, each one grouped by a user-specific column (by default named Group).
+The title of each plot is the name of the column being plotted. 
+
+-----
+
+
+**Example**
+
+</help>
+</tool>
\ No newline at end of file