changeset 0:77bbf955e8de default tip

initial commit
author eric
date Thu, 06 Nov 2014 15:07:54 +0100
parents
children
files .directory .project vennerable/Vennerable.R vennerable/Vennerable.xml vennerable/static/images/Vennerable.R_backup.png vennerable/static/images/Vennerable.pdf vennerable/static/images/Vennerable.xml_backup.png vennerable/static/images/VennerablePlot.png vennerable/test/Vennerable.DemoTable.tab vennerable/tool_dependencies.xml vennerable/unused/Vennerable.R_backup_png_xml vennerable/unused/Vennerable.xml_backup_png
diffstat 12 files changed, 594 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.directory	Thu Nov 06 15:07:54 2014 +0100
@@ -0,0 +1,5 @@
+[Dolphin]
+Timestamp=2014,6,17,13,13,59
+
+[Settings]
+HiddenFilesShown=true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.project	Thu Nov 06 15:07:54 2014 +0100
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>vennerable(testtoolshed)</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vennerable/Vennerable.R	Thu Nov 06 15:07:54 2014 +0100
@@ -0,0 +1,67 @@
+#!/usr/bin/R
+
+# R script to call Vennerable package from galaxy
+# info: alex.bossers@wur.nl
+
+# R --slave --vanilla --file=PlotBar.R --args inputFile x_data weighting outputFile plottype resolution imagetype
+# 1     2       3             4           5       6        7       8         9        10        11         12
+
+#get cmd line args
+args <- commandArgs()
+	in.file	<- args[6]
+	xData		<- args[7]   # data labels xData of format "a, b, c" and can include spaces
+	weighting	<- args[8] 
+	out.file	<- args[9]
+	plottype	<- args[10]
+	resolution	<- args[11] # in dpi
+	imagetype	<- args[12] # svg, pdf or png
+
+#open lib
+library(Vennerable)
+options(bitmapType='cairo')
+
+# for labels of bars or bar groups presume column names from data
+if (xData != "default") {
+	# read without header input file (must be tabular)
+	annot_data <- read.table(in.file, header=F, sep="\t")
+	colnames (annot_data) <- strsplit(xData,",")[[1]]
+	Vannot <- Venn(annot_data)
+} else {
+	# read without header input file (must be tabular)
+	annot_data <- read.table(in.file, header=T, sep="\t")
+	Vannot <- Venn(annot_data)
+}
+
+#set output imagetype (svg pdf or png)
+#R 3.0.2 and default cairo libs should handle it all ok
+#it could be that X11 should be loaded for non-pdf
+if (imagetype == "svg") {
+    svg(out.file)
+} else if (imagetype == "png") {
+    png(out.file, width = 1600, height = 1600, res = resolution)
+} else {
+    pdf(out.file)
+}
+
+# plot it
+if (plottype == "ChowRuskey") {
+	plot(Vannot, type = plottype)
+
+} else if (plottype == "AWFE") {
+	plot(Vannot, doWeights = weighting, type = plottype)
+
+} else if (plottype == "circles") {
+	plot(Vannot)
+
+} else if (plottype == "ellipses"){
+	plot(Vannot, type = "ellipses")
+
+} else if (plottype == "squares"){
+	plot(Vannot, type = "squares")
+
+} else if (plottype == "battle"){
+        plot(Vannot, type = "battle")
+}
+
+cat ("Wrapper version 1.2, running Vennerable v3.0-82\n Info/bugs: alex.bossers@wur.nl\n")
+dev.off()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vennerable/Vennerable.xml	Thu Nov 06 15:07:54 2014 +0100
@@ -0,0 +1,135 @@
+<tool id="Vennerable" name="Vennerable" version="1.2c" >
+	<description>: Plot data in Venn or Edwards/Venn-like diagrams</description>
+	<command>
+		R --slave --vanilla --file=\$VENNERABLE_SCRIPT_PATH/vennerable/Vennerable.R 
+		--args $inputFile
+		#if $opt.userSpecified == "Yes" 
+			default
+		#else
+			"$opt.xNames"
+		#end if
+		$weighting
+		#if $imagetype.value == "svg"
+			$outputFile_svg
+			$plottype
+			$resolution
+			svg
+		#else if $imagetype.value == "png"
+			$outputFile_png
+			$plottype
+			$resolution
+			png
+		#else
+			$outputFile_pdf
+			$plottype
+			$resolution
+			pdf
+		#end if
+		2&gt;$Vennerable_log
+		1&gt;&gt;$Vennerable_log
+	</command>	
+	<inputs>
+		<param name="inputFile" format="tabular" type="data" label="Data set" />
+		<conditional name="opt">
+			<param name="userSpecified" type="select" label="Use column headers as dataset names?">
+				<option value="Yes">Yes</option>
+				<option value="No">No</option>
+			</param>
+			<when value="Yes">
+			</when>
+			<when value="No">
+				<param name="xNames" type="text" label="Alternative data names" value="A,B,C,D" help="(comma-separated)"/>
+			</when>
+		</conditional>
+		<param name="plottype" type="select" label="Plot type to use" help="some other options might get disabled for certain plottypes" >
+			<option value="AWFE" selected="True">AWFE: Edwards-Venn (Non-weighted up to 5 datasets)</option>
+			<option value="ChowRuskey">Chow-Ruskey (always weigthed max 9 sets common intersect not 0)</option>
+			<option value="ellipses">Ellipses (4 datasets only and always non-weighted)</option>
+			<option value="circles">Circles (max 3 datasets)</option>
+			<option value="squares">Squares (max 4 datasets non-weighted)</option>
+            <option value="battle">Edwards-Venn Squares battle (max 9 datasets, non-weighted)</option>
+		</param>
+		<param name="weighting" type="select" label="Use weighting for data in plot" >
+			<option value="FALSE" selected="True">Non-weighted</option>
+			<option value="TRUE">Weighted</option>
+		</param>
+		<param name="resolution" type="integer" label="Resolution to use (dpi)" value="150" help="Plot features can be sized with this setting (PNG only). Lower (50) is larger text.&lt;br /&gt;&lt;i&gt;Default is vector graphics format SVG!&lt;/i&gt;" />
+        <param name="imagetype" type="select" label="Image output format" help="Scalable Vector Graphics (SVG) format is best for post processing" >
+            <option value="pdf" selected="True">PDF</option>
+            <option value="svg">SVG</option>
+            <option value="png">PNG</option>
+        </param>
+	</inputs>
+	<outputs>
+		<data name="outputFile_svg" format="svg" label="Venn diagram svg of ${inputFile.name}">
+			<filter>imagetype=="svg"</filter>
+		</data>
+		<data name="outputFile_png" format="png" label="Venn diagram png of ${inputFile.name}">
+			<filter>imagetype=="png"</filter>
+		</data>
+		<data name="outputFile_pdf" format="pdf" label="Venn diagram pdf of ${inputFile.name}">
+			<filter>imagetype=="pdf"</filter>
+		</data>
+		<data name="Vennerable_log" format="tabular" label="Vennerable output and error log file" />
+	</outputs>
+	<tests>
+		<test>
+		</test>
+	</tests>
+	<requirements>
+ 		<requirement type="package" version="3.0.3">R</requirement>
+		<requirement type="package" version="1.0">vennerable_r_packages</requirement>
+		<requirement type="set_environment">VENNERABLE_SCRIPT_PATH</requirement>
+	</requirements>
+	<help>
+| 
+
+
+**What it does**
+
+Vennerable V3.0 (07-10-2014)
+
+This tool will use the Vennerable R package to plot data as weighted or un-weighted diagrams such as Venn, Edwards-Venn and Chow-Rusky. 
+
+The tool can take from 2 to 9 collumns (in battle mode) of data but more are adviced not to be used (for speed and clarity).
+
+Since version Vennerable version 3 it supports up to 9 datasets in battle mode. Wrapper version 1.2 and up support output in svg, pdf and png.
+
+-----
+
+**Input**
+
+It takes a tabular file containing identifiers. Matches will be calculated automatically.
+
+Be sure to specify headers if you haven't any in your dataset! Otherwise the top row of data will be excluded.
+
+::
+ 
+ DataA	DataB	DataC	DataD
+ HUM1	AGK2	AGK2	RTT3
+ AGK2	ZZE3	ERT3	ZPD3
+ ZPD3	AAW3	RTT3	WER2
+ WER2	HUM1	RRW4	DUM1
+
+-----
+
+**Example**
+
+.. image:: ../static/images/WURtools/VennerablePlot.png 
+
+-----
+
+**References**
+
+- alex.bossers@wur.nl
+- Vennerable R package: http://r-forge.r-project.org/projects/vennerable/ 
+
+-----
+
+.. class:: infomark
+
+**TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
+
+
+  </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vennerable/static/images/Vennerable.R_backup.png	Thu Nov 06 15:07:54 2014 +0100
@@ -0,0 +1,56 @@
+#!/usr/bin/R
+
+# R script to call Vennerable package from galaxy
+# info: alex.bossers@wur.nl
+
+# R --slave --vanilla --file=PlotBar.R --args inputFile x_data weighting outputFile plottype resolution
+# 1     2       3             4           5       6        7       8         9        10        11
+
+#get cmd line args
+args <- commandArgs()
+	in.file	<- args[6]
+	xData		<- args[7]   # data labels xData of format "a, b, c" and can include spaces
+	weighting	<- args[8] 
+	out.file	<- args[9]
+	plottype	<- args[10]
+	resolution	<- args[11]	#in dpi
+	
+#open lib
+library(Vennerable)
+
+# for labels of bars or bar groups presume column names from data
+if (xData != "default") {
+	# read without header input file (must be tabular)
+	annot_data <- read.table(in.file, header=F, sep="\t")
+	colnames (annot_data) <- strsplit(xData,",")[[1]]
+	Vannot <- Venn(annot_data)
+} else {
+	# read without header input file (must be tabular)
+	annot_data <- read.table(in.file, header=T, sep="\t")
+	Vannot <- Venn(annot_data)
+}
+
+#png(out.file,width = 1600, height = 1600, res = resolution)
+png(out.file, res = resolution)
+
+# plot it
+if (plottype == "ChowRuskey") {
+	plot(Vannot, type = plottype)
+
+} else if (plottype == "AWFE") {
+	plot(Vannot, doWeights = weighting, type = plottype)
+
+} else if (plottype == "circles") {
+	plot(Vannot)
+
+} else if (plottype == "ellipses"){
+	plot(Vannot, type = "ellipses")
+
+} else if (plottype == "squares"){
+	plot(Vannot, type = "squares")
+
+}
+
+cat ("version 1.0, info: alex.bossers@wur.nl\n")
+dev.off()
+
Binary file vennerable/static/images/Vennerable.pdf has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vennerable/static/images/Vennerable.xml_backup.png	Thu Nov 06 15:07:54 2014 +0100
@@ -0,0 +1,112 @@
+<tool id="Vennerable" name="Vennerable" version="0.9" >
+	<description>: Plot data in Venn or Venn-like diagrams</description>
+	<command>
+	#if $opt.userSpecified == "Yes" 
+		R --slave --vanilla --file=$GALAXY_ROOT_DIR/tools/WURtools/R_tools/Vennerable.R 
+			--args $inputFile
+			default
+			$weighting
+			$outputFile
+			$plottype
+			$resolution
+			2&gt;$Vennerable_log
+			1&gt;&gt;$Vennerable_log
+	#else
+		R --slave --vanilla --file=$GALAXY_ROOT_DIR/tools/WURtools/R_tools/Vennerable.R
+			--args $inputFile
+			"$opt.xNames" 
+			$weighting
+			$outputFile
+			$plottype
+			$resolution
+			2&gt;$Vennerable_log
+			1&gt;&gt;$Vennerable_log
+	#end if
+	</command>	
+	<inputs>
+		<param name="inputFile" format="tabular" type="data" label="Data set" />
+		<conditional name="opt">
+			<param name="userSpecified" type="select" label="Use column headers as dataset names?">
+				<option value="Yes">Yes</option>
+				<option value="No">No</option>
+			</param>
+			<when value="Yes">
+			</when>
+			<when value="No">
+				<param name="xNames" type="text" label="Alternative data names" value="A,B,C,D" help="(comma-separated)"/>
+			</when>
+		</conditional>
+		<param name="plottype" type="select" label="Plot type to use" help="some other options might get disabled for certain plottypes" >
+			<option value="AWFE" selected="True">AWFE: Edwards-Venn (Non-weighted)</option>
+			<option value="ChowRuskey">Chow-Ruskey (always weigthed)</option>
+			<option value="ellipses">Ellipses (4 datasets only and always non-weighted)</option>
+			<option value="circles">Circles (max 3 datasets)</option>
+			<option value="squares">Squares (max 4 datasets non-weighted)</option>
+		</param>
+		<param name="weighting" type="select" label="Use weighting for data in plot" >
+			<option value="FALSE" selected="True">Non-weighted</option>
+			<option value="TRUE">Weighted</option>
+		</param>
+		<param name="resolution" type="integer" label="Resolution to use (dpi)" value="150" help="Plot features can be sized with this setting. Lower (50) is larger text." />
+	</inputs>
+	<outputs>
+		<data name="outputFile" format="png" label="Venn diagram of ${inputFile.name}"/>
+		<data name="Vennerable_log" format="tabular" label="Vennerable output and error log file" />
+	</outputs>
+	<tests>
+		<test>
+		</test>
+	</tests>
+	<requirements>
+		<requirement type="binary">R</requirement>
+	</requirements>
+	<help>
+| 
+
+
+**What it does**
+
+Vennerable V2.0 (09-10-2009)
+
+This tool will use the Vennerable R package to plot data as weighted or un-weighted diagrams such as Venn, Edwards-Venn and Chow-Rusky. 
+
+The tool can take 2 to 7 collumns of data but more are adviced not to be used (for speed and clarity).
+
+-----
+
+**Input**
+
+It takes a tabular file containing identifiers. Matches will be calculated automatically.
+
+Be sure to specify headers if you haven't any in your dataset! Otherwise the top row of data will be excluded.
+
+::
+ 
+ DataA	DataB	DataC	DataD
+ HUM1	AGK2	AGK2	RTT3
+ AGK2	ZZE3	ERT3	ZPD3
+ ZPD3	AAW3	RTT3	WER2
+ WER2	HUM1	RRW4	DUM1
+
+-----
+
+**Example**
+
+.. image:: ../static/images/WURtools/VennerablePlot.png 
+
+-----
+
+**References**
+
+- alex.bossers@wur.nl
+- Vennerable R package: http://r-forge.r-project.org/projects/vennerable/ 
+
+-----
+
+.. class:: infomark
+
+**TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
+
+
+  </help>
+</tool>
Binary file vennerable/static/images/VennerablePlot.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vennerable/test/Vennerable.DemoTable.tab	Thu Nov 06 15:07:54 2014 +0100
@@ -0,0 +1,8 @@
+Data1	Data2	Data3	Data4	Data5	Data6
+aa	bb	aa	aa	bb	cc
+bb	gg	bb	bb	dd	bb
+cc	dd	ii	ii	gg	qq
+dd	hh	gg	ii	xx	ww
+ee		jj	gg	kl	ee
+ff			yy	uy	tt
+				pp	uu
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vennerable/tool_dependencies.xml	Thu Nov 06 15:07:54 2014 +0100
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<tool_dependency>
+	<set_environment>
+            <environment_variable name="VENNERABLE_SCRIPT_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
+    </set_environment>
+	<package name="R" version="3.0.3">
+		<repository changeset_revision="9ff23e0b280b" name="package_r_3_0_3" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu/" prior_installation_required="True"/>
+	</package>
+	<package name="vennerable_r_packages" version="1.0">
+		<install version="1.0">
+			<actions>
+				<action type="setup_r_environment">
+					<repository changeset_revision="9ff23e0b280b" name="package_r_3_0_3" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu/">
+						<package name="R" version="3.0.3" />
+					</repository>
+					<package>http://www.bioconductor.org/packages/2.13/bioc/src/contrib/BiocGenerics_0.8.0.tar.gz</package>
+					<package>http://www.bioconductor.org/packages/2.13/bioc/src/contrib/graph_1.40.1.tar.gz</package>
+					<package>http://www.bioconductor.org/packages/2.13/bioc/src/contrib/RBGL_1.38.0.tar.gz</package>
+					<package>http://cran.r-project.org/src/contrib/Archive/RColorBrewer/RColorBrewer_1.0-4.tar.gz</package>
+					<package>http://cran.r-project.org/src/contrib/Archive/Rcpp/Rcpp_0.11.2.tar.gz</package>
+					<package>http://cran.r-project.org/src/contrib/Archive/plyr/plyr_1.8.tar.gz</package>
+					<package>http://cran.r-project.org/src/contrib/Archive/reshape/reshape_0.8.4.tar.gz</package>
+					<package>http://cran.r-project.org/src/contrib/Archive/gtools/gtools_3.4.0.tar.gz</package>
+					<package>http://cran.r-project.org/src/contrib/Archive/xtable/xtable_1.7-3.tar.gz</package>
+					<package>http://download.r-forge.r-project.org/src/contrib/Vennerable_3.0.tar.gz</package>
+				</action>
+			</actions>
+		</install>
+		<readme></readme>
+	</package>
+</tool_dependency>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vennerable/unused/Vennerable.R_backup_png_xml	Thu Nov 06 15:07:54 2014 +0100
@@ -0,0 +1,56 @@
+#!/usr/bin/R
+
+# R script to call Vennerable package from galaxy
+# info: alex.bossers@wur.nl
+
+# R --slave --vanilla --file=PlotBar.R --args inputFile x_data weighting outputFile plottype resolution
+# 1     2       3             4           5       6        7       8         9        10        11
+
+#get cmd line args
+args <- commandArgs()
+	in.file	<- args[6]
+	xData		<- args[7]   # data labels xData of format "a, b, c" and can include spaces
+	weighting	<- args[8] 
+	out.file	<- args[9]
+	plottype	<- args[10]
+	resolution	<- args[11]	#in dpi
+	
+#open lib
+library(Vennerable)
+
+# for labels of bars or bar groups presume column names from data
+if (xData != "default") {
+	# read without header input file (must be tabular)
+	annot_data <- read.table(in.file, header=F, sep="\t")
+	colnames (annot_data) <- strsplit(xData,",")[[1]]
+	Vannot <- Venn(annot_data)
+} else {
+	# read without header input file (must be tabular)
+	annot_data <- read.table(in.file, header=T, sep="\t")
+	Vannot <- Venn(annot_data)
+}
+
+#png(out.file,width = 1600, height = 1600, res = resolution)
+png(out.file, res = resolution)
+
+# plot it
+if (plottype == "ChowRuskey") {
+	plot(Vannot, type = plottype)
+
+} else if (plottype == "AWFE") {
+	plot(Vannot, doWeights = weighting, type = plottype)
+
+} else if (plottype == "circles") {
+	plot(Vannot)
+
+} else if (plottype == "ellipses"){
+	plot(Vannot, type = "ellipses")
+
+} else if (plottype == "squares"){
+	plot(Vannot, type = "squares")
+
+}
+
+cat ("version 1.0, info: alex.bossers@wur.nl\n")
+dev.off()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vennerable/unused/Vennerable.xml_backup_png	Thu Nov 06 15:07:54 2014 +0100
@@ -0,0 +1,112 @@
+<tool id="Vennerable" name="Vennerable" version="0.9" >
+	<description>: Plot data in Venn or Venn-like diagrams</description>
+	<command>
+	#if $opt.userSpecified == "Yes" 
+		R --slave --vanilla --file=$GALAXY_ROOT_DIR/tools/WURtools/R_tools/Vennerable.R 
+			--args $inputFile
+			default
+			$weighting
+			$outputFile
+			$plottype
+			$resolution
+			2&gt;$Vennerable_log
+			1&gt;&gt;$Vennerable_log
+	#else
+		R --slave --vanilla --file=$GALAXY_ROOT_DIR/tools/WURtools/R_tools/Vennerable.R
+			--args $inputFile
+			"$opt.xNames" 
+			$weighting
+			$outputFile
+			$plottype
+			$resolution
+			2&gt;$Vennerable_log
+			1&gt;&gt;$Vennerable_log
+	#end if
+	</command>	
+	<inputs>
+		<param name="inputFile" format="tabular" type="data" label="Data set" />
+		<conditional name="opt">
+			<param name="userSpecified" type="select" label="Use column headers as dataset names?">
+				<option value="Yes">Yes</option>
+				<option value="No">No</option>
+			</param>
+			<when value="Yes">
+			</when>
+			<when value="No">
+				<param name="xNames" type="text" label="Alternative data names" value="A,B,C,D" help="(comma-separated)"/>
+			</when>
+		</conditional>
+		<param name="plottype" type="select" label="Plot type to use" help="some other options might get disabled for certain plottypes" >
+			<option value="AWFE" selected="True">AWFE: Edwards-Venn (Non-weighted)</option>
+			<option value="ChowRuskey">Chow-Ruskey (always weigthed)</option>
+			<option value="ellipses">Ellipses (4 datasets only and always non-weighted)</option>
+			<option value="circles">Circles (max 3 datasets)</option>
+			<option value="squares">Squares (max 4 datasets non-weighted)</option>
+		</param>
+		<param name="weighting" type="select" label="Use weighting for data in plot" >
+			<option value="FALSE" selected="True">Non-weighted</option>
+			<option value="TRUE">Weighted</option>
+		</param>
+		<param name="resolution" type="integer" label="Resolution to use (dpi)" value="150" help="Plot features can be sized with this setting. Lower (50) is larger text." />
+	</inputs>
+	<outputs>
+		<data name="outputFile" format="png" label="Venn diagram of ${inputFile.name}"/>
+		<data name="Vennerable_log" format="tabular" label="Vennerable output and error log file" />
+	</outputs>
+	<tests>
+		<test>
+		</test>
+	</tests>
+	<requirements>
+		<requirement type="binary">R</requirement>
+	</requirements>
+	<help>
+| 
+
+
+**What it does**
+
+Vennerable V2.0 (09-10-2009)
+
+This tool will use the Vennerable R package to plot data as weighted or un-weighted diagrams such as Venn, Edwards-Venn and Chow-Rusky. 
+
+The tool can take 2 to 7 collumns of data but more are adviced not to be used (for speed and clarity).
+
+-----
+
+**Input**
+
+It takes a tabular file containing identifiers. Matches will be calculated automatically.
+
+Be sure to specify headers if you haven't any in your dataset! Otherwise the top row of data will be excluded.
+
+::
+ 
+ DataA	DataB	DataC	DataD
+ HUM1	AGK2	AGK2	RTT3
+ AGK2	ZZE3	ERT3	ZPD3
+ ZPD3	AAW3	RTT3	WER2
+ WER2	HUM1	RRW4	DUM1
+
+-----
+
+**Example**
+
+.. image:: ../static/images/WURtools/VennerablePlot.png 
+
+-----
+
+**References**
+
+- alex.bossers@wur.nl
+- Vennerable R package: http://r-forge.r-project.org/projects/vennerable/ 
+
+-----
+
+.. class:: infomark
+
+**TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
+
+
+  </help>
+</tool>