# HG changeset patch
# User bcclaywell
# Date 1444682775 14400
# Node ID 12b4f093e6c49c88df0b751bc986fcddc73915dc
planemo upload commit 2774930eebe258ecd56c8f1c5ddabf5092282ab9
diff -r 000000000000 -r 12b4f093e6c4 community.R
--- /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")
+})
diff -r 000000000000 -r 12b4f093e6c4 community.xml
--- /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 @@
+
diff -r 000000000000 -r 12b4f093e6c4 cooccurrence.R
--- /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")
+})
diff -r 000000000000 -r 12b4f093e6c4 cooccurrence.xml
--- /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 @@
+
+ Taxonomic Co-occurrence Heatmap
+
+ R
+ microbiome_community
+
+ 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>&1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**Description**
+
+Taxonomic co-occurrence across samples, displayed as a heatmap.
+
+
diff -r 000000000000 -r 12b4f093e6c4 descriptiveStatistics.R
--- /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")
+})
diff -r 000000000000 -r 12b4f093e6c4 descriptiveStatistics.xml
--- /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 @@
+
+ Taxonomic and Sample Descriptive Statistics
+
+ R
+ microbiome_community
+
+ 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>&1
+
+
+
+
+
+
+
+
+
+
+
+
+**Description**
+
+Generate descriptive statistics about taxa and samples present in
+a CommunityFile.
+
+
diff -r 000000000000 -r 12b4f093e6c4 diversityStatistics.R
--- /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")
+})
diff -r 000000000000 -r 12b4f093e6c4 diversityStatistics.xml
--- /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 @@
+
+ Taxonomic Diversity Statistics
+
+ R
+ microbiome_community
+
+ diversityStatistics.R
+ #if str($CommunityFile).strip() != "":
+ --CommunityFile="$CommunityFile"
+ #end if
+ #if str($OutputFile).strip() != "":
+ --OutputFile="$OutputFile"
+ #end if
+
+2>&1
+
+
+
+
+
+
+
+
+
+**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.
+
+
diff -r 000000000000 -r 12b4f093e6c4 getAttributeList.R
--- /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")
+})
diff -r 000000000000 -r 12b4f093e6c4 getAttributeList.xml
--- /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 @@
+
+ Get available attributes from a community file.
+
+ R
+ microbiome_community
+
+ getAttributeList.R
+ #if str($CommunityFile).strip() != "":
+ --CommunityFile="$CommunityFile"
+ #end if
+ #if str($OutputFile).strip() != "":
+ --OutputFile="$OutputFile"
+ #end if
+
+2>&1
+
+
+
+
+
+
+
+
+
+**Description**
+
+Display available attributes from a community file, for use with
+other Microbiome Workflow tools.
+
+
diff -r 000000000000 -r 12b4f093e6c4 presenceAbsence.R
--- /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")
+})
diff -r 000000000000 -r 12b4f093e6c4 presenceAbsence.xml
--- /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 @@
+
+ Taxonomic Presence / Absence Summary and Chi-squared Test
+
+ R
+ microbiome_community
+
+ 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>&1
+
+
+
+
+
+
+
+
+
+
+
+
+**Description**
+
+Summarize samples with each taxon present, grouped by factor
+
+
diff -r 000000000000 -r 12b4f093e6c4 rankAbundancePlot.R
--- /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")
+})
diff -r 000000000000 -r 12b4f093e6c4 rankAbundancePlot.xml
--- /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 @@
+
+ Rank Abundance of Taxonomic Counts
+
+ R
+ microbiome_community
+
+ 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>&1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**Description**
+
+Rank abundance plots
+
+
diff -r 000000000000 -r 12b4f093e6c4 reducedDimensionality.R
--- /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")
+})
diff -r 000000000000 -r 12b4f093e6c4 reducedDimensionality.xml
--- /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 @@
+
+ Taxnomic Dimensionality Reduction (Ordination) Plot
+
+ R
+ microbiome_community
+
+ 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>&1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**Description**
+
+Reduce dimensionality of taxonomic abundance.
+
+
diff -r 000000000000 -r 12b4f093e6c4 ribbonPlot.R
--- /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")
+})
diff -r 000000000000 -r 12b4f093e6c4 ribbonPlot.xml
--- /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 @@
+
+ Attribute Ribbon Plot of Clustered Samples
+
+ R
+ microbiome_community
+
+ 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>&1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**Description**
+
+Attributes of samples as heat maps, with samples clustered by one
+of several algorithms
+
+