changeset 3:80a38d36f946 draft

planemo upload for repository https://github.com/workflow4metabolomics/checkformat.git commit 5cf3f6eb62c1396ade1b068a3dd3cc2e3f827e15
author ethevenot
date Thu, 11 Jan 2018 10:24:56 -0500
parents b6a6b4cc932a
children 9590fac86f63
files README.md checkformat_config.xml checkformat_script.R checkformat_wrapper.R runit/checkformat_runtests.R runit/checkformat_tests.R runit/datSamFls/dataMatrix.tsv runit/datSamFls/sampleMetadata.tsv runit/datSamFls/variableMetadata.tsv runit/datSamFlsInv/dataMatrix.tsv runit/datSamFlsInv/sampleMetadata.tsv runit/datSamFlsInv/variableMetadata.tsv runit/datSamInv/dataMatrix.tsv runit/datSamInv/sampleMetadata.tsv runit/datSamInv/variableMetadata.tsv runit/datVarFls/dataMatrix.tsv runit/datVarFls/sampleMetadata.tsv runit/datVarFls/variableMetadata.tsv runit/datVarInv/dataMatrix.tsv runit/datVarInv/sampleMetadata.tsv runit/datVarInv/variableMetadata.tsv runit/output/dataMatrix.tsv runit/output/information.txt runit/output/sampleMetadata.tsv runit/output/variableMetadata.tsv static/images/checkFormat_workflowPositionImage.png test-data/output-dataMatrix.tsv test-data/output-information.txt
diffstat 28 files changed, 816 insertions(+), 248 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Tue Jun 06 11:51:33 2017 -0400
+++ b/README.md	Thu Jan 11 10:24:56 2018 -0500
@@ -1,5 +1,5 @@
-Checking the formats of the dataMatrix, sampleMetadata, and variableMetadata files  
-==================================================================================
+Checking/formatting the sample and variable names of the dataMatrix, sampleMetadata, and variableMetadata files  
+===============================================================================================================  
 
 A Galaxy module from the [Workflow4metabolomics](http://workflow4metabolomics.org) infrastructure  
 
@@ -7,8 +7,8 @@
 
 ### Description
 
-**Version:** 2.0.4  
-**Date:** 2016-07-29  
+**Version:** 3.0.0  
+**Date:** 2018-01-10  
 **Author:** Etienne A. Thevenot (CEA, LIST, MetaboHUB, W4M Core Development Team)   
 **Email:** [etienne.thevenot(at)cea.fr](mailto:etienne.thevenot@cea.fr)  
 **Citation:** Thevenot E.A., Roux A., Xu Y., Ezan E. and Junot C. (2015). 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. *Journal of Proteome Research*, **14**:3322-3335. [doi:10.1021/acs.jproteome.5b00354](http://dx.doi.org/10.1021/acs.jproteome.5b00354)  
@@ -45,6 +45,16 @@
 
 ### News
 
+##### CHANGES IN VERSION 3.0.0  
+
+NEW FEATURES  
+
+ * Automated re-ordering (if necessary) of sample and/or variable names from dataMatrix based on sampleMetadata and variableMetadata  
+
+ * New argument to make sample and variable names syntactically valid  
+
+ * Output of dataMatrix, sampleMetadata, and variableMetadata files, whether they have been modified or not  
+  
 ##### CHANGES IN VERSION 2.0.4 
 
 INTERNAL MODIFICATION  
--- a/checkformat_config.xml	Tue Jun 06 11:51:33 2017 -0400
+++ b/checkformat_config.xml	Thu Jan 11 10:24:56 2018 -0500
@@ -1,5 +1,5 @@
-<tool id="checkFormat" name="Check Format" version="2.0.4">
-  <description>Checks the formats of the dataMatrix, sampleMetadata, and variableMetadata files</description>
+<tool id="checkFormat" name="Check Format" version="3.0.0">
+  <description>Checking/formatting the sample and variable names of the dataMatrix, sampleMetadata, and variableMetadata files</description>
   
   <requirements>
     <requirement type="package">r-batch</requirement>
@@ -14,7 +14,11 @@
   dataMatrix_in "$dataMatrix_in"
   sampleMetadata_in "$sampleMetadata_in"
   variableMetadata_in "$variableMetadata_in"
-  
+  makeNameL "$makeNameL"
+
+  dataMatrix_out "$dataMatrix_out"
+  sampleMetadata_out "$sampleMetadata_out"
+  variableMetadata_out "$variableMetadata_out"
   information "$information"
   ]]></command>    
   
