# HG changeset patch # User eric # Date 1427800711 -7200 # Node ID f21d51d28d8ddaa723cee29b75f49edda1ce91d1 initial commit on Vennerable on toolshed diff -r 000000000000 -r f21d51d28d8d vennerable/Vennerable.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vennerable/Vennerable.R Tue Mar 31 13:18:31 2015 +0200 @@ -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() diff -r 000000000000 -r f21d51d28d8d vennerable/Vennerable.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vennerable/Vennerable.xml Tue Mar 31 13:18:31 2015 +0200 @@ -0,0 +1,135 @@ + + : Plot data in Venn or Edwards/Venn-like diagrams + + 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>$Vennerable_log + 1>>$Vennerable_log + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + imagetype=="svg" + + + imagetype=="png" + + + imagetype=="pdf" + + + + + + + + + R + vennerable_r_packages + VENNERABLE_SCRIPT_PATH + + +| + + +**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->Convert* + + + + diff -r 000000000000 -r f21d51d28d8d vennerable/static/images/Vennerable.R_backup.png --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vennerable/static/images/Vennerable.R_backup.png Tue Mar 31 13:18:31 2015 +0200 @@ -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() + diff -r 000000000000 -r f21d51d28d8d vennerable/static/images/Vennerable.pdf Binary file vennerable/static/images/Vennerable.pdf has changed diff -r 000000000000 -r f21d51d28d8d vennerable/static/images/Vennerable.xml_backup.png --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vennerable/static/images/Vennerable.xml_backup.png Tue Mar 31 13:18:31 2015 +0200 @@ -0,0 +1,112 @@ + + : Plot data in Venn or Venn-like diagrams + + #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>$Vennerable_log + 1>>$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>$Vennerable_log + 1>>$Vennerable_log + #end if + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + R + + +| + + +**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->Convert* + + + + diff -r 000000000000 -r f21d51d28d8d vennerable/static/images/VennerablePlot.png Binary file vennerable/static/images/VennerablePlot.png has changed diff -r 000000000000 -r f21d51d28d8d vennerable/test/Vennerable.DemoTable.tab --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vennerable/test/Vennerable.DemoTable.tab Tue Mar 31 13:18:31 2015 +0200 @@ -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 diff -r 000000000000 -r f21d51d28d8d vennerable/tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vennerable/tool_dependencies.xml Tue Mar 31 13:18:31 2015 +0200 @@ -0,0 +1,32 @@ + + + + $REPOSITORY_INSTALL_DIR + + + + + + + + + + + + http://www.bioconductor.org/packages/2.13/bioc/src/contrib/BiocGenerics_0.8.0.tar.gz + http://www.bioconductor.org/packages/2.13/bioc/src/contrib/graph_1.40.1.tar.gz + http://www.bioconductor.org/packages/2.13/bioc/src/contrib/RBGL_1.38.0.tar.gz + http://cran.r-project.org/src/contrib/Archive/RColorBrewer/RColorBrewer_1.0-4.tar.gz + http://cran.r-project.org/src/contrib/Archive/Rcpp/Rcpp_0.11.2.tar.gz + http://cran.r-project.org/src/contrib/Archive/plyr/plyr_1.8.tar.gz + http://cran.r-project.org/src/contrib/Archive/reshape/reshape_0.8.4.tar.gz + http://cran.r-project.org/src/contrib/Archive/gtools/gtools_3.4.0.tar.gz + http://cran.r-project.org/src/contrib/Archive/xtable/xtable_1.7-3.tar.gz + http://download.r-forge.r-project.org/src/contrib/Vennerable_3.0.tar.gz + + + + + + +