changeset 0:12b4f093e6c4 draft default tip

planemo upload commit 2774930eebe258ecd56c8f1c5ddabf5092282ab9
author bcclaywell
date Mon, 12 Oct 2015 16:46:15 -0400
parents
children
files community.R community.xml cooccurrence.R cooccurrence.xml descriptiveStatistics.R descriptiveStatistics.xml diversityStatistics.R diversityStatistics.xml getAttributeList.R getAttributeList.xml presenceAbsence.R presenceAbsence.xml rankAbundancePlot.R rankAbundancePlot.xml reducedDimensionality.R reducedDimensionality.xml ribbonPlot.R ribbonPlot.xml
diffstat 18 files changed, 840 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/community.R	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,54 @@
+#!/usr/bin/env Rscript
+
+## begin warning handler
+withCallingHandlers({
+
+library(methods) # Because Rscript does not always do this
+
+options('useFancyQuotes' = FALSE)
+
+suppressPackageStartupMessages(library("optparse"))
+suppressPackageStartupMessages(library("RGalaxy"))
+
+
+option_list <- list()
+
+option_list$CountsFile <- make_option('--CountsFile', type='character')
+option_list$SamplesFile <- make_option('--SamplesFile', type='character')
+option_list$K <- make_option('--K', type='numeric')
+option_list$A <- make_option('--A', type='numeric')
+option_list$Transform <- make_option('--Transform', type='character')
+option_list$SampleName <- make_option('--SampleName', type='character')
+option_list$ColumnClasses <- make_option('--ColumnClasses', type='character')
+option_list$OutputFile <- make_option('--OutputFile', type='character')
+
+
+opt <- parse_args(OptionParser(option_list=option_list))
+
+suppressPackageStartupMessages(library(microbiomePkg))
+
+## function body not needed here, it is in package
+
+params <- list()
+for(param in names(opt))
+{
+    if (!param == "help")
+        params[param] <- opt[param]
+}
+
+setClass("GalaxyRemoteError", contains="character")
+wrappedFunction <- function(f)
+{
+    tryCatch(do.call(f, params),
+        error=function(e) new("GalaxyRemoteError", conditionMessage(e)))
+}
+
+
+suppressPackageStartupMessages(library(RGalaxy))
+do.call(community, params)
+
+## end warning handler
+}, warning = function(w) {
+    cat(paste("Warning:", conditionMessage(w), "\n"))
+    invokeRestart("muffleWarning")
+})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/community.xml	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,70 @@
+<tool id="community" name="Community" version="0.0.16">
+  <description>'Community' Data Input</description>
+  <requirements>
+    <requirement type="package" version="3.1.2">R</requirement>
+    <requirement type="package" version="2014-05-02">microbiome_community</requirement>
+  </requirements>
+  <command interpreter="Rscript --vanilla">community.R
+       #if str($CountsFile).strip() != "":
+          --CountsFile="$CountsFile"
+       #end if
+       #if str($SamplesFile).strip() != "":
+          --SamplesFile="$SamplesFile"
+       #end if
+       #if str($K).strip() != "":
+          --K="$K"
+       #end if
+       #if str($A).strip() != "":
+          --A="$A"
+       #end if
+       #if str($Transform).strip() != "":
+          --Transform="$Transform"
+       #end if
+       #if str($SampleName).strip() != "":
+          --SampleName="$SampleName"
+       #end if
+       #if str($ColumnClasses).strip() != "":
+          --ColumnClasses="$ColumnClasses"
+       #end if
+       #if str($OutputFile).strip() != "":
+          --OutputFile="$OutputFile"
+       #end if
+
+2&gt;&amp;1</command>
+  <inputs>
+    <param optional="false" name="CountsFile" type="data" help="Name of a CSV file containing OTU samples." label="[required] Counts File">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="false" name="SamplesFile" type="data" help="Name of a CSV file containing sample data." label="[required] Samples File">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="K" type="float" value="0" help="The parameters 'K' and 'A' together define a 'K over A'&#10;filter. The filter can be used to include only some taxa. The&#10;idea is that a taxonomic entity is only included if at least&#10;'A' reads are present in at least 'K' samples. The default is&#10;A = K = 0, i.e., include all taxa. Specify 'K' in the box&#10;above." label="K">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="A" type="float" value="0" help="Include only taxa with at least K samples greater than A, as&#10;described for the parameter K." label="A">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="Transform" type="select" help="(Optional) A transformation applied to all count data, after&#10;the 'K Over A' filter has been run. Possible values include&#10;&quot;log&quot; (actually, log(x + .5) to avoid logarithms of zero&#10;counts) and &quot;asinh&quot; (inverse hyperboloic sine, a log-like&#10;transformation with better behavior near zero)." label="Transform" force_select="FALSE">
+      <validator type="empty_field" message="This field is required."/>
+      <option value="none">none</option>
+      <option value="log">log</option>
+      <option value="asinh">asinh</option>
+    </param>
+    <param optional="true" name="SampleName" type="text" help="(Optional) Samples File column name containing names by&#10;which samples are identified in all subsequent calculations.&#10;If two rows have the same Sample Name, then corresponding&#10;counts in the Counts File are added together." size="60" label="Sample Name">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="ColumnClasses" type="text" help="(Optional) Comma-separated names specifying how each&#10;column is to be represented. There must be as many names, and&#10;in the same order, as there are columns in the file. Typical&#10;values include: logical, integer, numeric, character, factor,&#10;Date. Use 'factor' to indicate a variable with discrete&#10;levels, e.g., sex (with levels Male, Female) tissue type&#10;(with levels Tumor, Normal), etc. When 'Date' is used, dates&#10;should be formatted consistently as year-month-day or&#10;year/month/day, e.g., 2014-03-26; poorly formed dates will be&#10;converted to 'NA' values." size="60" label="Column Classes">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="rda" name="OutputFile" label="community.rda"/>
+  </outputs>
+  <help>
+**Description**
+
+Input a CSV file of integer-valued counts of each taxon (row) in
+each sample (column), and a CSV file of annotations on each
+sample. The result is used in down-stream analysis.
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cooccurrence.R	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,50 @@
+#!/usr/bin/env Rscript
+
+## begin warning handler
+withCallingHandlers({
+
+library(methods) # Because Rscript does not always do this
+
+options('useFancyQuotes' = FALSE)
+
+suppressPackageStartupMessages(library("optparse"))
+suppressPackageStartupMessages(library("RGalaxy"))
+
+
+option_list <- list()
+
+option_list$CommunityFile <- make_option('--CommunityFile', type='character')
+option_list$TaxonQuantile <- make_option('--TaxonQuantile', type='numeric')
+option_list$Transform <- make_option('--Transform', type='character')
+option_list$OutputFile <- make_option('--OutputFile', type='character')
+
+
+opt <- parse_args(OptionParser(option_list=option_list))
+
+suppressPackageStartupMessages(library(microbiomePkg))
+
+## function body not needed here, it is in package
+
+params <- list()
+for(param in names(opt))
+{
+    if (!param == "help")
+        params[param] <- opt[param]
+}
+
+setClass("GalaxyRemoteError", contains="character")
+wrappedFunction <- function(f)
+{
+    tryCatch(do.call(f, params),
+        error=function(e) new("GalaxyRemoteError", conditionMessage(e)))
+}
+
+
+suppressPackageStartupMessages(library(RGalaxy))
+do.call(cooccurrence, params)
+
+## end warning handler
+}, warning = function(w) {
+    cat(paste("Warning:", conditionMessage(w), "\n"))
+    invokeRestart("muffleWarning")
+})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cooccurrence.xml	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,45 @@
+<tool id="cooccurrence" name="Cooccurrence" version="0.0.16">
+  <description>Taxonomic Co-occurrence Heatmap</description>
+  <requirements>
+    <requirement type="package" version="3.1.2">R</requirement>
+    <requirement type="package" version="2014-05-02">microbiome_community</requirement>
+  </requirements>
+  <command interpreter="Rscript --vanilla">cooccurrence.R
+       #if str($CommunityFile).strip() != "":
+          --CommunityFile="$CommunityFile"
+       #end if
+       #if str($TaxonQuantile).strip() != "":
+          --TaxonQuantile="$TaxonQuantile"
+       #end if
+       #if str($Transform).strip() != "":
+          --Transform="$Transform"
+       #end if
+       #if str($OutputFile).strip() != "":
+          --OutputFile="$OutputFile"
+       #end if
+
+2&gt;&amp;1</command>
+  <inputs>
+    <param optional="false" name="CommunityFile" format="rda" type="data" help="File created by the 'community' function." label="[required] Community File">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="TaxonQuantile" type="float" value="0" help="(Optional, default 0) Numeric value between 0 and 1,&#10;limiting only taxa more frequent than the specified quantile." label="Taxon Quantile">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="Transform" type="select" help="(Optional; default 'none') Character string defining how&#10;count data are to be transformed prior to calculation of&#10;co-occurrence. Possible values are 'none', 'log1' (log of 1 +&#10;the observed count, to allow for zeros in the data), 'asinh'&#10;(a log-like transformation that handles zeros more&#10;naturally), 'sqrt' (square root, a transformation commonly&#10;used for count data)." label="Transform" force_select="FALSE">
+      <validator type="empty_field" message="This field is required."/>
+      <option value="none">none</option>
+      <option value="log1">log1</option>
+      <option value="asinh">asinh</option>
+      <option value="sqrt">sqrt</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="pdf" name="OutputFile" label="cooccurrence.pdf"/>
+  </outputs>
+  <help>
+**Description**
+
+Taxonomic co-occurrence across samples, displayed as a heatmap.
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/descriptiveStatistics.R	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,49 @@
+#!/usr/bin/env Rscript
+
+## begin warning handler
+withCallingHandlers({
+
+library(methods) # Because Rscript does not always do this
+
+options('useFancyQuotes' = FALSE)
+
+suppressPackageStartupMessages(library("optparse"))
+suppressPackageStartupMessages(library("RGalaxy"))
+
+
+option_list <- list()
+
+option_list$CommunityFile <- make_option('--CommunityFile', type='character')
+option_list$Attributes <- make_option('--Attributes', type='character')
+option_list$OutputFile <- make_option('--OutputFile', type='character')
+
+
+opt <- parse_args(OptionParser(option_list=option_list))
+
+suppressPackageStartupMessages(library(microbiomePkg))
+
+## function body not needed here, it is in package
+
+params <- list()
+for(param in names(opt))
+{
+    if (!param == "help")
+        params[param] <- opt[param]
+}
+
+setClass("GalaxyRemoteError", contains="character")
+wrappedFunction <- function(f)
+{
+    tryCatch(do.call(f, params),
+        error=function(e) new("GalaxyRemoteError", conditionMessage(e)))
+}
+
+
+suppressPackageStartupMessages(library(RGalaxy))
+do.call(descriptiveStatistics, params)
+
+## end warning handler
+}, warning = function(w) {
+    cat(paste("Warning:", conditionMessage(w), "\n"))
+    invokeRestart("muffleWarning")
+})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/descriptiveStatistics.xml	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,36 @@
+<tool id="descriptiveStatistics" name="Descriptive Statistics" version="0.0.16">
+  <description>Taxonomic and Sample Descriptive Statistics</description>
+  <requirements>
+    <requirement type="package" version="3.1.2">R</requirement>
+    <requirement type="package" version="2014-05-02">microbiome_community</requirement>
+  </requirements>
+  <command interpreter="Rscript --vanilla">descriptiveStatistics.R
+       #if str($CommunityFile).strip() != "":
+          --CommunityFile="$CommunityFile"
+       #end if
+       #if str($Attributes).strip() != "":
+          --Attributes="$Attributes"
+       #end if
+       #if str($OutputFile).strip() != "":
+          --OutputFile="$OutputFile"
+       #end if
+
+2&gt;&amp;1</command>
+  <inputs>
+    <param optional="false" name="CommunityFile" format="rda" type="data" help="File created by the 'community' function." label="[required] Community File">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="Attributes" type="text" help="Comma-separated names of SamplesFile columns on which&#10;descriptive statistics are to be calculated. Example:&#10;Nugent_2_group" size="60" label="Attributes">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="txt" name="OutputFile" label="descriptiveStatistics.txt"/>
+  </outputs>
+  <help>
+**Description**
+
+Generate descriptive statistics about taxa and samples present in
+a CommunityFile.
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/diversityStatistics.R	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,48 @@
+#!/usr/bin/env Rscript
+
+## begin warning handler
+withCallingHandlers({
+
+library(methods) # Because Rscript does not always do this
+
+options('useFancyQuotes' = FALSE)
+
+suppressPackageStartupMessages(library("optparse"))
+suppressPackageStartupMessages(library("RGalaxy"))
+
+
+option_list <- list()
+
+option_list$CommunityFile <- make_option('--CommunityFile', type='character')
+option_list$OutputFile <- make_option('--OutputFile', type='character')
+
+
+opt <- parse_args(OptionParser(option_list=option_list))
+
+suppressPackageStartupMessages(library(microbiomePkg))
+
+## function body not needed here, it is in package
+
+params <- list()
+for(param in names(opt))
+{
+    if (!param == "help")
+        params[param] <- opt[param]
+}
+
+setClass("GalaxyRemoteError", contains="character")
+wrappedFunction <- function(f)
+{
+    tryCatch(do.call(f, params),
+        error=function(e) new("GalaxyRemoteError", conditionMessage(e)))
+}
+
+
+suppressPackageStartupMessages(library(RGalaxy))
+do.call(diversityStatistics, params)
+
+## end warning handler
+}, warning = function(w) {
+    cat(paste("Warning:", conditionMessage(w), "\n"))
+    invokeRestart("muffleWarning")
+})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/diversityStatistics.xml	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,31 @@
+<tool id="diversityStatistics" name="Diversity Statistics" version="0.0.16">
+  <description>Taxonomic Diversity Statistics</description>
+  <requirements>
+    <requirement type="package" version="3.1.2">R</requirement>
+    <requirement type="package" version="2014-05-02">microbiome_community</requirement>
+  </requirements>
+  <command interpreter="Rscript --vanilla">diversityStatistics.R
+       #if str($CommunityFile).strip() != "":
+          --CommunityFile="$CommunityFile"
+       #end if
+       #if str($OutputFile).strip() != "":
+          --OutputFile="$OutputFile"
+       #end if
+
+2&gt;&amp;1</command>
+  <inputs>
+    <param optional="false" name="CommunityFile" format="rda" type="data" help="File created by the 'community' function." label="[required] Community File">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="csv" name="OutputFile" label="diversityStatistics.csv"/>
+  </outputs>
+  <help>
+**Description**
+
+Compute per-sample Shannon, Simpson, Chao1, and ACE summary
+statistics of taxonomic diversity. Also report per-sample number
+of taxa with non-zero read counts, and total number of reads.
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getAttributeList.R	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,48 @@
+#!/usr/bin/env Rscript
+
+## begin warning handler
+withCallingHandlers({
+
+library(methods) # Because Rscript does not always do this
+
+options('useFancyQuotes' = FALSE)
+
+suppressPackageStartupMessages(library("optparse"))
+suppressPackageStartupMessages(library("RGalaxy"))
+
+
+option_list <- list()
+
+option_list$CommunityFile <- make_option('--CommunityFile', type='character')
+option_list$OutputFile <- make_option('--OutputFile', type='character')
+
+
+opt <- parse_args(OptionParser(option_list=option_list))
+
+suppressPackageStartupMessages(library(microbiomePkg))
+
+## function body not needed here, it is in package
+
+params <- list()
+for(param in names(opt))
+{
+    if (!param == "help")
+        params[param] <- opt[param]
+}
+
+setClass("GalaxyRemoteError", contains="character")
+wrappedFunction <- function(f)
+{
+    tryCatch(do.call(f, params),
+        error=function(e) new("GalaxyRemoteError", conditionMessage(e)))
+}
+
+
+suppressPackageStartupMessages(library(RGalaxy))
+do.call(getAttributeList, params)
+
+## end warning handler
+}, warning = function(w) {
+    cat(paste("Warning:", conditionMessage(w), "\n"))
+    invokeRestart("muffleWarning")
+})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getAttributeList.xml	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,30 @@
+<tool id="getAttributeList" name="Get Attribute List" version="0.0.16">
+  <description>Get available attributes from a community file.</description>
+  <requirements>
+    <requirement type="package" version="3.1.2">R</requirement>
+    <requirement type="package" version="2014-05-02">microbiome_community</requirement>
+  </requirements>
+  <command interpreter="Rscript --vanilla">getAttributeList.R
+       #if str($CommunityFile).strip() != "":
+          --CommunityFile="$CommunityFile"
+       #end if
+       #if str($OutputFile).strip() != "":
+          --OutputFile="$OutputFile"
+       #end if
+
+2&gt;&amp;1</command>
+  <inputs>
+    <param optional="false" name="CommunityFile" format="rda" type="data" help="created by the 'community' function." label="[required] Community File">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="txt" name="OutputFile" label="attributes.txt"/>
+  </outputs>
+  <help>
+**Description**
+
+Display available attributes from a community file, for use with
+other Microbiome Workflow tools.
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/presenceAbsence.R	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,49 @@
+#!/usr/bin/env Rscript
+
+## begin warning handler
+withCallingHandlers({
+
+library(methods) # Because Rscript does not always do this
+
+options('useFancyQuotes' = FALSE)
+
+suppressPackageStartupMessages(library("optparse"))
+suppressPackageStartupMessages(library("RGalaxy"))
+
+
+option_list <- list()
+
+option_list$CommunityFile <- make_option('--CommunityFile', type='character')
+option_list$Attribute <- make_option('--Attribute', type='character')
+option_list$OutputFile <- make_option('--OutputFile', type='character')
+
+
+opt <- parse_args(OptionParser(option_list=option_list))
+
+suppressPackageStartupMessages(library(microbiomePkg))
+
+## function body not needed here, it is in package
+
+params <- list()
+for(param in names(opt))
+{
+    if (!param == "help")
+        params[param] <- opt[param]
+}
+
+setClass("GalaxyRemoteError", contains="character")
+wrappedFunction <- function(f)
+{
+    tryCatch(do.call(f, params),
+        error=function(e) new("GalaxyRemoteError", conditionMessage(e)))
+}
+
+
+suppressPackageStartupMessages(library(RGalaxy))
+do.call(presenceAbsence, params)
+
+## end warning handler
+}, warning = function(w) {
+    cat(paste("Warning:", conditionMessage(w), "\n"))
+    invokeRestart("muffleWarning")
+})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/presenceAbsence.xml	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,35 @@
+<tool id="presenceAbsence" name="Presence Absence" version="0.0.16">
+  <description>Taxonomic Presence / Absence Summary and Chi-squared Test</description>
+  <requirements>
+    <requirement type="package" version="3.1.2">R</requirement>
+    <requirement type="package" version="2014-05-02">microbiome_community</requirement>
+  </requirements>
+  <command interpreter="Rscript --vanilla">presenceAbsence.R
+       #if str($CommunityFile).strip() != "":
+          --CommunityFile="$CommunityFile"
+       #end if
+       #if str($Attribute).strip() != "":
+          --Attribute="$Attribute"
+       #end if
+       #if str($OutputFile).strip() != "":
+          --OutputFile="$OutputFile"
+       #end if
+
+2&gt;&amp;1</command>
+  <inputs>
+    <param optional="false" name="CommunityFile" format="rda" type="data" help="File created by the 'community' function" label="[required] Community File">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="Attribute" type="text" help="Name of a sample attribute to summarize presence / absence&#10;data. Example: Nugent_2_group" size="60" label="Attribute">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="csv" name="OutputFile" label="presenceAbsence.csv"/>
+  </outputs>
+  <help>
+**Description**
+
+Summarize samples with each taxon present, grouped by factor
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rankAbundancePlot.R	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,52 @@
+#!/usr/bin/env Rscript
+
+## begin warning handler
+withCallingHandlers({
+
+library(methods) # Because Rscript does not always do this
+
+options('useFancyQuotes' = FALSE)
+
+suppressPackageStartupMessages(library("optparse"))
+suppressPackageStartupMessages(library("RGalaxy"))
+
+
+option_list <- list()
+
+option_list$CommunityFile <- make_option('--CommunityFile', type='character')
+option_list$TaxonQuantile <- make_option('--TaxonQuantile', type='numeric')
+option_list$Transform <- make_option('--Transform', type='character')
+option_list$RelativeAbundance <- make_option('--RelativeAbundance', type='logical')
+option_list$Attributes <- make_option('--Attributes', type='character')
+option_list$OutputFile <- make_option('--OutputFile', type='character')
+
+
+opt <- parse_args(OptionParser(option_list=option_list))
+
+suppressPackageStartupMessages(library(microbiomePkg))
+
+## function body not needed here, it is in package
+
+params <- list()
+for(param in names(opt))
+{
+    if (!param == "help")
+        params[param] <- opt[param]
+}
+
+setClass("GalaxyRemoteError", contains="character")
+wrappedFunction <- function(f)
+{
+    tryCatch(do.call(f, params),
+        error=function(e) new("GalaxyRemoteError", conditionMessage(e)))
+}
+
+
+suppressPackageStartupMessages(library(RGalaxy))
+do.call(rankAbundancePlot, params)
+
+## end warning handler
+}, warning = function(w) {
+    cat(paste("Warning:", conditionMessage(w), "\n"))
+    invokeRestart("muffleWarning")
+})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rankAbundancePlot.xml	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,57 @@
+<tool id="rankAbundancePlot" name="Rank Abundance Plot" version="0.0.16">
+  <description>Rank Abundance of Taxonomic Counts</description>
+  <requirements>
+    <requirement type="package" version="3.1.2">R</requirement>
+    <requirement type="package" version="2014-05-02">microbiome_community</requirement>
+  </requirements>
+  <command interpreter="Rscript --vanilla">rankAbundancePlot.R
+       #if str($CommunityFile).strip() != "":
+          --CommunityFile="$CommunityFile"
+       #end if
+       #if str($TaxonQuantile).strip() != "":
+          --TaxonQuantile="$TaxonQuantile"
+       #end if
+       #if str($Transform).strip() != "":
+          --Transform="$Transform"
+       #end if
+       #if str($RelativeAbundance).strip() != "":
+          --RelativeAbundance="$RelativeAbundance"
+       #end if
+       #if str($Attributes).strip() != "":
+          --Attributes="$Attributes"
+       #end if
+       #if str($OutputFile).strip() != "":
+          --OutputFile="$OutputFile"
+       #end if
+
+2&gt;&amp;1</command>
+  <inputs>
+    <param optional="false" name="CommunityFile" format="rda" type="data" help="File created by the 'community' function." label="[required] Community File">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="TaxonQuantile" type="float" value="0" help="(Optional, default 0) Numeric value between 0 and 1,&#10;limiting only taxa more frequent than the specified quantile." label="Taxon Quantile">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="Transform" type="select" help="(Optional; default 'none') Character string defining how&#10;count data are to be transformed prior to calculation of&#10;co-occurrence. Possible values are 'none', 'log1' (log of 1 +&#10;the observed count, to allow for zeros in the data), 'asinh'&#10;(a log-like transformation that handles zeros more&#10;naturally), 'sqrt' (square root, a transformation commonly&#10;used for count data)." label="Transform" force_select="FALSE">
+      <validator type="empty_field" message="This field is required."/>
+      <option value="none">none</option>
+      <option value="log1">log1</option>
+      <option value="asinh">asinh</option>
+      <option value="sqrt">sqrt</option>
+    </param>
+    <param optional="true" name="RelativeAbundance" type="boolean" value="FALSE" help="(Optional, default FALSE) When TRUE, scale&#10;transformed taxon abundances of each sample to sum to 1." checked="false" label="Relative Abundance">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="Attributes" type="text" help="Provide ribbon(s) identifying samples according to&#10;specified attributes." size="60" label="Attributes">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="pdf" name="OutputFile" label="rankAbundance.pdf"/>
+  </outputs>
+  <help>
+**Description**
+
+Rank abundance plots
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reducedDimensionality.R	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,50 @@
+#!/usr/bin/env Rscript
+
+## begin warning handler
+withCallingHandlers({
+
+library(methods) # Because Rscript does not always do this
+
+options('useFancyQuotes' = FALSE)
+
+suppressPackageStartupMessages(library("optparse"))
+suppressPackageStartupMessages(library("RGalaxy"))
+
+
+option_list <- list()
+
+option_list$CommunityFile <- make_option('--CommunityFile', type='character')
+option_list$Attributes <- make_option('--Attributes', type='character')
+option_list$OrdinationAlgorithm <- make_option('--OrdinationAlgorithm', type='character')
+option_list$OutputFile <- make_option('--OutputFile', type='character')
+
+
+opt <- parse_args(OptionParser(option_list=option_list))
+
+suppressPackageStartupMessages(library(microbiomePkg))
+
+## function body not needed here, it is in package
+
+params <- list()
+for(param in names(opt))
+{
+    if (!param == "help")
+        params[param] <- opt[param]
+}
+
+setClass("GalaxyRemoteError", contains="character")
+wrappedFunction <- function(f)
+{
+    tryCatch(do.call(f, params),
+        error=function(e) new("GalaxyRemoteError", conditionMessage(e)))
+}
+
+
+suppressPackageStartupMessages(library(RGalaxy))
+do.call(reducedDimensionality, params)
+
+## end warning handler
+}, warning = function(w) {
+    cat(paste("Warning:", conditionMessage(w), "\n"))
+    invokeRestart("muffleWarning")
+})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reducedDimensionality.xml	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,42 @@
+<tool id="reducedDimensionality" name="Reduced Dimensionality" version="0.0.16">
+  <description>Taxnomic Dimensionality Reduction (Ordination) Plot</description>
+  <requirements>
+    <requirement type="package" version="3.1.2">R</requirement>
+    <requirement type="package" version="2014-05-02">microbiome_community</requirement>
+  </requirements>
+  <command interpreter="Rscript --vanilla">reducedDimensionality.R
+       #if str($CommunityFile).strip() != "":
+          --CommunityFile="$CommunityFile"
+       #end if
+       #if str($Attributes).strip() != "":
+          --Attributes="$Attributes"
+       #end if
+       #if str($OrdinationAlgorithm).strip() != "":
+          --OrdinationAlgorithm="$OrdinationAlgorithm"
+       #end if
+       #if str($OutputFile).strip() != "":
+          --OutputFile="$OutputFile"
+       #end if
+
+2&gt;&amp;1</command>
+  <inputs>
+    <param optional="false" name="CommunityFile" format="rda" type="data" help="File created by the 'community' function." label="[required] Community File">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="Attributes" type="text" help="Comma-separated names of SamplesFile columns on which&#10;ribbons are to be plotted. Samples are ordered by the first&#10;element of Attributes; Attributes must identify more than 1&#10;SampleFile column. Example: Nugent_3_group, Amsel,&#10;Nugent_Lactobacillus, pH, Clue" size="60" label="Attributes">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="OrdinationAlgorithm" type="select" value="MDS" help="Algorithm to use for oridination &quot;PCoA&quot; (Principle&#10;Coordinates Analysis), &quot;NMDS&quot; (Non-Metric Multidimensional&#10;Scaling), &quot;CA&quot; (Correspondence Analysis), &quot;DPCoA&quot; (Double&#10;Principle Components Analysis)." label="Ordination Algorithm" force_select="FALSE">
+      <validator type="empty_field" message="This field is required."/>
+      <option value="MDS">MDS</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="pdf" name="OutputFile" label="reducedDimensionality.pdf"/>
+  </outputs>
+  <help>
+**Description**
+
+Reduce dimensionality of taxonomic abundance.
+</help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ribbonPlot.R	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,50 @@
+#!/usr/bin/env Rscript
+
+## begin warning handler
+withCallingHandlers({
+
+library(methods) # Because Rscript does not always do this
+
+options('useFancyQuotes' = FALSE)
+
+suppressPackageStartupMessages(library("optparse"))
+suppressPackageStartupMessages(library("RGalaxy"))
+
+
+option_list <- list()
+
+option_list$CommunityFile <- make_option('--CommunityFile', type='character')
+option_list$Attributes <- make_option('--Attributes', type='character')
+option_list$ClusteringAlgorithm <- make_option('--ClusteringAlgorithm', type='character')
+option_list$OutputFile <- make_option('--OutputFile', type='character')
+
+
+opt <- parse_args(OptionParser(option_list=option_list))
+
+suppressPackageStartupMessages(library(microbiomePkg))
+
+## function body not needed here, it is in package
+
+params <- list()
+for(param in names(opt))
+{
+    if (!param == "help")
+        params[param] <- opt[param]
+}
+
+setClass("GalaxyRemoteError", contains="character")
+wrappedFunction <- function(f)
+{
+    tryCatch(do.call(f, params),
+        error=function(e) new("GalaxyRemoteError", conditionMessage(e)))
+}
+
+
+suppressPackageStartupMessages(library(RGalaxy))
+do.call(ribbonPlot, params)
+
+## end warning handler
+}, warning = function(w) {
+    cat(paste("Warning:", conditionMessage(w), "\n"))
+    invokeRestart("muffleWarning")
+})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ribbonPlot.xml	Mon Oct 12 16:46:15 2015 -0400
@@ -0,0 +1,44 @@
+<tool id="ribbonPlot" name="Ribbon Plot" version="0.0.16">
+  <description>Attribute Ribbon Plot of Clustered Samples</description>
+  <requirements>
+    <requirement type="package" version="3.1.2">R</requirement>
+    <requirement type="package" version="2014-05-02">microbiome_community</requirement>
+  </requirements>
+  <command interpreter="Rscript --vanilla">ribbonPlot.R
+       #if str($CommunityFile).strip() != "":
+          --CommunityFile="$CommunityFile"
+       #end if
+       #if str($Attributes).strip() != "":
+          --Attributes="$Attributes"
+       #end if
+       #if str($ClusteringAlgorithm).strip() != "":
+          --ClusteringAlgorithm="$ClusteringAlgorithm"
+       #end if
+       #if str($OutputFile).strip() != "":
+          --OutputFile="$OutputFile"
+       #end if
+
+2&gt;&amp;1</command>
+  <inputs>
+    <param optional="false" name="CommunityFile" format="rda" type="data" help="File created by the 'community' function." label="[required] Community File">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="Attributes" type="text" help="Comma-separated names of SamplesFile columns on which&#10;ribbons are to be plotted. Samples are ordered by the first&#10;element of Attributes; Attributes must identify more than 1&#10;SampleFile column. Example: Nugent_3_group, Amsel,&#10;Nugent_Lactobacillus, pH, Clue" size="60" label="Attributes">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+    <param optional="true" name="ClusteringAlgorithm" type="select" help="Algorithm to use for clustering samples, one of&#10;&quot;hclust&quot; or 'DirichletMultinomial&quot; (from the&#10;DirichletMultinomial package)." label="Clustering Algorithm" force_select="FALSE">
+      <validator type="empty_field" message="This field is required."/>
+      <option value="hclust">hclust</option>
+      <option value="DirichletMultinomial">DirichletMultinomial</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="svg" name="OutputFile" label="ribbonPlot.svg"/>
+  </outputs>
+  <help>
+**Description**
+
+Attributes of samples as heat maps, with samples clustered by one
+of several algorithms
+</help>
+</tool>