@@ -22,9 +26,16 @@
     <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" />
+    <param name="makeNameL" label="Make syntactically valid sample and variable names" type="select" help="">
+      <option value="TRUE">yes</option>
+      <option value="FALSE" selected="true">no</option>
+    </param>
   </inputs>
   
   <outputs>
+    <data name="dataMatrix_out" label="${tool.name}_${dataMatrix_in.name}" format="tabular" ></data>
+    <data name="sampleMetadata_out" label="${tool.name}_${sampleMetadata_in.name}" format="tabular" ></data>
+    <data name="variableMetadata_out" label="${tool.name}_${variableMetadata_in.name}" format="tabular" ></data>
     <data name="information" label="${tool.name}_information.txt" format="txt"/>
   </outputs>
   
@@ -33,11 +44,17 @@
       <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"/>  
+      <param name="makeNameL" value="TRUE"/>
+      <output name="information">
+        <assert_contents>
+          <has_text text="Message: Converting sample and variable names to the standard R format" />
+	  <has_text text="Warning: The sample and/or variable names or orders from the input tables have been modified" />
+        </assert_contents>
+      </output>
     </test>
   </tests>
   
-  <help>
+  <help><![CDATA[
     
 .. class:: infomark
     
@@ -53,15 +70,15 @@
     
 ---------------------------------------------------
     
-========================
+============
 Check Format
-========================
+============
     
 -----------
 Description
 -----------
     
-| Checks the format (row and column names) of the dataMatrix, sampleMetadata and variableMetadata tables
+| **Checks the format (row and column names)** of the dataMatrix, sampleMetadata and variableMetadata tables; in case of difference of orders of the samples and/or variables between (some of) the tables, the **orders from the dataMatrix are permuted** to match those of the sampleMetadata and/or the variableMetadata; sample and variables names can also be modified to be **syntactically valid** for R by selecting the corresponding argument (e.g. an 'X' is added to names starting with a digit, blanks will be converted to '.', etc.).
     
     
 -----------------
@@ -69,9 +86,7 @@
 -----------------
     
 .. image:: ./static/images/checkFormat_workflowPositionImage.png
-:width: 600
-    
-    
+
     
 -----------
 Input files
@@ -86,20 +101,49 @@
 +----------------------------+---------+
 | 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**
-|
-    
+
+| The **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 (http://web11.sb-roscoff.fr/download/w4m/howto/w4m_HowToFormatDataForPostprocessing_v02.pdf)
+
+
+----------
+Parameters
+----------
+	  
+Data matrix file
+	| variable x sample **dataMatrix** tabular separated file of the numeric data matrix, with . as decimal, and NA for missing values; the table must not contain metadata apart from row and column names; the row and column names must be identical to the rownames of the sample and variable metadata, respectively (see below)
+	|
+
+Sample metadata file
+	| sample x metadata **sampleMetadata** tabular separated file of the numeric and/or character sample metadata, with . as decimal and NA for missing values
+	|
+	
+Variable metadata file
+	| variable x metadata **variableMetadata** tabular separated file of the numeric and/or character variable metadata, with . as decimal and NA for missing values
+	|
+
+Make syntactically valid sample and variable names
+	| if set to 'yes', sample and variable names will converted to syntactically valid names with the 'make.names' R function when required (e.g. an 'X' is added to names starting with a digit, blanks will be converted to '.', etc.)
+	|
+  
 ------------
 Output files
 ------------
-    
+
+dataMatrix_out.tabular
+	| dataMatrix data file; may be identical to the input dataMatrix in case no renaming of sample/variable names nor re-ordering of samples/variables (see the 'information' file for the presence/absence of modifications)
+	|
+
+sampleMetadata_out.tabular
+	| sampleMetadata data file; may be identical to the input sampleMetadata in case no renaming of sample names nor re-ordering of samples (see the 'information' file for the presence/absence of modifications)
+	|
+
+variableMetadata_out.tabular
+	| variableMetadata data file; may be identical to the input variableMetadata in case no renaming of variable names nor re-ordering of variables (see the 'information' file for the presence/absence of modifications)
+	|
+
 information.txt
-| Text file with all messages when error(s) in formats are detected
-|
+	| Text file with all messages when error(s) in formats are detected
+	|
     
 ---------------------------------------------------
     
@@ -117,6 +161,17 @@
 NEWS
 ----
 
+CHANGES IN VERSION 3.0.0
+========================
+
+NEW FEATURES
+
+Automated re-ordering (if necessary) of sample and/or variable names from dataMatrix based on sampleMetadata and variableMetadata
+
+New argument to make sample and variable names syntactically valid
+
+Output of dataMatrix, sampleMetadata, and variableMetadata files, whether they have been modified or not
+
 CHANGES IN VERSION 2.0.4
 ========================
 
@@ -135,90 +190,13 @@
 Travis automated testing
 Toolshed export
     
-  </help>
+  ]]></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.1021/acs.jproteome.5b00354</citation>
+    <citation type="doi">10.1016/j.biocel.2017.07.002</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>
--- a/checkformat_script.R	Tue Jun 06 11:51:33 2017 -0400
+++ b/checkformat_script.R	Thu Jan 11 10:24:56 2018 -0500
@@ -3,16 +3,20 @@
 ## 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") {
+                          varFilC="variableMetadata.tsv",
+                          makNamL) {
+    
 
     ## options
 
     optStrAsFacL <- options()[["stringsAsFactors"]]
     options(stringsAsFactors = FALSE)
+    
 
     ## checking that the tables have no duplicated row or column names
 
@@ -44,36 +48,8 @@
                  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
 
@@ -94,93 +70,302 @@
                         header = TRUE,
                         row.names = 1,
                         sep = "\t")
