Repository 'biosigner'
hg clone https://toolshed.g2.bx.psu.edu/repos/ethevenot/biosigner

Changeset 3:fa80bd02055f (2017-06-06)
Previous changeset 2:b2414be87d4b (2016-08-06)
Commit message:
planemo upload for repository https://github.com/workflow4metabolomics/biosigner.git commit 23d58cfd97411ad5d272971896914ce99e30b0ab
modified:
biosigner_config.xml
biosigner_wrapper.R
build.xml
added:
test/.gitignore
test/test-biosigner
b
diff -r b2414be87d4b -r fa80bd02055f biosigner_config.xml
--- a/biosigner_config.xml Sat Aug 06 12:17:12 2016 -0400
+++ b/biosigner_config.xml Tue Jun 06 11:44:00 2017 -0400
b
@@ -1,8 +1,7 @@
-<tool id="biosigner" name="Biosigner" version="2.2.6">
+<tool id="biosigner" name="Biosigner" version="2.2.7">
   <description>Molecular signature discovery from omics data</description>
   
   <requirements>
-    <requirement type="package" version="3.2.2">R</requirement>
     <requirement type="package">r-batch</requirement>
     <requirement type="package">bioconductor-biosigner</requirement>
   </requirements>
b
diff -r b2414be87d4b -r fa80bd02055f biosigner_wrapper.R
--- a/biosigner_wrapper.R Sat Aug 06 12:17:12 2016 -0400
+++ b/biosigner_wrapper.R Tue Jun 06 11:44:00 2017 -0400
[
@@ -1,4 +1,5 @@
-#!/usr/bin/env Rscript
+#!/usr/bin/Rscript --vanilla --slave --no-site-file
+
 
 library(batch) ## parseCommandArgs
 
@@ -131,13 +132,15 @@
 if(!is.null(tierMC)) {
     plot(bsnLs,
          tierMaxC = tierMaxC,
-         file.pdfC = argVc["figure_tier"],
+         file.pdfC = "figure_tier.pdf",
          .sinkC = argVc["information"])
+    file.rename("figure_tier.pdf", argVc["figure_tier"])
     plot(bsnLs,
          tierMaxC = tierMaxC,
          typeC = "boxplot",
-         file.pdfC = argVc["figure_boxplot"],
+         file.pdfC = "figure_boxplot.pdf",
          .sinkC = argVc["information"])
+    file.rename("figure_boxplot.pdf", argVc["figure_boxplot"])
 } else {
     pdf(argVc["figure_tier"])
     plot(1, bty = "n", type = "n",
@@ -169,8 +172,7 @@
 if(sum(tierMC %in% tierVc)) {
     cat("\nSignificant features from '", paste(tierVc, collapse = "', '"), "' tiers:\n", sep = "")
     print(tierMC[apply(tierMC, 1, function(rowVc) sum(rowVc %in% tierVc) > 0), ,
-                 drop = FALSE])
-
+                         drop = FALSE])
     cat("\nAccuracy:\n")
     print(round(getAccuracyMN(bsnLs), 3))
 } else
@@ -216,9 +218,25 @@
 cat("\nEnd of '", modNamC, "' Galaxy module call: ",
     as.character(Sys.time()), "\n", sep = "")
 
+cat("\n\n\n============================================================================")
+
+cat("\nAdditional information about the call:\n")
+
+cat("\n1) Parameters:\n")
+print(cbind(value = argVc))
+
+cat("\n2) Session Info:\n")
+sessioninfo <- sessionInfo()
+cat(sessioninfo$R.version$version.string,"\n")
+cat("Main packages:\n")
+for (pkg in names(sessioninfo$otherPkgs)) { cat(paste(pkg,packageVersion(pkg)),"\t") }; cat("\n")
+cat("Other loaded packages:\n")
+for (pkg in names(sessioninfo$loadedOnly)) { cat(paste(pkg,packageVersion(pkg)),"\t") }; cat("\n")
+
+cat("============================================================================\n")
+
 sink()
 
 options(stringsAsFactors = strAsFacL)
 
 rm(list = ls())
-
b
diff -r b2414be87d4b -r fa80bd02055f build.xml
--- a/build.xml Sat Aug 06 12:17:12 2016 -0400
+++ b/build.xml Tue Jun 06 11:44:00 2017 -0400
b
@@ -13,7 +13,16 @@
  ~ TEST ~
  ~~~~~-->
 
- <target name="test" depends="planemo.lint,planemo.test"/>
+ <target name="test" depends="plain.test,galaxy.test"/>
+ <target name="galaxy.test" depends="planemo.lint,planemo.test"/>
+
+ <!--~~~~~~~~~~
+ ~ PLAIN TEST ~
+ ~~~~~~~~~~~-->
+
+ <target name="plain.test">
+ <exec executable="test/test-biosigner" failonerror="true"/>
+ </target>
 
  <!--~~~~~~~~~~~~
  ~ PLANEMO LINT ~
b
diff -r b2414be87d4b -r fa80bd02055f test/.gitignore
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/.gitignore Tue Jun 06 11:44:00 2017 -0400
b
@@ -0,0 +1,1 @@
+*.tsv
b
diff -r b2414be87d4b -r fa80bd02055f test/test-biosigner
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/test-biosigner Tue Jun 06 11:44:00 2017 -0400
b
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Constants {{{1
+################################################################
+
+PROG_PATH=$(dirname $0)
+
+# MAIN {{{1
+################################################################
+
+$PROG_PATH/../biosigner_wrapper.R dataMatrix_in $PROG_PATH/../test-data/dataMatrix.tsv sampleMetadata_in $PROG_PATH/../test-data/sampleMetadata.tsv variableMetadata_in $PROG_PATH/../test-data/variableMetadata.tsv respC gender opcC full methodC all bootI 5 tierC S pvalN 0.05 seedI 123 variableMetadata_out $PROG_PATH/outputVariableMetadata.tsv
+
+if ! diff "$PROG_PATH/outputVariableMetadata.tsv" "$PROG_PATH/../test-data/variableMetadata.out" ; then
+ echo "Incorrect output variable metadata." >&2
+ exit 1
+fi