changeset 1:e194eec8e70c draft

planemo upload for repository https://github.com/workflow4metabolomics/checkformat.git commit 8ebfbfa8d9449c9bbfbf569851a30b1e33df0b3f
author ethevenot
date Sat, 06 Aug 2016 11:54:28 -0400
parents 0d8099822c49
children b6a6b4cc932a
files README.md build.xml checkFormat_config.xml checkFormat_script.R checkFormat_wrapper.R checkformat_config.xml checkformat_script.R checkformat_wrapper.R information.txt runit/.Rhistory runit/checkformat_runtests.R runit/checkformat_tests.R runit/input/dataMatrix.tsv runit/input/sampleMetadata.tsv runit/input/variableMetadata.tsv runit/output/information.txt tests/.Rhistory tests/checkFormat_tests.R tests/input/dataMatrix.tsv tests/input/sampleMetadata.tsv tests/input/variableMetadata.tsv tests/output/information.txt
diffstat 22 files changed, 678 insertions(+), 652 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Sat Jul 30 12:06:35 2016 -0400
+++ b/README.md	Sat Aug 06 11:54:28 2016 -0400
@@ -1,11 +1,13 @@
-## Checking the formats of the dataMatrix, sampleMetadata, and variableMetadata files  
-#### A Galaxy module from the [Workflow4metabolomics](http://workflow4metabolomics.org) project
+Checking the formats of the dataMatrix, sampleMetadata, and variableMetadata files  
+==================================================================================
+
+A Galaxy module from the [Workflow4metabolomics](http://workflow4metabolomics.org) infrastructure  
 
 Status: [![Build Status](https://travis-ci.org/workflow4metabolomics/checkformat.svg?branch=master)](https://travis-ci.org/workflow4metabolomics/checkformat).
 
 ### Description
 
-**Version:** 2.0.2  
+**Version:** 2.0.4  
 **Date:** 2016-07-29  
 **Author:** Etienne A. Thevenot (CEA, LIST, MetaboHUB, W4M Core Development Team)   
 **Email:** [etienne.thevenot(at)cea.fr](mailto:etienne.thevenot@cea.fr)  
@@ -18,23 +20,39 @@
 
 ### Installation
 
-* Configuration file: **checkFormat_config.xml**
-* Image file: **static/images/checkFormat_workflowPositionImage.png**   
-* Wrapper file: **checkFormat_wrapper.R**  
+* Configuration file: `checkformat_config.xml`
+* Image file: `static/images/checkformat_workflowPositionImage.png`   
+* Wrapper file: `checkformat_wrapper.R`  
 * R packages  
-    + **batch** from CRAN  
-> install.packages("batch", dep=TRUE)   
+    + **batch** from CRAN
+ 
+    ```r
+    install.packages("batch", dep=TRUE)  
+    ```
 
 ### Tests
 
-The code in the wrapper can be tested by running the **tests/checkFormat_tests.R** in R  
+The code in the wrapper can be tested by running the `runit/checkformat_tests.R` R file
+
+You will need to install **RUnit** package in order to make it run:
+```r
+install.packages('RUnit', dependencies = TRUE)
+```
+
+### Working example
+
+See the **W4M00001a_sacurine-subset-statistics**, **W4M00001b_sacurine-complete**, **W4M00002_mtbls2**, or **W4M00003_diaplasma** shared histories in the **Shared Data/Published Histories** menu (https://galaxy.workflow4metabolomics.org/history/list_published)
 
 ### News
 
+##### CHANGES IN VERSION 2.0.4 
+
+INTERNAL MODIFICATION  
+
+ * Minor internal modifications  
+
 ##### CHANGES IN VERSION 2.0.2  
 
 INTERNAL MODIFICATION  
 
-    o Creating tests for R code  
-    
-***
\ No newline at end of file
+ * Creating tests for R code  
\ No newline at end of file
--- a/build.xml	Sat Jul 30 12:06:35 2016 -0400
+++ b/build.xml	Sat Aug 06 11:54:28 2016 -0400
@@ -1,6 +1,6 @@
 <project name="checkformat" default="all">
 
-	<property name="tool.xml" value="checkFormat_config.xml"/>
+	<property name="tool.xml" value="checkformat_config.xml"/>
 	<property name="conda.dir" value="${user.home}/w4m-conda"/>
 
 	<!--~~~
--- a/checkFormat_config.xml	Sat Jul 30 12:06:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-<tool id="checkFormat" name="Check Format" version="2.0.2">
-  <description>Checks the formats of the dataMatrix, sampleMetadata, and variableMetadata files</description>
-  
-  <requirements>
-    <requirement type="package" version="3.2.2">R</requirement>
-    <requirement type="package">r-batch</requirement>
-  </requirements>
-  
-  <command><![CDATA[
-  Rscript $__tool_directory__/checkFormat_wrapper.R
-  dataMatrix_in "$dataMatrix_in"
-  sampleMetadata_in "$sampleMetadata_in"
-  variableMetadata_in "$variableMetadata_in"
-  
-  information "$information"
-  ]]></command>    
-  
-  <inputs>
-    <param name="dataMatrix_in" type="data" label="Data matrix file" help="" format="tabular" />
-    <param name="sampleMetadata_in" type="data" label="Sample metadata file" help="" format="tabular" />
-    <param name="variableMetadata_in" type="data" label="Variable metadata file" help="" format="tabular" />
-  </inputs>
-  
-  <outputs>
-    <data name="information" label="${tool.name}_information.txt" format="txt"/>
-  </outputs>
-  
-  <tests>
-    <test>
-      <param name="dataMatrix_in" value="input-dataMatrix.tsv"/>
-      <param name="sampleMetadata_in" value="input-sampleMetadata.tsv"/>
-      <param name="variableMetadata_in" value="input-variableMetadata.tsv"/>
-      <output name="information" file="output-information.txt" lines_diff="4"/>  
-    </test>
-  </tests>
-  
-  <help>
-    
-.. class:: infomark
-    
-**Author** Etienne Thevenot (W4M Core Development Team, MetaboHUB Paris, CEA)
-    
----------------------------------------------------
-    
-.. class:: infomark
-    
-**Tool updates**
-    
-See the **NEWS** section at the bottom of this page
-    
----------------------------------------------------
-    
-========================
-Check Format
-========================
-    
------------
-Description
------------
-    
-| Checks the format (row and column names) of the dataMatrix, sampleMetadata and variableMetadata tables
-    
-    
------------------
-Workflow position
------------------
-    
-.. image:: ./static/images/checkFormat_workflowPositionImage.png
-:width: 600
-    
-    
-    
------------
-Input files
------------
- 
-+----------------------------+---------+
-| Parameter : num + label    |  Format |
-+============================+=========+
-| 1 : Data matrix file       | tabular |
-+----------------------------+---------+
-| 2 : Sample metadata file   | tabular |
-+----------------------------+---------+
-| 3 : Variable metadata file | tabular |
-+----------------------------+---------+
-    
-|
-| **Required formats for the dataMatrix, sampleMetadata, and variableMetadata files are**
-| **described in the HowTo entitled 'Format Data For Postprocessing' available on the**
-| **main page of Workflow4Metabolomics.org**
-|
-    
-------------
-Output files
-------------
-    
-information.txt
-| Text file with all messages when error(s) in formats are detected
-|
-    
----------------------------------------------------
-    
----------------
-Working example
----------------
-    
-.. class:: infomark
-  
-See the **W4M00001a_sacurine-subset-statistics**, **W4M00001b_sacurine-complete**, **W4M00002_mtbls2**, or **W4M00003_diaplasma** shared histories in the **Shared Data/Published Histories** menu
-    
----------------------------------------------------
-    
-----
-NEWS
-----
-    
-CHANGES IN VERSION 2.0.2
-========================
-    
-INTERNAL MODIFICATIONS
-    
-Test for R code
-Planemo running validation
-Planemo installing validation
-Travis automated testing
-Toolshed export
-    
-  </help>
-  
-  <citations>
-    <citation type="bibtex">@Article{Thevenot2015,
-    Title                    = {Analysis of the human adult urinary metabolome variations with age, body mass index and gender by implementing a comprehensive workflow for univariate and OPLS statistical analyses},
-    Author                   = {Thévenot, Etienne A. and Roux, Aurélie and Xu, Ying and Ezan, Eric and Junot, Christophe},
-    Journal                  = {Journal of Proteome Research},
-    Year                     = {2015},
-    Note                     = {PMID: 26088811},
-    Number                   = {8},
-    Pages                    = {3322-3335},
-    Volume                   = {14},
-    
-    Doi                      = {10.1021/acs.jproteome.5b00354},
-    Url                      = {http://pubs.acs.org/doi/full/10.1021/acs.jproteome.5b00354}
-    }</citation>
-    
-  </citations>
-  
-  ---------------
-  Working example
-  ---------------
-  
-  
-  Input files
-  ===========
-  
-  | **To generate the "dataMatrix", "sampleMetadata" and "variableMetadata" files:**
-  |   **1) copy/paste the values below in three distinct .txt files**
-  |   **2) use the "Get Data" / "Upload File" in the "Tools" (left) panel from the Galaxy / ABiMS page by choosing:**
-  |     **a) File Format: 'tabular'**
-  |     **b) Convert spaces to tabs: 'Yes'**
-  | 
-  
-  **dataMatrix file**::
-  
-  dataMatrix HU_017 HU_021 HU_027 HU_032 HU_041 HU_048 HU_049 HU_050 HU_052 HU_059 HU_060 HU_066 HU_072 HU_077 HU_090 HU_109 HU_110 HU_125 HU_126 HU_131 HU_134 HU_149 HU_150 HU_173 HU_179 HU_180 HU_182 HU_202 HU_204 HU_209
-  HMDB01032 2569204.92420381 6222035.77434915 17070707.9912636 1258838.24348419 13039543.0754619 1909391.77026598 3495.09386434063 2293521.90928998 128503.275117713 81872.5276382213 8103557.56578035 149574887.036181 1544036.41049333 7103429.53933206 14138796.50382 4970265.57952158 263054.73056162 1671332.30008058 88433.1944958815 23602331.2894815 18648126.5206986 1554657.98756878 34152.3646391152 209372.71275317 33187733.370626 202438.591636003 13581070.0886437 354170.810678102 9120781.48986975 43419175.4051586
-  HMDB03072 3628416.30251025 65626.9834353751 112170.118946651 3261804.34422417 42228.2787747563 343254.201250707 1958217.69317664 11983270.0435677 5932111.41638028 5511385.83359531 9154521.47755199 2632133.21209418 9500411.14556502 6551644.51726592 7204319.80891836 1273412.04795188 3260583.81592376 8932005.5351622 8340827.52597275 9256460.69197759 11217839.169041 5919262.81433556 11790077.0657915 9567977.80797097 73717.5811684739 9991787.29074293 4208098.14739633 623970.649925847 10904221.2642849 2171793.93621067
-  HMDB00792 429568.609438384 3887629.50527037 1330692.11658995 1367446.73023821 844197.447472453 2948090.71886592 1614157.90566884 3740009.19379795 3292251.66531919 2310688.79492013 4404239.59008605 3043289.12780863 825736.467181043 2523241.91730649 6030501.02648005 474901.604069803 2885792.42617652 2955990.64049134 1917716.3427982 1767962.67737699 5926203.40397675 1639065.69474684 346810.763557826 1054776.22313737 2390258.27543894 1831346.37315857 1026696.36904362 7079792.50047866 4368341.01359769 3495986.87280275
-  
-  
-  **sampleMetadata file**::
-  
-  sampleMetadata age ageGrp
-  HU_017 41 experienced
-  HU_021 34 junior
-  HU_027 37 experienced
-  HU_032 38 experienced
-  HU_041 28 junior
-  HU_048 39 experienced
-  HU_049 50 senior
-  HU_050 30 junior
-  HU_052 51 senior
-  HU_059 81 senior
-  HU_060 55 senior
-  HU_066 25 junior
-  HU_072 47 experienced
-  HU_077 27 junior
-  HU_091 46 experienced
-  HU_109 32 junior
-  HU_110 50 senior
-  HU_125 58 senior
-  HU_126 45 experienced
-  HU_131 42 experienced
-  HU_134 48 experienced
-  HU_149 35 experienced
-  HU_150 49 experienced
-  HU_173 55 senior
-  HU_179 33 junior
-  HU_180 53 senior
-  HU_182 43 experienced
-  HU_202 42 experienced
-  HU_204 31 junior
-  HU_209 17.5 junior
-  
-  
-  **variableMetadata file**::
-  
-  variableMetadata name
-  HMDB01032        Dehydroepiandrosterone sulfate
-  HMDB03072        Quinic acid
-  HMDB00792        Sebacic acid
-  
-</tool>
--- a/checkFormat_script.R	Sat Jul 30 12:06:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-## Etienne Thevenot
-## CEA, MetaboHUB Paris
-## etienne.thevenot@cea.fr
-
-
-## Reads the dataMatrix, sampleMetadata, and variableMetadata .tsv files
-## and checks the formats
-readAndCheckF <- function(datFilC="dataMatrix.tsv",
-                          samFilC="sampleMetadata.tsv",
-                          varFilC="variableMetadata.tsv") {
-
-    ## options
-
-    optStrAsFacL <- options()[["stringsAsFactors"]]
-    options(stringsAsFactors = FALSE)
-
-    ## checking that the tables have no duplicated row or column names
-
-    for(tabC in c("dat", "sam", "var")) {
-
-        tabNamC <- switch(tabC, dat="dataMatrix", sam="sampleMetadata", var="variableMetadata")
-
-        rowVc <- read.table(eval(parse(text=paste0(tabC, "FilC"))),
-                            check.names = FALSE,
-                            header = TRUE,
-                            sep = "\t")[, 1]
-
-        colVc <- unlist(read.table(eval(parse(text=paste0(tabC, "FilC"))),
-                                   check.names = FALSE,
-                                   nrow=1,
-                                   sep = "\t"))[-1]
-
-        if(any(duplicated(rowVc)))
-            stop("The following row name(s) is/are duplicated in the ",
-                 tabNamC,
-                 " table: '",
-                 paste(rowVc[duplicated(rowVc)], collapse="', '"), "'",
-                 call.=FALSE)
-
-        if(any(duplicated(colVc)))
-            stop("The following column name(s) is/are duplicated in the ",
-                 tabNamC,
-                 " table: '",
-                 paste(colVc[duplicated(colVc)], collapse="', '"), "'",
-                 call.=FALSE)
-
-        rowMakVc <- make.names(rowVc, unique = TRUE)
-
-        rowDifVl <- rowVc != rowMakVc
-
-        if(any(rowDifVl)) {
-            rowDifDF <- data.frame(row = 1:length(rowVc),
-                                   actual = rowVc,
-                                   preferred = rowMakVc)
-            rowDifDF <- rowDifDF[rowDifVl, , drop = FALSE]
-            cat("\n\nWarning: The following row names of the ",
-                tabNamC,
-                " table are not in the standard R format, which may result in errors when loading the data in some of the W4M modules:\n", sep="")
-            print(rowDifDF)
-        }
-
-        colMakVc <- make.names(colVc, unique = TRUE)
-
-        colDifVl <- colVc != colMakVc
-
-        if(any(colDifVl)) {
-            colDifDF <- data.frame(col = 1:length(colVc),
-                                   actual = colVc,
-                                   preferred = colMakVc)
-            colDifDF <- colDifDF[colDifVl, , drop = FALSE]
-            cat("\n\nWarning: The following column names of the ",
-                tabNamC,
-                " table are not in the standard R format, which may result in errors when loading the data in some of the W4M modules:\n", sep="")
-            print(colDifDF)
-        }
-    }
-
-    ## reading tables
-
-    datMN <- t(as.matrix(read.table(datFilC,
-                                    check.names = FALSE,
-                                    header = TRUE,
-                                    row.names = 1,
-                                    sep = "\t")))
-
-    samDF <- read.table(samFilC,
-                        check.names = FALSE,
-                        header = TRUE,
-                        row.names = 1,
-                        sep = "\t")
-
-    varDF <- read.table(varFilC,
-                        check.names = FALSE,
-                        header = TRUE,
-                        row.names = 1,
-                        sep = "\t")
-
-    ## checking formats
-
-    chkL <- TRUE
-
-    if(!identical(rownames(datMN), rownames(samDF))) {
-        ## checking sample names
-
-        chkL <- FALSE
-
-        datSamDifVc <- setdiff(rownames(datMN), rownames(samDF))
-
-        if(length(datSamDifVc)) {
-            cat("\nThe following samples were found in the dataMatrix column names but not in the sampleMetadata row names:\n", sep="")
-            print(cbind.data.frame(col = as.numeric(sapply(datSamDifVc, function(samC) which(rownames(datMN) == samC))),
-                                   name = datSamDifVc))
-        }
-
-        samDatDifVc <- setdiff(rownames(samDF), rownames(datMN))
-
-        if(length(samDatDifVc)) {
-            cat("\n\nThe following samples were found in the sampleMetadata row names but not in the dataMatrix column names:\n", sep="")
-            print(cbind.data.frame(row = as.numeric(sapply(samDatDifVc, function(samC) which(rownames(samDF) == samC))),
-                                   name = samDatDifVc))
-        }
-
-        if(nrow(datMN) != nrow(samDF)) {
-            cat("\n\nThe dataMatrix has ", nrow(datMN), " columns (ie samples) whereas the sampleMetadata has ", nrow(samDF), " rows\n", sep="")
-        } else if(identical(gsub("^X", "", rownames(datMN)), rownames(samDF))) {
-            cat("\n\nThe dataMatrix column names start with an 'X' but not the sampleMetadata row names\n", sep="")
-        } else if(identical(gsub("^X", "", rownames(samDF)), rownames(datMN))) {
-            cat("\n\nThe sampleMetadata row names start with an 'X' but not the dataMatrix column names\n", sep="")
-        } else if(identical(sort(rownames(datMN)), sort(rownames(samDF)))) {
-            cat("\n\nThe dataMatrix column names and the sampleMetadata row names are not in the same order:\n", sep="")
-            print(cbind.data.frame(indice = 1:nrow(datMN),
-                                   dataMatrix_columnnames=rownames(datMN),
-                                   sampleMetadata_rownames=rownames(samDF))[rownames(datMN) != rownames(samDF), , drop = FALSE])
-        } else {
-            cat("\n\nThe dataMatrix column names and the sampleMetadata row names are not identical:\n", sep="")
-            print(cbind.data.frame(indice = 1:nrow(datMN),
-                                   dataMatrix_columnnames=rownames(datMN),
-                                   sampleMetadata_rownames=rownames(samDF))[rownames(datMN) != rownames(samDF), , drop = FALSE])
-        }
-
-    }
-
-    if(!identical(colnames(datMN), rownames(varDF))) {
-        ## checking variable names
-
-        chkL <- FALSE
-
-        datVarDifVc <- setdiff(colnames(datMN), rownames(varDF))
-
-        if(length(datVarDifVc)) {
-            cat("\nThe following variables were found in the dataMatrix row names but not in the variableMetadata row names:\n", sep="")
-            print(cbind.data.frame(row = as.numeric(sapply(datVarDifVc, function(varC) which(colnames(datMN) == varC))),
-                        name = datVarDifVc))
-
-        }
-
-        varDatDifVc <- setdiff(rownames(varDF), colnames(datMN))
-
-        if(length(varDatDifVc)) {
-            cat("\n\nThe following variables were found in the variableMetadata row names but not in the dataMatrix row names:\n", sep="")
-            print(cbind.data.frame(row = as.numeric(sapply(varDatDifVc, function(varC) which(rownames(varDF) == varC))),
-                        name = varDatDifVc))
-        }
-
-        if(ncol(datMN) != nrow(varDF)) {
-            cat("\n\nThe dataMatrix has ", nrow(datMN), " rows (ie variables) whereas the variableMetadata has ", nrow(varDF), " rows\n", sep="")
-        } else if(identical(sort(colnames(datMN)), sort(rownames(varDF)))) {
-            cat("\n\nThe dataMatrix row names and the variableMetadata row names are not in the same order:\n", sep="")
-            print(cbind.data.frame(row = 1:ncol(datMN),
-                                   dataMatrix_rownames=colnames(datMN),
-                                   variableMetadata_rownames=rownames(varDF))[colnames(datMN) != rownames(varDF), , drop = FALSE])
-        } else {
-            cat("\n\nThe dataMatrix row names and the variableMetadata row names are not identical:\n", sep="")
-            print(cbind.data.frame(row = 1:ncol(datMN),
-                                   dataMatrix_rownames=colnames(datMN),
-                                   variableMetadata_rownames=rownames(varDF))[colnames(datMN) != rownames(varDF), , drop = FALSE])
-        }
-    }
-
-    options(stringsAsFactors=optStrAsFacL)
-
-    resLs <- list(chkL=chkL)
-
-    return(resLs)
-
-} ## end of checkAndReadF
--- a/checkFormat_wrapper.R	Sat Jul 30 12:06:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-#!/usr/bin/Rscript --vanilla --slave --no-site-file
-
-library(batch) ## parseCommandArgs
-
-source_local <- function(fname){
-    argv <- commandArgs(trailingOnly = FALSE)
-    base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
-    source(paste(base_dir, fname, sep="/"))
-}
-
-source_local("checkFormat_script.R")
-
-argVc <- unlist(parseCommandArgs(evaluate = FALSE))
-
-
-##------------------------------
-## Initializing
-##------------------------------
-
-## options
-##--------
-
-strAsFacL <- options()$stringsAsFactors
-options(stringsAsFactors = FALSE)
-
-## constants
-##----------
-
-modNamC <- "Check Format" ## module name
-
-## log file
-##---------
-
-sink(argVc["information"])
-
-cat("\nStart of the '", modNamC, "' Galaxy module call: ",
-    format(Sys.time(), "%a %d %b %Y %X"), "\n", sep="")
-
-
-##------------------------------
-## Computation
-##------------------------------
-
-
-resLs <- readAndCheckF(argVc["dataMatrix_in"],
-                       argVc["sampleMetadata_in"],
-                       argVc["variableMetadata_in"])
-chkL <- resLs[["chkL"]]
-
-
-##------------------------------
-## Ending
-##------------------------------
-
-
-if(chkL) {
-
-    cat("\nTable formats are OK; enjoy your analyses!\n", sep="")
-
-    cat("\nEnd of the '", modNamC, "' Galaxy module call: ",
-        format(Sys.time(), "%a %d %b %Y %X"), "\n", sep="")
-
-    sink()
-
-} else {
-
-    sink()
-    stop("Please check the generated 'information' file")
-
-}
-
-## closing
-##--------
-
-options(stringsAsFactors = strAsFacL)
-
-rm(list = ls())
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/checkformat_config.xml	Sat Aug 06 11:54:28 2016 -0400
@@ -0,0 +1,226 @@
+<tool id="checkFormat" name="Check Format" version="2.0.4">
+  <description>Checks the formats of the dataMatrix, sampleMetadata, and variableMetadata files</description>
+  
+  <requirements>
+    <requirement type="package" version="3.2.2">R</requirement>
+    <requirement type="package">r-batch</requirement>
+  </requirements>
+
+  <stdio>
+    <exit_code range="1:" level="fatal" />
+  </stdio>
+  
+  <command><![CDATA[
+  Rscript $__tool_directory__/checkformat_wrapper.R
+  dataMatrix_in "$dataMatrix_in"
+  sampleMetadata_in "$sampleMetadata_in"
+  variableMetadata_in "$variableMetadata_in"
+  
+  information "$information"
+  ]]></command>    
+  
+  <inputs>
+    <param name="dataMatrix_in" type="data" label="Data matrix file" help="" format="tabular" />
+    <param name="sampleMetadata_in" type="data" label="Sample metadata file" help="" format="tabular" />
+    <param name="variableMetadata_in" type="data" label="Variable metadata file" help="" format="tabular" />
+  </inputs>
+  
+  <outputs>
+    <data name="information" label="${tool.name}_information.txt" format="txt"/>
+  </outputs>
+  
+  <tests>
+    <test>
+      <param name="dataMatrix_in" value="input-dataMatrix.tsv"/>
+      <param name="sampleMetadata_in" value="input-sampleMetadata.tsv"/>
+      <param name="variableMetadata_in" value="input-variableMetadata.tsv"/>
+      <output name="information" file="output-information.txt" lines_diff="4"/>  
+    </test>
+  </tests>
+  
+  <help>
+    
+.. class:: infomark
+    
+**Author** Etienne Thevenot (W4M Core Development Team, MetaboHUB Paris, CEA)
+    
+---------------------------------------------------
+    
+.. class:: infomark
+    
+**Tool updates**
+    
+See the **NEWS** section at the bottom of this page
+    
+---------------------------------------------------
+    
+========================
+Check Format
+========================
+    
+-----------
+Description
+-----------
+    
+| Checks the format (row and column names) of the dataMatrix, sampleMetadata and variableMetadata tables
+    
+    
+-----------------
+Workflow position
+-----------------
+    
+.. image:: ./static/images/checkFormat_workflowPositionImage.png
+:width: 600
+    
+    
+    
+-----------
+Input files
+-----------
+ 
++----------------------------+---------+
+| Parameter : num + label    |  Format |
++============================+=========+
+| 1 : Data matrix file       | tabular |
++----------------------------+---------+
+| 2 : Sample metadata file   | tabular |
++----------------------------+---------+
+| 3 : Variable metadata file | tabular |
++----------------------------+---------+
+    
+|
+| **Required formats for the dataMatrix, sampleMetadata, and variableMetadata files are**
+| **described in the HowTo entitled 'Format Data For Postprocessing' available on the**
+| **main page of Workflow4Metabolomics.org**
+|
+    
+------------
+Output files
+------------
+    
+information.txt
+| Text file with all messages when error(s) in formats are detected
+|
+    
+---------------------------------------------------
+    
+---------------
+Working example
+---------------
+    
+.. class:: infomark
+  
+See the **W4M00001a_sacurine-subset-statistics**, **W4M00001b_sacurine-complete**, **W4M00002_mtbls2**, or **W4M00003_diaplasma** shared histories in the **Shared Data/Published Histories** menu (https://galaxy.workflow4metabolomics.org/history/list_published)
+    
+---------------------------------------------------
+    
+----
+NEWS
+----
+
+CHANGES IN VERSION 2.0.4
+========================
+
+INTERNAL MODIFICATIONS
+
+Minor internal modifications
+    
+CHANGES IN VERSION 2.0.2
+========================
+    
+INTERNAL MODIFICATIONS
+    
+Test for R code
+Planemo running validation
+Planemo installing validation
+Travis automated testing
+Toolshed export
+    
+  </help>
+  
+  <citations>
+    <citation type="bibtex">@Article{Thevenot2015,
+    Title                    = {Analysis of the human adult urinary metabolome variations with age, body mass index and gender by implementing a comprehensive workflow for univariate and OPLS statistical analyses},
+    Author                   = {Thévenot, Etienne A. and Roux, Aurélie and Xu, Ying and Ezan, Eric and Junot, Christophe},
+    Journal                  = {Journal of Proteome Research},
+    Year                     = {2015},
+    Note                     = {PMID: 26088811},
+    Number                   = {8},
+    Pages                    = {3322-3335},
+    Volume                   = {14},
+    
+    Doi                      = {10.1021/acs.jproteome.5b00354},
+    Url                      = {http://pubs.acs.org/doi/full/10.1021/acs.jproteome.5b00354}
+    }</citation>
+    <citation type="doi">10.1093/bioinformatics/btu813</citation>
+  </citations>
+
+
+  
+  ---------------
+  Working example
+  ---------------
+  
+  
+  Input files
+  ===========
+  
+  | **To generate the "dataMatrix", "sampleMetadata" and "variableMetadata" files:**
+  |   **1) copy/paste the values below in three distinct .txt files**
+  |   **2) use the "Get Data" / "Upload File" in the "Tools" (left) panel from the Galaxy / ABiMS page by choosing:**
+  |     **a) File Format: 'tabular'**
+  |     **b) Convert spaces to tabs: 'Yes'**
+  | 
+  
+  **dataMatrix file**::
+  
+  dataMatrix HU_017 HU_021 HU_027 HU_032 HU_041 HU_048 HU_049 HU_050 HU_052 HU_059 HU_060 HU_066 HU_072 HU_077 HU_090 HU_109 HU_110 HU_125 HU_126 HU_131 HU_134 HU_149 HU_150 HU_173 HU_179 HU_180 HU_182 HU_202 HU_204 HU_209
+  HMDB01032 2569204.92420381 6222035.77434915 17070707.9912636 1258838.24348419 13039543.0754619 1909391.77026598 3495.09386434063 2293521.90928998 128503.275117713 81872.5276382213 8103557.56578035 149574887.036181 1544036.41049333 7103429.53933206 14138796.50382 4970265.57952158 263054.73056162 1671332.30008058 88433.1944958815 23602331.2894815 18648126.5206986 1554657.98756878 34152.3646391152 209372.71275317 33187733.370626 202438.591636003 13581070.0886437 354170.810678102 9120781.48986975 43419175.4051586
+  HMDB03072 3628416.30251025 65626.9834353751 112170.118946651 3261804.34422417 42228.2787747563 343254.201250707 1958217.69317664 11983270.0435677 5932111.41638028 5511385.83359531 9154521.47755199 2632133.21209418 9500411.14556502 6551644.51726592 7204319.80891836 1273412.04795188 3260583.81592376 8932005.5351622 8340827.52597275 9256460.69197759 11217839.169041 5919262.81433556 11790077.0657915 9567977.80797097 73717.5811684739 9991787.29074293 4208098.14739633 623970.649925847 10904221.2642849 2171793.93621067
+  HMDB00792 429568.609438384 3887629.50527037 1330692.11658995 1367446.73023821 844197.447472453 2948090.71886592 1614157.90566884 3740009.19379795 3292251.66531919 2310688.79492013 4404239.59008605 3043289.12780863 825736.467181043 2523241.91730649 6030501.02648005 474901.604069803 2885792.42617652 2955990.64049134 1917716.3427982 1767962.67737699 5926203.40397675 1639065.69474684 346810.763557826 1054776.22313737 2390258.27543894 1831346.37315857 1026696.36904362 7079792.50047866 4368341.01359769 3495986.87280275
+  
+  
+  **sampleMetadata file**::
+  
+  sampleMetadata age ageGrp
+  HU_017 41 experienced
+  HU_021 34 junior
+  HU_027 37 experienced
+  HU_032 38 experienced
+  HU_041 28 junior
+  HU_048 39 experienced
+  HU_049 50 senior
+  HU_050 30 junior
+  HU_052 51 senior
+  HU_059 81 senior
+  HU_060 55 senior
+  HU_066 25 junior
+  HU_072 47 experienced
+  HU_077 27 junior
+  HU_091 46 experienced
+  HU_109 32 junior
+  HU_110 50 senior
+  HU_125 58 senior
+  HU_126 45 experienced
+  HU_131 42 experienced
+  HU_134 48 experienced
+  HU_149 35 experienced
+  HU_150 49 experienced
+  HU_173 55 senior
+  HU_179 33 junior
+  HU_180 53 senior
+  HU_182 43 experienced
+  HU_202 42 experienced
+  HU_204 31 junior
+  HU_209 17.5 junior
+  
+  
+  **variableMetadata file**::
+  
+  variableMetadata name
+  HMDB01032        Dehydroepiandrosterone sulfate
+  HMDB03072        Quinic acid
+  HMDB00792        Sebacic acid
+
+  
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/checkformat_script.R	Sat Aug 06 11:54:28 2016 -0400
@@ -0,0 +1,186 @@
+## Etienne Thevenot
+## CEA, MetaboHUB Paris
+## etienne.thevenot@cea.fr
+
+
+## Reads the dataMatrix, sampleMetadata, and variableMetadata .tsv files
+## and checks the formats
+readAndCheckF <- function(datFilC="dataMatrix.tsv",
+                          samFilC="sampleMetadata.tsv",
+                          varFilC="variableMetadata.tsv") {
+
+    ## options
+
+    optStrAsFacL <- options()[["stringsAsFactors"]]
+    options(stringsAsFactors = FALSE)
+
+    ## checking that the tables have no duplicated row or column names
+
+    for(tabC in c("dat", "sam", "var")) {
+
+        tabNamC <- switch(tabC, dat="dataMatrix", sam="sampleMetadata", var="variableMetadata")
+
+        rowVc <- read.table(eval(parse(text=paste0(tabC, "FilC"))),
+                            check.names = FALSE,
+                            header = TRUE,
+                            sep = "\t")[, 1]
+
+        colVc <- unlist(read.table(eval(parse(text=paste0(tabC, "FilC"))),
+                                   check.names = FALSE,
+                                   nrow=1,
+                                   sep = "\t"))[-1]
+
+        if(any(duplicated(rowVc)))
+            stop("The following row name(s) is/are duplicated in the ",
+                 tabNamC,
+                 " table: '",
+                 paste(rowVc[duplicated(rowVc)], collapse="', '"), "'",
+                 call.=FALSE)
+
+        if(any(duplicated(colVc)))
+            stop("The following column name(s) is/are duplicated in the ",
+                 tabNamC,
+                 " table: '",
+                 paste(colVc[duplicated(colVc)], collapse="', '"), "'",
+                 call.=FALSE)
+
+        rowMakVc <- make.names(rowVc, unique = TRUE)
+
+        rowDifVl <- rowVc != rowMakVc
+
+        if(any(rowDifVl)) {
+            rowDifDF <- data.frame(row = 1:length(rowVc),
+                                   actual = rowVc,
+                                   preferred = rowMakVc)
+            rowDifDF <- rowDifDF[rowDifVl, , drop = FALSE]
+            cat("\n\nWarning: The following row names of the ",
+                tabNamC,
+                " table are not in the standard R format, which may result in errors when loading the data in some of the W4M modules:\n", sep="")
+            print(rowDifDF)
+        }
+
+        colMakVc <- make.names(colVc, unique = TRUE)
+
+        colDifVl <- colVc != colMakVc
+
+        if(any(colDifVl)) {
+            colDifDF <- data.frame(col = 1:length(colVc),
+                                   actual = colVc,
+                                   preferred = colMakVc)
+            colDifDF <- colDifDF[colDifVl, , drop = FALSE]
+            cat("\n\nWarning: The following column names of the ",
+                tabNamC,
+                " table are not in the standard R format, which may result in errors when loading the data in some of the W4M modules:\n", sep="")
+            print(colDifDF)
+        }
+    }
+
+    ## reading tables
+
+    datMN <- t(as.matrix(read.table(datFilC,
+                                    check.names = FALSE,
+                                    header = TRUE,
+                                    row.names = 1,
+                                    sep = "\t")))
+
+    samDF <- read.table(samFilC,
+                        check.names = FALSE,
+                        header = TRUE,
+                        row.names = 1,
+                        sep = "\t")
+
+    varDF <- read.table(varFilC,
+                        check.names = FALSE,
+                        header = TRUE,
+                        row.names = 1,
+                        sep = "\t")
+
+    ## checking formats
+
+    chkL <- TRUE
+
+    if(!identical(rownames(datMN), rownames(samDF))) {
+        ## checking sample names
+
+        chkL <- FALSE
+
+        datSamDifVc <- setdiff(rownames(datMN), rownames(samDF))
+
+        if(length(datSamDifVc)) {
+            cat("\nThe following samples were found in the dataMatrix column names but not in the sampleMetadata row names:\n", sep="")
+            print(cbind.data.frame(col = as.numeric(sapply(datSamDifVc, function(samC) which(rownames(datMN) == samC))),
+                                   name = datSamDifVc))
+        }
+
+        samDatDifVc <- setdiff(rownames(samDF), rownames(datMN))
+
+        if(length(samDatDifVc)) {
+            cat("\n\nThe following samples were found in the sampleMetadata row names but not in the dataMatrix column names:\n", sep="")
+            print(cbind.data.frame(row = as.numeric(sapply(samDatDifVc, function(samC) which(rownames(samDF) == samC))),
+                                   name = samDatDifVc))
+        }
+
+        if(nrow(datMN) != nrow(samDF)) {
+            cat("\n\nThe dataMatrix has ", nrow(datMN), " columns (ie samples) whereas the sampleMetadata has ", nrow(samDF), " rows\n", sep="")
+        } else if(identical(gsub("^X", "", rownames(datMN)), rownames(samDF))) {
+            cat("\n\nThe dataMatrix column names start with an 'X' but not the sampleMetadata row names\n", sep="")
+        } else if(identical(gsub("^X", "", rownames(samDF)), rownames(datMN))) {
+            cat("\n\nThe sampleMetadata row names start with an 'X' but not the dataMatrix column names\n", sep="")
+        } else if(identical(sort(rownames(datMN)), sort(rownames(samDF)))) {
+            cat("\n\nThe dataMatrix column names and the sampleMetadata row names are not in the same order:\n", sep="")
+            print(cbind.data.frame(indice = 1:nrow(datMN),
+                                   dataMatrix_columnnames=rownames(datMN),
+                                   sampleMetadata_rownames=rownames(samDF))[rownames(datMN) != rownames(samDF), , drop = FALSE])
+        } else {
+            cat("\n\nThe dataMatrix column names and the sampleMetadata row names are not identical:\n", sep="")
+            print(cbind.data.frame(indice = 1:nrow(datMN),
+                                   dataMatrix_columnnames=rownames(datMN),
+                                   sampleMetadata_rownames=rownames(samDF))[rownames(datMN) != rownames(samDF), , drop = FALSE])
+        }
+
+    }
+
+    if(!identical(colnames(datMN), rownames(varDF))) {
+        ## checking variable names
+
+        chkL <- FALSE
+
+        datVarDifVc <- setdiff(colnames(datMN), rownames(varDF))
+
+        if(length(datVarDifVc)) {
+            cat("\nThe following variables were found in the dataMatrix row names but not in the variableMetadata row names:\n", sep="")
+            print(cbind.data.frame(row = as.numeric(sapply(datVarDifVc, function(varC) which(colnames(datMN) == varC))),
+                        name = datVarDifVc))
+
+        }
+
+        varDatDifVc <- setdiff(rownames(varDF), colnames(datMN))
+
+        if(length(varDatDifVc)) {
+            cat("\n\nThe following variables were found in the variableMetadata row names but not in the dataMatrix row names:\n", sep="")
+            print(cbind.data.frame(row = as.numeric(sapply(varDatDifVc, function(varC) which(rownames(varDF) == varC))),
+                        name = varDatDifVc))
+        }
+
+        if(ncol(datMN) != nrow(varDF)) {
+            cat("\n\nThe dataMatrix has ", nrow(datMN), " rows (ie variables) whereas the variableMetadata has ", nrow(varDF), " rows\n", sep="")
+        } else if(identical(sort(colnames(datMN)), sort(rownames(varDF)))) {
+            cat("\n\nThe dataMatrix row names and the variableMetadata row names are not in the same order:\n", sep="")
+            print(cbind.data.frame(row = 1:ncol(datMN),
+                                   dataMatrix_rownames=colnames(datMN),
+                                   variableMetadata_rownames=rownames(varDF))[colnames(datMN) != rownames(varDF), , drop = FALSE])
+        } else {
+            cat("\n\nThe dataMatrix row names and the variableMetadata row names are not identical:\n", sep="")
+            print(cbind.data.frame(row = 1:ncol(datMN),
+                                   dataMatrix_rownames=colnames(datMN),
+                                   variableMetadata_rownames=rownames(varDF))[colnames(datMN) != rownames(varDF), , drop = FALSE])
+        }
+    }
+
+    options(stringsAsFactors=optStrAsFacL)
+
+    resLs <- list(chkL=chkL)
+
+    return(resLs)
+
+} ## end of checkAndReadF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/checkformat_wrapper.R	Sat Aug 06 11:54:28 2016 -0400
@@ -0,0 +1,77 @@
+#!/usr/bin/env Rscript
+
+library(batch) ## parseCommandArgs
+
+source_local <- function(fname){
+    argv <- commandArgs(trailingOnly = FALSE)
+    base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
+    source(paste(base_dir, fname, sep="/"))
+}
+
+source_local("checkformat_script.R")
+
+argVc <- unlist(parseCommandArgs(evaluate = FALSE))
+
+
+##------------------------------
+## Initializing
+##------------------------------
+
+## options
+##--------
+
+strAsFacL <- options()$stringsAsFactors
+options(stringsAsFactors = FALSE)
+
+## constants
+##----------
+
+modNamC <- "Check Format" ## module name
+
+## log file
+##---------
+
+sink(argVc["information"])
+
+cat("\nStart of the '", modNamC, "' Galaxy module call: ",
+    format(Sys.time(), "%a %d %b %Y %X"), "\n", sep="")
+
+
+##------------------------------
+## Computation
+##------------------------------
+
+
+resLs <- readAndCheckF(argVc["dataMatrix_in"],
+                       argVc["sampleMetadata_in"],
+                       argVc["variableMetadata_in"])
+chkL <- resLs[["chkL"]]
+
+
+##------------------------------
+## Ending
+##------------------------------
+
+
+if(chkL) {
+
+    cat("\nTable formats are OK; enjoy your analyses!\n", sep="")
+
+    cat("\nEnd of the '", modNamC, "' Galaxy module call: ",
+        format(Sys.time(), "%a %d %b %Y %X"), "\n", sep="")
+
+    sink()
+
+} else {
+
+    sink()
+    stop("Please check the generated 'information' file")
+
+}
+
+## closing
+##--------
+
+options(stringsAsFactors = strAsFacL)
+
+rm(list = ls())
--- a/information.txt	Sat Jul 30 12:06:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-
-Start of the 'Check Format' Galaxy module call: Sat 30 Jul 2016 07:21:35 AM
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/.Rhistory	Sat Aug 06 11:54:28 2016 -0400
@@ -0,0 +1,1 @@
+q("no")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/checkformat_runtests.R	Sat Aug 06 11:54:28 2016 -0400
@@ -0,0 +1,101 @@
+#!/usr/bin/env Rscript
+
+## Package
+##--------
+
+library(RUnit)
+
+## Constants
+##----------
+
+testOutDirC <- "output"
+argVc <- commandArgs(trailingOnly = FALSE)
+scriptPathC <- sub("--file=", "", argVc[grep("--file=", argVc)])
+
+
+## Functions
+##-----------
+
+## Reading tables (matrix or data frame)
+readTableF <- function(fileC, typeC = c("matrix", "dataframe")[1]) {
+
+    	file.exists(fileC) || stop(paste0("No output file \"", fileC ,"\"."))
+
+        switch(typeC,
+               matrix = return(t(as.matrix(read.table(file = fileC,
+                   header = TRUE,
+                   row.names = 1,
+                   sep = "\t",
+                   stringsAsFactors = FALSE)))),
+               dataframe = return(read.table(file = fileC,
+                   header = TRUE,
+                   row.names = 1,
+                   sep = "\t",
+                   stringsAsFactors = FALSE)))
+
+}
+
+## Call wrapper
+wrapperCallF <- function(paramLs) {
+
+	## Set program path
+    	wrapperPathC <- file.path(dirname(scriptPathC), "..", "checkformat_wrapper.R")
+
+	## Set arguments
+	argLs <- NULL
+	for (parC in names(paramLs))
+		argLs <- c(argLs, parC, paramLs[[parC]])
+
+	## Call
+	wrapperCallC <- paste(c(wrapperPathC, argLs), collapse = " ")
+
+        if(.Platform$OS.type == "windows")
+            wrapperCallC <- paste("Rscript", wrapperCallC)
+
+	wrapperCodeN <- system(wrapperCallC)
+
+	if (wrapperCodeN != 0)
+		stop("Error when running checkformat_wrapper.R.")
+
+	## Get output
+	outLs <- list()
+	if ("dataMatrix_out" %in% names(paramLs))
+            outLs[["datMN"]] <- readTableF(paramLs[["dataMatrix_out"]], "matrix")
+	if ("sampleMetadata_out" %in% names(paramLs))
+            outLs[["samDF"]] <- readTableF(paramLs[["sampleMetadata_out"]], "dataframe")
+	if ("variableMetadata_out" %in% names(paramLs))
+            outLs[["varDF"]] <- readTableF(paramLs[["variableMetadata_out"]], "dataframe")
+        if("information" %in% names(paramLs))
+            outLs[["infVc"]] <- readLines(paramLs[["information"]])
+
+	return(outLs)
+}
+
+## Setting default parameters
+defaultArgF <- function(testInDirC) {
+
+    defaultArgLs <- list()
+    if(file.exists(file.path(dirname(scriptPathC), testInDirC, "dataMatrix.tsv")))
+        defaultArgLs[["dataMatrix_in"]] <- file.path(dirname(scriptPathC), testInDirC, "dataMatrix.tsv")
+    if(file.exists(file.path(dirname(scriptPathC), testInDirC, "sampleMetadata.tsv")))
+        defaultArgLs[["sampleMetadata_in"]] <- file.path(dirname(scriptPathC), testInDirC, "sampleMetadata.tsv")
+    if(file.exists(file.path(dirname(scriptPathC), testInDirC, "variableMetadata.tsv")))
+        defaultArgLs[["variableMetadata_in"]] <- file.path(dirname(scriptPathC), testInDirC, "variableMetadata.tsv")
+
+    defaultArgLs[["information"]] <- file.path(dirname(scriptPathC), testOutDirC, "information.txt")
+
+    defaultArgLs
+
+}
+
+## Main
+##-----
+
+## Create output folder
+file.exists(testOutDirC) || dir.create(testOutDirC)
+
+## Run tests
+test.suite <- defineTestSuite('tests', dirname(scriptPathC), testFileRegexp = paste0('^.*_tests\\.R$'), testFuncRegexp = '^.*$')
+isValidTestSuite(test.suite)
+test.results <- runTestSuite(test.suite)
+print(test.results)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/checkformat_tests.R	Sat Aug 06 11:54:28 2016 -0400
@@ -0,0 +1,11 @@
+test_input_default <- function() {
+
+    testDirC <- "input"
+    argLs <- list()
+
+    argLs <- c(defaultArgF(testDirC), argLs)
+    outLs <- wrapperCallF(argLs)
+
+    checkEquals(outLs[['infVc']][4], 'Table formats are OK; enjoy your analyses!')
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/input/dataMatrix.tsv	Sat Aug 06 11:54:28 2016 -0400
@@ -0,0 +1,4 @@
+dataMatrix	HU_017	HU_021	HU_027	HU_032	HU_041	HU_048	HU_049	HU_050	HU_052	HU_059	HU_060	HU_066	HU_072	HU_077	HU_090	HU_109	HU_110	HU_125	HU_126	HU_131	HU_134	HU_149	HU_150	HU_173	HU_179	HU_180	HU_182	HU_202	HU_204	HU_209
+HMDB01032	2569204.924	6222035.774	17070707.99	1258838.243	13039543.08	1909391.77	3495.093864	2293521.909	128503.2751	81872.52764	8103557.566	149574887	1544036.41	7103429.539	14138796.5	4970265.58	263054.7306	1671332.3	88433.1945	23602331.29	18648126.52	1554657.988	34152.36464	209372.7128	33187733.37	202438.5916	13581070.09	354170.8107	9120781.49	43419175.41
+HMDB03072	3628416.303	65626.98344	112170.1189	3261804.344	42228.27877	343254.2013	1958217.693	11983270.04	5932111.416	5511385.834	9154521.478	2632133.212	9500411.146	6551644.517	7204319.809	1273412.048	3260583.816	8932005.535	8340827.526	9256460.692	11217839.17	5919262.814	11790077.07	9567977.808	73717.58117	9991787.291	4208098.147	623970.6499	10904221.26	2171793.936
+HMDB00792	429568.6094	3887629.505	1330692.117	1367446.73	844197.4475	2948090.719	1614157.906	3740009.194	3292251.665	2310688.795	4404239.59	3043289.128	825736.4672	2523241.917	6030501.026	474901.6041	2885792.426	2955990.64	1917716.343	1767962.677	5926203.404	1639065.695	346810.7636	1054776.223	2390258.275	1831346.373	1026696.369	7079792.5	4368341.014	3495986.873
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/input/sampleMetadata.tsv	Sat Aug 06 11:54:28 2016 -0400
@@ -0,0 +1,31 @@
+sampleMetadata	age	ageGrp
+HU_017	41	experienced
+HU_021	34	junior
+HU_027	37	experienced
+HU_032	38	experienced
+HU_041	28	junior
+HU_048	39	experienced
+HU_049	50	senior
+HU_050	30	junior
+HU_052	51	senior
+HU_059	81	senior
+HU_060	55	senior
+HU_066	25	junior
+HU_072	47	experienced
+HU_077	27	junior
+HU_090	46	experienced
+HU_109	32	junior
+HU_110	50	senior
+HU_125	58	senior
+HU_126	45	experienced
+HU_131	42	experienced
+HU_134	48	experienced
+HU_149	35	experienced
+HU_150	49	experienced
+HU_173	55	senior
+HU_179	33	junior
+HU_180	53	senior
+HU_182	43	experienced
+HU_202	42	experienced
+HU_204	31	junior
+HU_209	17.5	junior
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/input/variableMetadata.tsv	Sat Aug 06 11:54:28 2016 -0400
@@ -0,0 +1,4 @@
+variableMetadata	name
+HMDB01032	Dehydroepiandrosterone sulfate
+HMDB03072	Quinic acid
+HMDB00792	Sebacic acid
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/output/information.txt	Sat Aug 06 11:54:28 2016 -0400
@@ -0,0 +1,6 @@
+
+Start of the 'Check Format' Galaxy module call: Thu 04 Aug 2016 09:29:19 PM
+
+Table formats are OK; enjoy your analyses!
+
+End of the 'Check Format' Galaxy module call: Thu 04 Aug 2016 09:29:19 PM
--- a/tests/.Rhistory	Sat Jul 30 12:06:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-q("no")
--- a/tests/checkFormat_tests.R	Sat Jul 30 12:06:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-#!/usr/bin/env Rscript
-
-## Package
-##--------
-
-library(RUnit)
-
-## Constants
-##----------
-
-tesOutDirC <- "output"
-
-## Functions
-##-----------
-
-## Reading tables (matrix or data frame)
-reaTabF <- function(filC, typC = c("matrix", "dataframe")[1]) {
-
-    	file.exists(filC) || stop(paste0("No output file \"", filC ,"\"."))
-
-        switch(typC,
-               matrix = return(t(as.matrix(read.table(file = filC,
-                   header = TRUE,
-                   row.names = 1,
-                   sep = "\t",
-                   stringsAsFactors = FALSE)))),
-               dataframe = return(read.table(file = filC,
-                   header = TRUE,
-                   row.names = 1,
-                   sep = "\t",
-                   stringsAsFactors = FALSE)))
-
-}
-
-## Call wrapper
-wrpCalF <- function(parLs) {
-
-	## Set program path
-    	wrpPatC <- file.path("..", "checkFormat_wrapper.R")
-
-	## Set arguments
-	argLs <- NULL
-	for (parC in names(parLs))
-		argLs <- c(argLs, parC, parLs[[parC]])
-
-	## Call
-	wrpCalC <- paste(c(wrpPatC, argLs), collapse = " ")
-
-        if(.Platform$OS.type == "windows")
-            wrpCalC <- paste("Rscript", wrpCalC)
-
-	wrpCodN <- system(wrpCalC)
-
-	if (wrpCodN != 0)
-		stop("Error when running checkFormat_wrapper.R.")
-
-	## Get output
-	outLs <- list()
-	if ("dataMatrix_out" %in% names(parLs))
-            outLs[["datMN"]] <- reaTabF(parLs[["dataMatrix_out"]], "matrix")
-	if ("sampleMetadata_out" %in% names(parLs))
-            outLs[["samDF"]] <- reaTabF(parLs[["sampleMetadata_out"]], "dataframe")
-	if ("variableMetadata_out" %in% names(parLs))
-            outLs[["varDF"]] <- reaTabF(parLs[["variableMetadata_out"]], "dataframe")
-        if("information" %in% names(parLs))
-            outLs[["infVc"]] <- readLines(parLs[["information"]])
-
-	return(outLs)
-}
-
-## Setting default parameters
-argDefF <- function(tesC) {
-
-    tesInpDirC <- unlist(strsplit(tesC, "_"))[1]
-
-    argDefLs <- list()
-    if(file.exists(file.path(tesInpDirC, "dataMatrix.tsv")))
-        argDefLs[["dataMatrix_in"]] <- file.path(tesInpDirC, "dataMatrix.tsv")
-    if(file.exists(file.path(tesInpDirC, "sampleMetadata.tsv")))
-        argDefLs[["sampleMetadata_in"]] <- file.path(tesInpDirC, "sampleMetadata.tsv")
-    if(file.exists(file.path(tesInpDirC, "variableMetadata.tsv")))
-        argDefLs[["variableMetadata_in"]] <- file.path(tesInpDirC, "variableMetadata.tsv")
-    if(file.exists(file.path(tesOutDirC, "dataMatrix.tsv")))
-        argDefLs[["dataMatrix_out"]] <- file.path(tesOutDirC, "dataMatrix.tsv")
-    if(file.exists(file.path(tesOutDirC, "sampleMetadata.tsv")))
-        argDefLs[["sampleMetadata_out"]] <- file.path(tesOutDirC, "sampleMetadata.tsv")
-    if(file.exists(file.path(tesOutDirC, "variableMetadata.tsv")))
-        argDefLs[["variableMetadata_out"]] <- file.path(tesOutDirC, "variableMetadata.tsv")
-
-    ## argDefLs[["figure"]] <- file.path(tesOutDirC, "figure.pdf")
-    argDefLs[["information"]] <- file.path(tesOutDirC, "information.txt")
-
-    argDefLs
-
-}
-
-## Main
-##-----
-
-## Create output folder
-
-file.exists(tesOutDirC) || dir.create(tesOutDirC)
-
-test_input_default <- function() {
-
-    tesC <- "input_default"
-    chkC <- "checkEquals(outLs[['infVc']][4], 'Table formats are OK; enjoy your analyses!')"
-
-    argLs <- argDefF(tesC = tesC)
-    outLs <- wrpCalF(argLs)
-    stopifnot(eval(parse(text = chkC)))
-
-}
-
-
-
--- a/tests/input/dataMatrix.tsv	Sat Jul 30 12:06:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-dataMatrix	HU_017	HU_021	HU_027	HU_032	HU_041	HU_048	HU_049	HU_050	HU_052	HU_059	HU_060	HU_066	HU_072	HU_077	HU_090	HU_109	HU_110	HU_125	HU_126	HU_131	HU_134	HU_149	HU_150	HU_173	HU_179	HU_180	HU_182	HU_202	HU_204	HU_209
-HMDB01032	2569204.924	6222035.774	17070707.99	1258838.243	13039543.08	1909391.77	3495.093864	2293521.909	128503.2751	81872.52764	8103557.566	149574887	1544036.41	7103429.539	14138796.5	4970265.58	263054.7306	1671332.3	88433.1945	23602331.29	18648126.52	1554657.988	34152.36464	209372.7128	33187733.37	202438.5916	13581070.09	354170.8107	9120781.49	43419175.41
-HMDB03072	3628416.303	65626.98344	112170.1189	3261804.344	42228.27877	343254.2013	1958217.693	11983270.04	5932111.416	5511385.834	9154521.478	2632133.212	9500411.146	6551644.517	7204319.809	1273412.048	3260583.816	8932005.535	8340827.526	9256460.692	11217839.17	5919262.814	11790077.07	9567977.808	73717.58117	9991787.291	4208098.147	623970.6499	10904221.26	2171793.936
-HMDB00792	429568.6094	3887629.505	1330692.117	1367446.73	844197.4475	2948090.719	1614157.906	3740009.194	3292251.665	2310688.795	4404239.59	3043289.128	825736.4672	2523241.917	6030501.026	474901.6041	2885792.426	2955990.64	1917716.343	1767962.677	5926203.404	1639065.695	346810.7636	1054776.223	2390258.275	1831346.373	1026696.369	7079792.5	4368341.014	3495986.873
--- a/tests/input/sampleMetadata.tsv	Sat Jul 30 12:06:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-sampleMetadata	age	ageGrp
-HU_017	41	experienced
-HU_021	34	junior
-HU_027	37	experienced
-HU_032	38	experienced
-HU_041	28	junior
-HU_048	39	experienced
-HU_049	50	senior
-HU_050	30	junior
-HU_052	51	senior
-HU_059	81	senior
-HU_060	55	senior
-HU_066	25	junior
-HU_072	47	experienced
-HU_077	27	junior
-HU_090	46	experienced
-HU_109	32	junior
-HU_110	50	senior
-HU_125	58	senior
-HU_126	45	experienced
-HU_131	42	experienced
-HU_134	48	experienced
-HU_149	35	experienced
-HU_150	49	experienced
-HU_173	55	senior
-HU_179	33	junior
-HU_180	53	senior
-HU_182	43	experienced
-HU_202	42	experienced
-HU_204	31	junior
-HU_209	17.5	junior
--- a/tests/input/variableMetadata.tsv	Sat Jul 30 12:06:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-variableMetadata	name
-HMDB01032	Dehydroepiandrosterone sulfate
-HMDB03072	Quinic acid
-HMDB00792	Sebacic acid
--- a/tests/output/information.txt	Sat Jul 30 12:06:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-
-Start of the 'Check Format' Galaxy module call: Sat 30 Jul 2016 07:49:51 AM
-
-Table formats are OK; enjoy your analyses!
-
-End of the 'Check Format' Galaxy module call: Sat 30 Jul 2016 07:49:51 AM