+    
 
-    ## checking formats
+    ## checking that dataMatrix is numeric and that the sample and variable numbers are coherent
+
+    if(mode(datMN) != "numeric") {
+        stop("The dataMatrix is not of the 'numeric' type",
+             call. = FALSE)
+    }
+    
+    if(nrow(datMN) != nrow(samDF)) {
+        if(nrow(datMN) > nrow(samDF)) {
+            print(setdiff(rownames(datMN), rownames(samDF)))
+            stop("The sample names above from dataMatrix were not found in sampleMetadata")
+        } else {
+            print(setdiff(rownames(samDF), rownames(datMN)))
+            stop("The sample names above from sampleMetadata were not found in dataMatrix")
+        }
+    }
+
+    if(ncol(datMN) != nrow(varDF)) {
+        if(ncol(datMN) > nrow(varDF)) {
+            print(setdiff(colnames(datMN), rownames(varDF)))
+            stop("The variable names above from dataMatrix were not found in variableMetadata")
+        } else {
+            print(setdiff(rownames(varDF), colnames(datMN)))
+            stop("The variable names above from variableMetadata were not found in dataMatrix")
+        }
+    }
+    
+
+    ## making sample and variable names (optional)
+
+    newL <- FALSE
+
+    if(makNamL) {
+
+        cat("\n\nMessage: Converting sample and variable names to the standard R format\n")
+
+        rownames(datMN) <- make.names(rownames(datMN), unique = TRUE)
+        colnames(datMN) <- make.names(colnames(datMN), unique = TRUE)
+        rownames(samDF) <- make.names(rownames(samDF), unique = TRUE)
+        rownames(varDF) <- make.names(rownames(varDF), unique = TRUE)
+
+        newL <- TRUE
+
+    }
+    
+ 
+    ## checking sample and variable names
 
     chkL <- TRUE
 
     if(!identical(rownames(datMN), rownames(samDF))) {
-        ## checking sample names
 
-        chkL <- FALSE
-
-        datSamDifVc <- setdiff(rownames(datMN), rownames(samDF))
+        if(identical(sort(rownames(datMN)), sort(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))
+            cat("\n\nMessage: Re-ordering dataMatrix sample names to match sampleMetadata\n")
+            datMN <- datMN[rownames(samDF), , drop = FALSE]
+            
+            stopifnot(identical(sort(rownames(datMN)), sort(rownames(samDF))))
 
-        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="")
+            newL <- TRUE
+            
+        }  else {
+            
+            cat("\n\nStop: The sample names of dataMatrix and sampleMetadata do not match:\n")
             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])
+                                   dataMatrix=rownames(datMN),
+                                   sampleMetadata=rownames(samDF))[rownames(datMN) != rownames(samDF), , drop = FALSE])
+            chkL <- FALSE
+            
         }
 
     }
 
     if(!identical(colnames(datMN), rownames(varDF))) {
-        ## checking variable names
+        
+        if(identical(sort(colnames(datMN)), sort(rownames(varDF)))) {
+            
+            cat("\n\nMessage: Re-ordering dataMatrix variable names to match variableMetadata\n")
+            datMN <- datMN[, rownames(varDF), drop = FALSE]
 
-        chkL <- FALSE
-
-        datVarDifVc <- setdiff(colnames(datMN), rownames(varDF))
+            stopifnot(identical(sort(colnames(datMN)), sort(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))
-
+            newL <- TRUE
+            
+        }  else {
+            
+            cat("\n\nStop: The variable names of dataMatrix and variableMetadata do not match:\n")
+            print(cbind.data.frame(indice = 1:ncol(datMN),
+                                   dataMatrix=colnames(datMN),
+                                   variableMetadata=rownames(varDF))[colnames(datMN) != rownames(varDF), , drop = FALSE])
+            chkL <- FALSE
+            
         }
 
-        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)
+    resLs <- list(chkL=chkL,
+                  newL = newL,
+                  datMN = datMN,
+                  samDF = samDF,
+                  varDF = varDF)
 
     return(resLs)
 
 } ## end of checkAndReadF
+
+
+
+
+    ## 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])
+    ##     }
+
+    ## }
+    ##     datRowVc <- rownames(datMN)
+    ##     datRowMakVc <- make.names(datRowVc, unique = TRUE)
+    ##     if(datRowMakVc != datRowVc) {
+    ##         rownames(datMN) <- datRowMakVc
+    ##         cat("\n\nMessage: The sample names of the dataMatrix have been converted to the standard R format\n")
+    ##     }
+
+    ##     datColVc <- colnames(datMN)
+    ##     datColMakVc <- make.names(datColVc, unique = TRUE)
+    ##     if(datColMakVc != datColVc) {
+    ##         colnames(datMN) <- datColMakVc
+    ##         cat("\n\nMessage: The variable names of the dataMatrix have been converted to the standard R format\n")
+    ##     }
+
+    ##     samRowVc <- rownames(datMN)
+    ##     samRowMakVc <- make.names(samRowVc, unique = TRUE)
+    ##     if(samRowMakVc != samRowVc) {
+    ##         rownames(datMN) <- samRowMakVc
+    ##         cat("\n\nMessage: The sample names of the sampleMetadata have been converted to the standard R format\n")
+    ##     }
+
+    ##     datRowVc <- rownames(datMN)
+    ##     datRowMakVc <- make.names(datRowVc, unique = TRUE)
+    ##     if(datRowMakVc != datRowVc) {
+    ##         rownames(datMN) <- datRowMakVc
+    ##         cat("\n\nMessage: The sample names of the dataMatrix have been converted to the standard R format\n")
+    ##     }
+
+    ## }
+
+    ## checking names (optional)
+
+    
+
+
+    ## datRowMakVc <- make.names(datRowVc, unique = TRUE)
+    ## if(datRowMakVc != datRowVc) {
+    ##     if(makNamL) {
+    ##         rownames(datMN) <- datRowMakVc
+    ##         cat("\n\nMessage: The sample names of the dataMatrix have been converted to the standard R format; select the make names argument to convert them\n")
+    ##     } else {
+    ##         cat("\n\nWarning: Some of the sample names of the dataMatrix are not in the standard R format; select the make names argument to convert them\n")
+    ##     }
+
+    ## if(makNamL) {
+
+    ##     rownames(datMN) <- make.names(rownames(datMN), unique = TRUE)
+    ##     colnames(datMN) <- make.names(colnames(datMN), unique = TRUE)
+    ##     rownames(samDF) <- make.names(rownames(samDF), unique = TRUE)
+    ##     rownames(varDF) <- make.names(rownames(varDF), unique = TRUE)
+ 
+    ##     }
+        ## checking sample names
+
+    ##     if(nrow(datMN) == nrow(samDF)) {
+
+            
+            
+    ##     }
+
+    ##     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])
+    ##     }
+    ## }
+## checkF <- function(datInpMN,
+##                    samInpDF,
+##                    varInpDF) {
+
+##     mode(datInpMN) == "numeric" &&
+##         identical(rownames(datInpMN), rownames(samInpDF)) &&
+##         identical(colnames(datInpMN), rownames(varInpDF))
+    
+
+## }
--- a/checkformat_wrapper.R	Tue Jun 06 11:51:33 2017 -0400
+++ b/checkformat_wrapper.R	Thu Jan 11 10:24:56 2018 -0500
@@ -44,8 +44,8 @@
 
 resLs <- readAndCheckF(argVc["dataMatrix_in"],
                        argVc["sampleMetadata_in"],
-                       argVc["variableMetadata_in"])
-chkL <- resLs[["chkL"]]
+                       argVc["variableMetadata_in"],
+                       as.logical(argVc["makeNameL"]))
 
 
 ##------------------------------
@@ -53,51 +53,77 @@
 ##------------------------------
 
 
-if(chkL) {
+## dataMatrix
+
+datMN <- resLs[["datMN"]]
+datDF <- cbind.data.frame(dataMatrix = colnames(datMN),
+                          as.data.frame(t(datMN)))
+write.table(datDF,
+            file = argVc[["dataMatrix_out"]],
+            quote = FALSE,
+            row.names = FALSE,
+            sep = "\t")
 
-    cat("\nTable formats are OK; enjoy your analyses!\n", sep="")
+## sampleMetadata
 
-    cat("\nEnd of the '", modNamC, "' Galaxy module call: ",
-        format(Sys.time(), "%a %d %b %Y %X"), "\n", sep="")
+samDF <- resLs[["samDF"]]
+samDF <- cbind.data.frame(sampleMetadata = rownames(samDF),
+                          samDF)
+write.table(samDF,
+            file = argVc["sampleMetadata_out"],
+            quote = FALSE,
+            row.names = FALSE,
+            sep = "\t")
 
-    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()
-    
-} else {
-    
-    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")
+## variableMetadata
+
+varDF <- resLs[["varDF"]]
+varDF <- cbind.data.frame(variableMetadata = rownames(varDF),
+                          varDF)
+write.table(varDF,
+            file = argVc["variableMetadata_out"],
+            quote = FALSE,
+            row.names = FALSE,
+            sep = "\t")
 
-    sink()
-    stop("Please check the generated 'information' file")
+if(resLs[["chkL"]]) {
+
+    if(resLs[["newL"]]) {
+        
+        cat("\nWarning: The sample and/or variable names or orders from the input tables have been modified\n(see the information file for details); please use the new output tables for your analyses.\n")
+        
+    } else {
+
+        cat("\nThe input tables have a correct format and can be used for your analyses.\n")
+        
+    }
 
 }
+    
+cat("\nEnd of the '", modNamC, "' Galaxy module call: ",
+    format(Sys.time(), "%a %d %b %Y %X"), "\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()
+
+if(!resLs[["chkL"]]) {
+    stop("Please check the generated 'information' file")
+}
+
 
 ## closing
 ##--------
--- a/runit/checkformat_runtests.R	Tue Jun 06 11:51:33 2017 -0400
+++ b/runit/checkformat_runtests.R	Thu Jan 11 10:24:56 2018 -0500
@@ -82,6 +82,9 @@
     if(file.exists(file.path(dirname(scriptPathC), testInDirC, "variableMetadata.tsv")))
         defaultArgLs[["variableMetadata_in"]] <- file.path(dirname(scriptPathC), testInDirC, "variableMetadata.tsv")
 
+    defaultArgLs[["dataMatrix_out"]] <- file.path(dirname(scriptPathC), testOutDirC, "dataMatrix.tsv")
+    defaultArgLs[["sampleMetadata_out"]] <- file.path(dirname(scriptPathC), testOutDirC, "sampleMetadata.tsv")
+    defaultArgLs[["variableMetadata_out"]] <- file.path(dirname(scriptPathC), testOutDirC, "variableMetadata.tsv")
     defaultArgLs[["information"]] <- file.path(dirname(scriptPathC), testOutDirC, "information.txt")
 
     defaultArgLs
--- a/runit/checkformat_tests.R	Tue Jun 06 11:51:33 2017 -0400
+++ b/runit/checkformat_tests.R	Thu Jan 11 10:24:56 2018 -0500
@@ -1,11 +1,95 @@
 test_input_default <- function() {
 
     testDirC <- "input"
-    argLs <- list()
+    argLs <- list(makeNameL = FALSE)
+
+    argLs <- c(defaultArgF(testDirC), argLs)
+    outLs <- wrapperCallF(argLs)
+
+    checkEquals(outLs[['infVc']][4], 'The input tables have a correct format and can be used for your analyses.')
+
+}
+
+test_datSamInv <- function() {
+
+    ## first two samples inverted in dataMatrix
+    
+    testDirC <- "datSamInv"
+    argLs <- list(makeNameL = FALSE)
+
+    argLs <- c(defaultArgF(testDirC), argLs)
+    outLs <- wrapperCallF(argLs)
+
+    checkEquals(outLs[['infVc']][7], 'Warning: The sample and/or variable names or orders from the input tables have been modified')
+
+}
+
+test_datSamFls <- function() {
+
+    ## first sample name in dataMatrix is 17, and in sampleMetadata is X17
+
+    ## also used in test-data
+    
+    testDirC <- "datSamFls"
+    argLs <- list(makeNameL = TRUE)
 
     argLs <- c(defaultArgF(testDirC), argLs)
     outLs <- wrapperCallF(argLs)
 
-    checkEquals(outLs[['infVc']][4], 'Table formats are OK; enjoy your analyses!')
+    checkEquals(outLs[['infVc']][5], 'Message: Converting sample and variable names to the standard R format')
+    
+    checkEquals(outLs[['infVc']][7], 'Warning: The sample and/or variable names or orders from the input tables have been modified')
+
+    checkEquals(rownames(outLs[['datMN']])[1], 'X17')
+
+}
+
+test_datSamFlsInv <- function() {
+
+    ## first sample name in dataMatrix is X17, and in sampleMetadata is 17
+    
+    testDirC <- "datSamFlsInv"
+    argLs <- list(makeNameL = TRUE)
+
+    argLs <- c(defaultArgF(testDirC), argLs)
+    outLs <- wrapperCallF(argLs)
+
+    checkEquals(outLs[['infVc']][5], 'Message: Converting sample and variable names to the standard R format')
+    
+    checkEquals(outLs[['infVc']][7], 'Warning: The sample and/or variable names or orders from the input tables have been modified')
+
+    checkEquals(rownames(outLs[['samDF']])[1], 'X17')
 
 }
+
+test_datVarInv <- function() {
+
+    ## first two variables inverted in variableMetadata
+    
+    testDirC <- "datVarInv"
+    argLs <- list(makeNameL = FALSE)
+
+    argLs <- c(defaultArgF(testDirC), argLs)
+    outLs <- wrapperCallF(argLs)
+
+    checkEquals(outLs[['infVc']][7], 'Warning: The sample and/or variable names or orders from the input tables have been modified')
+
+}
+
+test_datVarFls <- function() {
+
+    ## second variable name in dataMatrix is 3072, and in variableMetadata is X3072
+    
+    testDirC <- "datVarFls"
+    argLs <- list(makeNameL = TRUE)
+
+    argLs <- c(defaultArgF(testDirC), argLs)
+    outLs <- wrapperCallF(argLs)
+
+    checkEquals(outLs[['infVc']][5], 'Message: Converting sample and variable names to the standard R format')
+    
+    checkEquals(outLs[['infVc']][7], 'Warning: The sample and/or variable names or orders from the input tables have been modified')
+
+    checkEquals(colnames(outLs[['datMN']])[2], 'X3072')
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/datSamFls/dataMatrix.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -0,0 +1,4 @@
+dataMatrix	17	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/datSamFls/sampleMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -0,0 +1,31 @@
+sampleMetadata	age	ageGrp
+X17	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/datSamFls/variableMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -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/datSamFlsInv/dataMatrix.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -0,0 +1,4 @@
+dataMatrix	X17	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/datSamFlsInv/sampleMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -0,0 +1,31 @@
+sampleMetadata	age	ageGrp
+17	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/datSamFlsInv/variableMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -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/datSamInv/dataMatrix.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -0,0 +1,4 @@
+dataMatrix	HU_021	HU_017	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	6222035.774	2569204.924	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	65626.98344	3628416.303	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	3887629.505	429568.6094	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/datSamInv/sampleMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -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/datSamInv/variableMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -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/datVarFls/dataMatrix.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -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
+3072	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/datVarFls/sampleMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -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/datVarFls/variableMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -0,0 +1,4 @@
+variableMetadata	name
+HMDB01032	Dehydroepiandrosterone sulfate
+X3072	Quinic acid
+HMDB00792	Sebacic acid
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/datVarInv/dataMatrix.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -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/datVarInv/sampleMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -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/datVarInv/variableMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -0,0 +1,4 @@
+variableMetadata	name
+HMDB03072	Quinic acid
+HMDB01032	Dehydroepiandrosterone sulfate
+HMDB00792	Sebacic acid
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/output/dataMatrix.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -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
--- a/runit/output/information.txt	Tue Jun 06 11:51:33 2017 -0400
+++ b/runit/output/information.txt	Thu Jan 11 10:24:56 2018 -0500
@@ -1,6 +1,30 @@
 
-Start of the 'Check Format' Galaxy module call: Thu 04 Aug 2016 09:29:19 PM
+Start of the 'Check Format' Galaxy module call: Thu 11 Jan 2018 12:26:00 PM
+
+The input tables have a correct format and can be used for your analyses.
+
+End of the 'Check Format' Galaxy module call: Thu 11 Jan 2018 12:26:00 PM
+
+
+
+============================================================================
+Additional information about the call:
 
-Table formats are OK; enjoy your analyses!
+1) Parameters:
+                     value                          
+dataMatrix_in        "./input/dataMatrix.tsv"       
+sampleMetadata_in    "./input/sampleMetadata.tsv"   
+variableMetadata_in  "./input/variableMetadata.tsv" 
+dataMatrix_out       "./output/dataMatrix.tsv"      
+sampleMetadata_out   "./output/sampleMetadata.tsv"  
+variableMetadata_out "./output/variableMetadata.tsv"
+information          "./output/information.txt"     
+makeNameL            "FALSE"                        
 
-End of the 'Check Format' Galaxy module call: Thu 04 Aug 2016 09:29:19 PM
+2) Session Info:
+R version 3.3.1 (2016-06-21) 
+Main packages:
+batch 1.1.4 	
+Other loaded packages:
+
+============================================================================
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/output/sampleMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -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/output/variableMetadata.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -0,0 +1,4 @@
+variableMetadata	name
+HMDB01032	Dehydroepiandrosterone sulfate
+HMDB03072	Quinic acid
+HMDB00792	Sebacic acid
Binary file static/images/checkFormat_workflowPositionImage.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/output-dataMatrix.tsv	Thu Jan 11 10:24:56 2018 -0500
@@ -0,0 +1,4 @@
+dataMatrix	X17	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/test-data/output-information.txt	Tue Jun 06 11:51:33 2017 -0400
+++ b/test-data/output-information.txt	Thu Jan 11 10:24:56 2018 -0500
@@ -1,6 +1,26 @@
 
-Start of the 'Check Format' Galaxy module call: Sat 30 Jul 2016 07:49:51 AM
+Start of the 'Check Format' Galaxy module call: Thu 26 Oct 2017 10:27:44 AM
 
 Table formats are OK; enjoy your analyses!
 
-End of the 'Check Format' Galaxy module call: Sat 30 Jul 2016 07:49:51 AM
+End of the 'Check Format' Galaxy module call: Thu 26 Oct 2017 10:27:44 AM
+
+
+
+============================================================================
+Additional information about the call:
+
+1) Parameters:
+                    value                                   
+dataMatrix_in       "/tmp/tmpolhAXS/files/000/dataset_1.dat"
+sampleMetadata_in   "/tmp/tmpolhAXS/files/000/dataset_2.dat"
+variableMetadata_in "/tmp/tmpolhAXS/files/000/dataset_3.dat"
+information         "/tmp/tmpolhAXS/files/000/dataset_4.dat"
+
+2) Session Info:
+R version 3.3.2 (2016-10-31) 
+Main packages:
+batch 1.1.4 	
+Other loaded packages:
+
+============================================================================