changeset 0:b7a6a88f518a draft

Uploaded
author melpetera
date Thu, 11 Oct 2018 05:47:29 -0400
parents
children bb19b1d15732
files IDchoice/.shed.yml IDchoice/.travis.yml IDchoice/IDchoice.xml IDchoice/IDchoice_script.R IDchoice/IDchoice_wrap.R IDchoice/README.md IDchoice/easyrlibrary-lib/RcheckLibrary.R IDchoice/easyrlibrary-lib/miniTools.R IDchoice/planemo_test.sh IDchoice/test-data/input_IDc_dataMatrix.txt IDchoice/test-data/input_IDc_sampleMetadata.txt IDchoice/test-data/input_IDc_variableMetadata.txt IDchoice/test-data/output1_IDc_dataMatrix.tabular IDchoice/test-data/output1_IDc_variableMetadata.tabular IDchoice/test-data/output2_IDc_dataMatrix.tabular IDchoice/test-data/output2_IDc_sampleMetadata.tabular
diffstat 16 files changed, 792 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/.shed.yml	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,6 @@
+categories: [Metabolomics]
+description: '[W4M][Utils] Choosing new identifiers.'
+homepage_url: http://workflow4metabolomics.org
+long_description: 'Available for the W4M project: http://workflow4metabolomics.org / This tool is designed to make you choose a particular column in your metadata file to be considered as identifiers for your W4M-3-tables-format data.'
+name: idchoice
+owner: melpetera
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/.travis.yml	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,19 @@
+# This is a special configuration file to run tests on Travis-CI via
+# GitHub notifications when changes are committed.
+#
+# See http://travis-ci.org/ for details
+language: python
+
+before_install:
+ - sudo apt-get install -y python-virtualenv
+ - virtualenv planemo-venv
+ - . planemo-venv/bin/activate
+ - pip install --upgrade pip setuptools
+ - pip install planemo
+ - planemo conda_init
+
+install:
+ - planemo conda_install ${TRAVIS_BUILD_DIR}
+
+script:
+- planemo test --install_galaxy --no_cache_galaxy --conda_dependency_resolution ${TRAVIS_BUILD_DIR}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/IDchoice.xml	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,159 @@
+<tool id="idchoice" name="ID choice" version="18.01">
+  <description>Choosing a particular column in your metadata to be considered as Identifiers</description>
+  <requirements>
+	    <requirement type="package" version="1.1_4">r-batch</requirement>
+  </requirements>
+  <command interpreter="Rscript">
+	IDchoice_wrap.R
+      dataMatrix_in "$dataMatrix_in"
+      Metadata_in "$Metadata_in"
+              
+      metatype "$metatype"
+	  col_name "$col_name"
+	  makeunique "$makeunique"
+      
+      DM_out "$DM_out"
+	  meta_out "$meta_out"
+
+  </command>
+  
+  <inputs>
+
+    <param name="dataMatrix_in" type="data" label="Data matrix file" help="" format="tabular" />
+    <param name="Metadata_in" type="data" label="Metadata file containing your new IDs" help="Sample metadata or variable metadata" format="tabular" />
+
+    <param name="metatype" label="Which ID do you want to change?" type="select" display="radio" help="">
+      <option value="sample">Samples</option>
+      <option value="variable" selected="True">Variables</option>
+    </param>
+
+	<param name="col_name" label="Name of the column to consider as new ID" type="text" value="" help="Exact name; must be in your metadata file" />
+
+    <param name="makeunique" label="Force unicity if not unique?" type="select" display="radio" help="">
+      <option value="yes">Yes</option>
+      <option value="no" selected="True">No</option>
+    </param>
+
+  </inputs>
+  
+  <outputs>
+    <data name="DM_out" label="ID_${dataMatrix_in.name}" format="tabular" ></data>
+	<data name="meta_out" label="ID_${Metadata_in.name}" format="tabular" ></data>
+  </outputs>
+  
+  
+   <tests>
+	<test>
+      <param name="dataMatrix_in" value="input_IDc_dataMatrix.txt"/>
+      <param name="Metadata_in" value="input_IDc_variableMetadata.txt"/>
+      <param name="metatype" value="variable"/>
+	  <param name="col_name" value="B"/>
+	  <param name="makeunique" value="yes"/>
+      <output name="DM_out" file="output1_IDc_dataMatrix.tabular"/>
+	  <output name="meta_out" file="output1_IDc_variableMetadata.tabular"/>
+	</test>
+	<test>
+      <param name="dataMatrix_in" value="input_IDc_dataMatrix.txt"/>
+      <param name="Metadata_in" value="input_IDc_sampleMetadata.txt"/>
+      <param name="metatype" value="sample"/>
+	  <param name="col_name" value="AAA"/>
+	  <param name="makeunique" value="yes"/>
+      <output name="DM_out" file="output2_IDc_dataMatrix.tabular"/>
+	  <output name="meta_out" file="output2_IDc_sampleMetadata.tabular"/>
+	</test>
+  </tests>
+  
+  
+  <help>
+
+.. class:: infomark
+
+**Authors** 
+  | Melanie Petera - PFEM ; INRA ; MetaboHUB 
+
+---------------------------------------------------
+
+========================
+ID Choice
+========================
+
+-----------
+Description
+-----------
+
+Change the current identifiers into new ones defined in your metadata file. 
+Can be used for sample ID as well as variable ID. 
+
+
+
+-----------
+Input files
+-----------
+
++----------------------------+---------+
+| Parameter : num + label    |  Format |
++============================+=========+
+| 1 : Data matrix file       | tabular |
++----------------------------+---------+
+| 2 : Metadata file          | tabular |
++----------------------------+---------+
+
+
+Data matrix file contains the intensity values of the variables.
+	| 
+
+Metadata file is meant to be chosen from sample metadata and variable metadata files. 
+	| It should include a column containing your wanted IDs. 
+	| 
+
+----------
+Parameter
+----------
+
+Which ID do you want to change?
+	| This must be consistant with the metadata file you chose as input
+	| 
+
+Name of the column to consider as new ID
+	| Must be one of your metadata file's column
+	|
+
+Force unicity if not unique?
+	| If no (default value), if your ID column does not contain unique values, it will stop the process and send you back an explicit error.
+	| If yes, non-unique values will be converted by adding "_x" at the end of concerned IDs. 
+	|
+
+
+------------
+Output file
+------------
+
+ID_metadata
+	| tabular output
+	| Corresponds to the input metadata file with new IDs as first column
+	|
+
+ID_datamatrix
+	| tabular output
+	| Corresponds to the input data matrix file with new IDs
+	|
+
+
+---------------------------------------------------
+
+----------------------
+Additional information
+----------------------
+
+
+.. class:: warningmark
+
+For more information about input files, refer to the corresponding "W4M HowTo" page:
+ | `W4M table format for Galaxy &lt;http://workflow4metabolomics.org/sites/workflow4metabolomics.org/files/files/w4m_TableFormatForGalaxy_150908.pdf&gt;`_
+ |
+
+
+
+
+	</help>
+</tool>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/IDchoice_script.R	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,124 @@
+################################################################################################
+# ID CHOICE                                                                                    #
+#                                                                                              #
+# User: Galaxy                                                                                 #
+# Starting date: 01-06-2017                                                                    #
+# V-0.1: First version of code                                                                 #
+#                                                                                              #
+#                                                                                              #
+# Input files: dataMatrix ; Metadata file                                                      #
+# Output files: dataMatrix ; Metadata file                                                     #
+#                                                                                              #
+# Dependencies: RcheckLibrary.R ; miniTools.R  (easyRlibrary)                                  #
+#                                                                                              #
+################################################################################################
+
+# Parameters (for dev)
+if(FALSE){
+  DM.name <- "CaracSpe_dataMatrix.txt"
+  meta.name <- "CaracSpe_variableMetadata.txt"
+  metype <- "variable"
+  #coloname <- "namecustom"
+  coloname <- "B"
+  makeun <- "yes"
+  DMout <- "ID_DM.txt"
+  metaout <- paste0("ID_",metype,"meta.txt")
+}
+
+
+id.choice <- function(DM.name,meta.name,metype,coloname,makeun,DMout,metaout){
+  # This function allows to replace original IDs with other ones from one metadata table.
+  #
+  # Parameters:
+  # - DM.name, meta.name: dataMatrix and metadata files' access respectively
+  # - metype: "sample" or "variable" depending on metadata content
+  # - coloname: name of the metadata column to be used as new ID
+  # - makeun: "yes" or "no" depending on user choice if new IDs are not unique ("yes"=conversion to unique ID)
+  # - DMout, metaout: output files' access
+  
+  
+# Input --------------------------------------------------------------
+
+DM <- read.table(DM.name,header=TRUE,sep="\t",check.names=FALSE)
+meta <- read.table(meta.name,header=TRUE,sep="\t",check.names=FALSE,colClasses="character")
+
+# Table match check 
+table.check <- match2(DM,meta,metype)
+check.err(table.check)
+
+
+# Checking unicity of new IDs ----------------------------------------
+
+numcol <- which(colnames(meta)==coloname)
+if(length(numcol)==0) {
+      stop(paste0("\n-------\nWarning: no '",coloname,"' column detected in ",metype," metadata!",
+                  "\nPlease check your metadata file (column names are case-sensitive).\n-------\n")) 
+}
+
+unicity <- duplicated(meta[,numcol])
+
+if(sum(unicity)>0){
+  if(makeun=="no"){
+    #Sending back an explicit error
+	duptable <- t(t(table(meta[,numcol][unicity])+1))
+	stop(paste0("\n-------\nYour '",coloname,"' column contains duplicates:\n"),
+		paste(rownames(duptable),duptable,sep=": ",collapse="\n"),paste0("\nSince identifiers are meant to be unique, ",
+		"please check your data or use the 'Force unicity' option to force unicity.\n-------\n"))
+	
+  }else{
+    #Making unique names
+	meta <- cbind(meta,newID=make.unique(meta[,numcol],sep="_"),ori=c(1:nrow(meta)))
+  }
+}else{
+  #No unicity problem
+  meta <- cbind(meta,newID=meta[,numcol],ori=c(1:nrow(meta)))
+}
+
+
+# Merging tables -----------------------------------------------------
+
+#Transposing the dataMatrix if necessary
+if(metype=="sample"){
+  rownames(DM) <- DM[,1]
+  DM <- DM[,-1]
+  DM <- t(DM)
+  DM <- data.frame(sample=row.names(DM),DM,check.names=FALSE)
+  rownames(DM) <- NULL
+}
+
+comb.data <- merge(x=meta,y=DM,by.x=1,by.y=1)
+comb.data <- comb.data[order(comb.data$ori),]
+
+
+# Changing IDs -------------------------------------------------------
+
+DM <- comb.data[,-c(1:(ncol(meta)-2),ncol(meta))]
+if(makeun=="no"){
+  comb.data <- comb.data[,c(numcol,which(colnames(meta)!=coloname))]
+  meta <- comb.data[,c(1:(ncol(meta)-2))]
+}else{
+  meta <- comb.data[,c(ncol(meta)-1,1:(ncol(meta)-2))]
+}
+
+#Transposing back the dataMatrix if necessary
+if(metype=="sample"){
+  rownames(DM) <- DM[,1]
+  DM <- DM[,-1]
+  DM <- t(DM)
+  DM <- data.frame(sample=row.names(DM),DM,check.names=FALSE)
+  rownames(DM) <- NULL
+}
+
+
+# Output -------------------------------------------------------------
+
+# Writing the table
+write.table(DM,DMout,sep="\t",quote=FALSE,row.names=FALSE)
+write.table(meta,metaout,sep="\t",quote=FALSE,row.names=FALSE)
+
+
+} # End of id.choice
+
+
+# Typical function call
+# id.choice(DM.name,meta.name,metype,coloname,makeun,DMout,metaout)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/IDchoice_wrap.R	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,38 @@
+#!/usr/bin/Rscript --vanilla --slave --no-site-file
+
+################################################################################################
+# WRAPPER FOR IDchoice_script.R (ID CHOICE)                                                    #
+#                                                                                              #
+# Author: Melanie PETERA                                                                       #
+# User: Galaxy                                                                                 #
+# Original data: used with IDchoice_script.R                                                   #
+# Starting date: 01-06-2017                                                                    #
+# V-1: Firt version of wrapper                                                                 #
+#                                                                                              #
+#                                                                                              #
+# Input files: dataMatrix ; Metadata file                                                      #
+# Output files: dataMatrix ; Metadata file                                                     #
+#                                                                                              #
+################################################################################################
+
+
+library(batch) #necessary for parseCommandArgs function
+args = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects
+
+source_local <- function(...){
+	argv <- commandArgs(trailingOnly = FALSE)
+	base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
+	for(i in 1:length(list(...))){source(paste(base_dir, list(...)[[i]], sep="/"))}
+}
+#Import the different functions
+source_local("IDchoice_script.R","easyrlibrary-lib/RcheckLibrary.R","easyrlibrary-lib/miniTools.R")
+
+
+if(length(args) < 7){ stop("NOT enough argument !!!") }
+
+
+id.choice(args$dataMatrix_in, args$Metadata_in, args$metatype, args$col_name, args$makeunique, args$DM_out, args$meta_out)
+
+
+#delete the parameters to avoid the passage to the next tool in .RData image
+rm(args)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/README.md	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,60 @@
+ID choice
+=======
+
+Metadata
+-----------
+
+ * **@name**: ID choice
+ * **@version**: 17.11
+ * **@authors**: Melanie Petera - PFEM ; INRA ; MetaboHUB 
+ * **@init date**: 2017/06/07
+ * **@main usage**: This tool is designed to make you choose a particular column in your metadata file to be considered as identifiers for your W4M-3-tables-format data. 
+
+ 
+Context
+-----------
+
+This tool is one of the [Workflow4Metabolomics](http://workflow4metabolomics.org) Galaxy instance utilities. W4M is a French infrastructure providing software tools to process, analyse and annotate metabolomics data. 
+
+User interface is based on the Galaxy platform (homepage: https://galaxyproject.org/). It is an open, web-based platform for data intensive biomedical research. Whether on the free public server or your own instance, you can perform, reproduce, and share complete analyses.
+
+ 
+Configuration
+-----------
+
+### Requirement:
+ * R software: version > 3.0.0 recommended
+ * Specific R library: 'batch'
+ * Submodule: [easyRlibrary](https://github.com/workflow4metabolomics/easyrlibrary-lib) (Required for internal input quality checks)
+
+### Deploy:
+ * [get project data](https://github.com/workflow4metabolomics/idchoice)
+ * How to get the submodule files:
+When pulling this module's Git repository, you may only obtain an empty folder for the needed submodule.
+You can initialise it then with the following command:
+```bash
+git submodule update --init --recursive
+```
+
+
+Travis test
+-----------
+
+[![Build Status](https://travis-ci.org/workflow4metabolomics/idchoice.svg?branch=master)](https://travis-ci.org/workflow4metabolomics/idchoice)
+Test and Deploy with Confidence. Easily sync your GitHub projects with Travis CI and you'll be testing your code in minutes!
+
+
+Technical description
+-----------
+
+Main files:
+
+- IDchoice_script.R: R function (core script)
+- IDchoice_wrap.R: R script to link the main R function to inputs
+- IDchoice.xml: XML wrapper (interface for Galaxy)
+
+
+Services provided
+-----------
+
+ * Help and support: support@workflow4metabolomics.org
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/easyrlibrary-lib/RcheckLibrary.R	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,124 @@
+######################################################
+# R check library
+# Coded by: M.Petera, 
+# - -
+# R functions to use in R scripts  
+# (management of various generic subroutines)
+# - -
+# V0: script structure + first functions
+# V1: More detailed error messages in match functions
+######################################################
+
+
+# Generic function to return an error if problems have been encountered - - - -
+
+check.err <- function(err.stock){
+	
+	# err.stock = vector of results returned by check functions
+	
+	if(length(err.stock)!=0){ stop("\n- - - - - - - - -\n",err.stock,"\n- - - - - - - - -\n") }
+	
+}
+
+
+
+
+# Table match check functions - - - - - - - - - - - - - - - - - - - - - - - - -
+
+# To check if dataMatrix and (variable or sample)Metadata match regarding identifiers
+match2 <- function(dataMatrix, Metadata, Mtype){
+
+	# dataMatrix = data.frame containing dataMatrix
+	# Metadata = data.frame containing sampleMetadata or variableMetadata
+	# Mtype = "sample" or "variable" depending on Metadata content
+	
+	err.stock <- NULL # error vector
+
+	id2 <- Metadata[,1]
+	if(Mtype=="sample"){ id1 <- colnames(dataMatrix)[-1] }
+	if(Mtype=="variable"){ id1 <- dataMatrix[,1] }
+	
+	if( length(which(id1%in%id2))!=length(id1) || length(which(id2%in%id1))!=length(id2) ){
+		err.stock <- c("\nData matrix and ",Mtype," metadata do not match regarding ",Mtype," identifiers.")
+		if(length(which(id1%in%id2))!=length(id1)){
+			if(length(which(!(id1%in%id2)))<4){ err.stock <- c(err.stock,"\n    The ")
+			}else{ err.stock <- c(err.stock,"\n    For example, the ") }
+			err.stock <- c(err.stock,"following identifiers found in the data matrix\n",
+							"    do not appear in the ",Mtype," metadata file:\n")
+			identif <- id1[which(!(id1%in%id2))][1:min(3,length(which(!(id1%in%id2))))]
+			err.stock <- c(err.stock,"    ",paste(identif,collapse="\n    "),"\n")
+		}
+		if(length(which(id2%in%id1))!=length(id2)){
+			if(length(which(!(id2%in%id1)))<4){ err.stock <- c(err.stock,"\n    The ")
+			}else{ err.stock <- c(err.stock,"\n    For example, the ") }
+			err.stock <- c(err.stock,"following identifiers found in the ",Mtype," metadata file\n",
+							"    do not appear in the data matrix:\n")
+			identif <- id2[which(!(id2%in%id1))][1:min(3,length(which(!(id2%in%id1))))]
+			err.stock <- c(err.stock,"    ",paste(identif,collapse="\n    "),"\n")
+		}
+		err.stock <- c(err.stock,"\nPlease check your data.\n")
+	}
+	
+	return(err.stock)
+	
+}
+
+# To check if the 3 standard tables match regarding identifiers
+match3 <- function(dataMatrix, sampleMetadata, variableMetadata){
+	
+	# dataMatrix = data.frame containing dataMatrix
+	# sampleMetadata = data.frame containing sampleMetadata
+	# variableMetadata = data.frame containing variableMetadata
+	
+	err.stock <- NULL # error vector
+	
+	id1 <- colnames(dataMatrix)[-1]
+	id2 <- sampleMetadata[,1]
+	id3 <- dataMatrix[,1]
+	id4 <- variableMetadata[,1]
+	
+	if( length(which(id1%in%id2))!=length(id1) || length(which(id2%in%id1))!=length(id2) ){
+		err.stock <- c(err.stock,"\nData matrix and sample metadata do not match regarding sample identifiers.")
+		if(length(which(id1%in%id2))!=length(id1)){
+			if(length(which(!(id1%in%id2)))<4){ err.stock <- c(err.stock,"\n    The ")
+			}else{ err.stock <- c(err.stock,"\n    For example, the ") }
+			err.stock <- c(err.stock,"following identifiers found in the data matrix\n",
+							"    do not appear in the sample metadata file:\n")
+			identif <- id1[which(!(id1%in%id2))][1:min(3,length(which(!(id1%in%id2))))]
+			err.stock <- c(err.stock,"    ",paste(identif,collapse="\n    "),"\n")
+		}
+		if(length(which(id2%in%id1))!=length(id2)){
+			if(length(which(!(id2%in%id1)))<4){ err.stock <- c(err.stock,"\n    The ")
+			}else{ err.stock <- c(err.stock,"\n    For example, the ") }
+			err.stock <- c(err.stock,"following identifiers found in the sample metadata file\n",
+							"    do not appear in the data matrix:\n")
+			identif <- id2[which(!(id2%in%id1))][1:min(3,length(which(!(id2%in%id1))))]
+			err.stock <- c(err.stock,"    ",paste(identif,collapse="\n    "),"\n")
+		}
+	}
+	
+	if( length(which(id3%in%id4))!=length(id3) || length(which(id4%in%id3))!=length(id4) ){
+		err.stock <- c(err.stock,"\nData matrix and variable metadata do not match regarding variable identifiers.")
+		if(length(which(id3%in%id4))!=length(id3)){
+			if(length(which(!(id3%in%id4)))<4){ err.stock <- c(err.stock,"\n    The ")
+			}else{ err.stock <- c(err.stock,"\n    For example, the ") }
+			err.stock <- c(err.stock,"following identifiers found in the data matrix\n",
+							"    do not appear in the variable metadata file:\n")
+			identif <- id3[which(!(id3%in%id4))][1:min(3,length(which(!(id3%in%id4))))]
+			err.stock <- c(err.stock,"    ",paste(identif,collapse="\n    "),"\n")
+		}
+		if(length(which(id4%in%id3))!=length(id4)){
+			if(length(which(!(id4%in%id3)))<4){ err.stock <- c(err.stock,"\n    The ")
+			}else{ err.stock <- c(err.stock,"\n    For example, the ") }
+			err.stock <- c(err.stock,"following identifiers found in the variable metadata file\n",
+							"    do not appear in the data matrix:\n")
+			identif <- id4[which(!(id4%in%id3))][1:min(3,length(which(!(id4%in%id3))))]
+			err.stock <- c(err.stock,"    ",paste(identif,collapse="\n    "),"\n")
+		}
+	}
+	
+	if(length(err.stock)!=0){ err.stock <- c(err.stock,"\nPlease check your data.\n") }
+	
+	return(err.stock)
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/easyrlibrary-lib/miniTools.R	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,133 @@
+#####################################################
+# Mini tools for Galaxy scripting
+# Coded by: M.Petera, 
+# - -
+# R functions to use in R scripts and wrappers
+# to make things easier (lightening code, reducing verbose...)
+# - -
+# V0: script structure + first functions
+# V1: addition of functions to handle special characters in identifiers
+#####################################################
+
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+# Function to call packages without printing all the verbose
+# (only getting the essentials, like warning messages for example)
+
+shyLib <- function(...){
+	for(i in 1:length(list(...))){
+		suppressPackageStartupMessages(library(list(...)[[i]],character.only=TRUE))
+	}
+}
+
+#example: shyLib("xcms","pcaMethods")
+
+
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+# Fonction pour sourcer les scripts R requis
+# /!\ ATTENTION : actuellement la fonction n'est pas chargee au lancement du script,
+# il faut donc la copier-coller dans le wrapper R pour pouvoir l'utiliser. 
+
+if(FALSE){
+source_local <- function(...){
+	argv <- commandArgs(trailingOnly = FALSE)
+	base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
+	for(i in 1:length(list(...))){
+		source(paste(base_dir, list(...)[[i]], sep="/"))
+	}
+}
+}
+
+#example: source_local("filter_script.R","RcheckLibrary.R")
+
+
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+# Functions to stock identifiers before applying make.names() and
+# to reinject it into final matrices
+# Note: it reproduces the original order of datasets' identifiers
+# - - -
+# stockID: stocks original identifiers and original order
+# -> needs checked data regarding table match
+# reproduceID: reinjects original identifiers and original order into final tables
+# -> function to be used at the very end, when exporting tables
+
+stockID <- function(dataMatrix, Metadata, Mtype){
+  # dataMatrix = data.frame containing dataMatrix
+  # Metadata = data.frame containing sampleMetadata or variableMetadata
+  # Mtype = "sample" or "variable" depending on Metadata content
+  cname <- colnames(dataMatrix)[1]
+      # dataMatrix temporary-stock + transfo - - - -
+  if(Mtype=="sample"){
+    id.ori <- colnames(dataMatrix)[-1] 
+    colnames(dataMatrix) <- make.names(colnames(dataMatrix)) 
+  }
+  if(Mtype=="variable"){
+    id.ori <- dataMatrix[,1] 
+    dataMatrix[,1] <- make.names(dataMatrix[,1]) 
+  }
+      # global stock - - - - - - - - - - - - - - - -
+  id.new <- data.frame(order.ori=c(1:length(Metadata[,1])),Metadata[,1],
+					   id.new=make.names(Metadata[,1]),id.ori,
+					   id.new.DM=make.names(id.ori),stringsAsFactors=FALSE)
+  colnames(id.new)[c(2,4)] <- c(colnames(Metadata)[1],cname)
+      # Metadata transfo + returning data - - - - - 
+  Metadata[,1] <- make.names(Metadata[,1]) 
+  return(list(id.match=id.new, dataMatrix=dataMatrix, Metadata=Metadata))
+}
+#example: A<-stockID(myDM,mysM,"sample") ; myDM<-A$dataMatrix ; mysM<-A$Metadata ; A<-A$id.match
+
+reproduceID <- function(dataMatrix, Metadata, Mtype, id.match){
+  # dataMatrix = data.frame containing dataMatrix
+  # Metadata = data.frame containing sampleMetadata or variableMetadata
+  # Mtype = "sample" or "variable" depending on Metadata content
+  # id.match = 'id.match' element produced by stockID
+      #Metadada - - - - - - - - - - - - - - 
+  temp.table <- id.match[,c(1,2,3)]
+  ## Removing deleted rows
+  for(i in 1:(dim(id.match)[1])){
+	if(!(temp.table[i,3]%in%Metadata[,1])){temp.table[i,1] <- 0}
+  }
+  if(length(which(temp.table[,1]==0))!=0){
+	temp.table <- temp.table[-c(which(temp.table[,1]==0)),]
+  }
+  ## Restoring original identifiers and order
+  temp.table <- merge(x=temp.table,y=Metadata,by.x=3,by.y=1)
+  temp.table <- temp.table[order(temp.table$order.ori),]
+  Metadata <- temp.table[,-c(1,2)]
+  rownames(Metadata) <- NULL
+      #dataMatrix - - - - - - - - - - - - - 
+  rownames(dataMatrix)<-dataMatrix[,1]
+  if(Mtype=="sample"){
+    dataMatrix <- t(dataMatrix[,-1])
+  }
+  temp.table <- id.match[,c(1,4,5)]
+  ## Removing deleted rows
+  for(i in 1:(dim(id.match)[1])){
+	if(!(temp.table[i,3]%in%rownames(dataMatrix))){temp.table[i,1] <- 0}
+  }
+  if(length(which(temp.table[,1]==0))!=0){
+	temp.table <- temp.table[-c(which(temp.table[,1]==0)),]
+  }
+  ## Restoring original identifiers and order
+  temp.table <- merge(x=temp.table,y=dataMatrix,by.x=3,by.y=0)
+  temp.table <- temp.table[order(temp.table$order.ori),]
+  if(Mtype=="variable"){
+	dataMatrix <- temp.table[,-c(1,2,4)]
+	colnames(dataMatrix)[1] <- colnames(id.match)[4]
+  } else {
+	rownames(temp.table) <- temp.table[,3]
+	temp.table <- t(temp.table[,-c(1,2,3)])
+	dataMatrix <- data.frame(rownames(temp.table),temp.table)
+	colnames(dataMatrix)[1] <- colnames(id.match)[4]
+  }
+  rownames(dataMatrix) <- NULL
+      # return datasets - - - - - - - - - - - 
+  return(list(dataMatrix=dataMatrix, Metadata=Metadata))
+}
+#example: B<-reproduceID(myDM,mysM,"sample",A) ; myDM<-B$dataMatrix ; mysM<-B$Metadata
+
+
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/planemo_test.sh	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,3 @@
+planemo conda_init --conda_prefix /tmp/mc/
+planemo conda_install --conda_prefix /tmp/mc/ .
+planemo test --install_galaxy --conda_dependency_resolution --conda_prefix /tmp/mc/ --no_cleanup
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/test-data/input_IDc_dataMatrix.txt	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,18 @@
+data	j 785	 y54j 68y4j6	5-6 4	hrh 	5h -	3	 t564	t54 66	 y6y	t6 5h	(5y 	 g51 	(	6	 98 j7-0 	06654h 	60
+5d_-kkcùf	0.356426723610756	0.380152310071702	0.0306944207412024	0.334137638848017	0.298147485608469	0.975073793297568	0.129099504745855	0.973451663994064	0.334792719284834	0.0751565260418877	0.322897933010729	0.129033714279026	0.722966330196726	0.580654367692078	0.644502528016206	0.352827235332827	0.511778286438001
+npèt	0.801750949101246	0.535593104115636	0.258351312473067	0.599475573145688	0.0763319665667417	0.504558103160623	0.367963830290116	0.440540211857668	0.158066366765388	0.609574253877002	0.550590276177951	0.232864384033621	0.637065775537391	0.424098276140436	0.662053737304139	0.0217541227637467	0.299053946391647
+5PY4(*3	0.875199970420953	0.0825428101366147	0.253659010703906	0.507762246807195	0.856444177031262	0.291594962324086	0.616538655402613	0.388475672176377	0.914254939740854	0.449607330807756	0.628469388494906	0.436558212905713	0.951198610265672	0.956459387015831	0.0113483457928278	0.611559621193868	0.127393349941781
+k	0.235214515530521	0.50917637648828	0.0303152651414629	0.305595242012361	0.470145996588881	0.356776179776951	0.569840649303474	0.720070419680388	0.875026990189028	0.97246313990283	0.936423978578332	0.810603455355391	0.903046784946495	0.667091730522105	0.0282601148338295	0.276666638740528	0.747503427028951
+t v^ptok!R/; 	0.251801918471682	0.871383805557867	0.285183681272061	0.552739436194454	0.863766301215097	0.182656918760194	0.977603710051043	0.204845724382198	0.751690583305025	0.751475804910098	0.938399878874186	0.218163132174348	0.523463794277572	0.987156468237196	0.630938391969655	0.495061607430081	0.815474132321848
+ojt*	0.907412839750932	0.857498273276021	0.370137361785406	0.76678484779183	0.213299689296413	0.521214352529346	0.0851731095099456	0.868227767553325	0.0711706993343434	0.70186429888193	0.700568035764899	0.7467824290166	0.570332959002042	0.23270290523468	0.126423339798572	0.816262268500797	0.466363859676536
+lmtki	0.344288940919619	0.308219131305663	0.218449898667526	0.700869668247368	0.932538878977527	0.396198994630489	0.710306820874376	0.124235068279782	0.56608643523601	0.887647287670482	0.0375011938139768	0.282378766400105	0.757492159558571	0.506567258021703	0.990910788272054	0.326205008250378	0.61003856679129
+1h6-(587 t	0.308709890328272	0.717202505490233	0.777934118812417	0.604807545422864	0.588458968776734	0.940112596977594	0.788662314418432	0.133046934771924	0.891405172730758	0.915119678712577	0.401136527896346	0.996068607925829	0.049077648050296	0.157657286859101	0.598183619914656	0.439531332356748	0.11995300831499
+r154 (54 86	0.0861033910635205	0.243889357950567	0.848801588667359	0.972183114768299	0.311829870889657	0.434854970574638	0.0240613698880671	0.273335646139236	0.902686361056168	0.73479376111027	0.232132726965829	0.471097756642369	0.511949019774828	0.934158039531663	0.60125450357768	0.972297241140637	0.63149263296722
+(h4 	0.336373953934809	0.521412085356266	0.281632887739949	0.67004516763179	0.0199332367594847	0.867732114278491	0.973477443505332	0.883197938525362	0.334509105447652	0.793947578560618	0.465167375556954	0.508757674191867	0.983758014396725	0.100582744588671	0.501301982240787	0.789637338939369	0.967382850752139
+2	0.65083934802851	0.915695024588	0.0376667088550816	0.514003854683931	0.274761574286474	0.652108809243866	0.689393057486628	0.262205073769319	0.871958663956254	0.709490850507154	0.854477673591409	0.672918329289054	0.141693817710263	0.00543057257281332	0.273084303937691	0.39570748778882	0.303196826092465
+ m(yk	0.798331012769621	0.806128809071498	0.519974578571807	0.0237856823099186	0.396426673475168	0.75979784245693	0.0589336105092753	0.763144123705766	0.16086904822931	0.301000258395631	0.321186481311644	0.0091434029302796	0.0346149352313591	0.276366137673702	0.686099471259438	0.0548240244354505	0.909361338008149
+ -546 -3 -3	0.981561422839383	0.755973696318293	0.328878596436459	0.233341270249666	0.14569201922932	0.458105216271765	0.191023237667199	0.775603857680909	0.146769440956804	0.86812372109824	0.601678275863019	0.782019307745586	0.955614654474782	0.836058192741214	0.454550085076576	0.181788519803465	0.325277631599655
+nz^à  t 	0.920089977342539	0.249031996586174	0.105577675363886	0.805216649434891	0.505774902707566	0.619612431793644	0.337662179244335	0.672829320507873	0.387228581340173	0.209795853201976	0.0403285073621635	0.540614252108851	0.43362855410287	0.160204078494507	0.924783730297701	0.116837628312753	0.58763473928668
+kzjù	0.418651623550921	0.668434005412235	0.845525871017258	0.567468950919516	0.111441846749533	0.411424602517146	0.0743349602270699	0.583730221710347	0.0105008018078939	0.918789674284249	0.808643595994088	0.33578972219198	0.536848200622412	0.898842910125025	0.333954421105444	0.0390509357521919	0.159857705429294
+. Glk(ôepjg$	0.3266193089274	0.806668730531573	0.87265879590923	0.934940869880726	0.548967615908753	0.250539517744596	0.75436043048449	0.597444122305604	0.343955002787363	0.560987092777944	0.134929631392942	0.958047956861493	0.870429681664852	0.66286672214456	0.441523248613101	0.437073092741238	0.265031623006715
+rmlgj*lr ,	0.462672931523031	0.74679446664976	0.151929368261195	0.165870989887449	0.90931621240424	0.423706631494886	0.337742032589001	0.184993498717115	0.0792523932129463	0.071353352835237	0.525247607449536	0.647744088759121	0.158725526449032	0.203927461340644	0.20055683200405	0.897053444943847	0.506954538974894
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/test-data/input_IDc_sampleMetadata.txt	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,18 @@
+data	ABCD	E	AAA	fp	uv
+j 785	1	91	a	a	s
+y54j 68y4j6	2	60	b	z	d
+5-6 4	2	43	c	e	f
+hrh	3	24	d	r	s
+5h -	4	29	b	t	d
+3	56	71	a	y	f
+t564	4	4	r	u	s
+t54 66	23	91	c	i	d
+y6y	5	61	f	o	f
+t6 5h	8	21	s	p	s
+(5y	98	77	b	q	d
+g51	67	1	b	s	f
+(	98	48	r	d	s
+6	2	10	a	f	d
+98 j7-0	1	36	a	g	f
+06654h	34	100	k	h	s
+60	67	38	d	j	d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/test-data/input_IDc_variableMetadata.txt	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,18 @@
+variable	A	B	C	D
+5d_-kkcùf	0	a	ze$ùj	0
+npèt	1	b	 g	0
+5PY4(*3	2	c	 15j-è,	0
+k	3	a	6jè	1
+t v^ptok!R/; 	4	b	8j4,	1
+ojt*	5	c	5èj1	1
+lmtki	6	a	j84	2
+1h6-(587 t	7	b	j4e54	2
+r154 (54 86	8	c	j	2
+(h4 	9	a	54j6@44èu6(è4	3
+2	10	b	(51h	3
+ m(yk	11	c	8-1	3
+ -546 -3 -3	12	a	hy-81u	4
+nz^à  t 	13	b	zs5-hj1	4
+kzjù	14	c	861h	4
+. Glk(ôepjg$	15	a	(8168(h1	9
+rmlgj*lr ,	16	b	8hjè1	9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/test-data/output1_IDc_dataMatrix.tabular	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,18 @@
+newID	j 785	y54j 68y4j6	5-6 4	hrh	5h -	3	t564	t54 66	y6y	t6 5h	(5y	g51	(	6	98 j7-0	06654h	60
+a	0.356426723610756	0.380152310071702	0.0306944207412024	0.334137638848017	0.298147485608469	0.975073793297568	0.129099504745855	0.973451663994064	0.334792719284834	0.0751565260418877	0.322897933010729	0.129033714279026	0.722966330196726	0.580654367692078	0.644502528016206	0.352827235332827	0.511778286438001
+b	0.801750949101246	0.535593104115636	0.258351312473067	0.599475573145688	0.0763319665667417	0.504558103160623	0.367963830290116	0.440540211857668	0.158066366765388	0.609574253877002	0.550590276177951	0.232864384033621	0.637065775537391	0.424098276140436	0.662053737304139	0.0217541227637467	0.299053946391647
+c	0.875199970420953	0.0825428101366147	0.253659010703906	0.507762246807195	0.856444177031262	0.291594962324086	0.616538655402613	0.388475672176377	0.914254939740854	0.449607330807756	0.628469388494906	0.436558212905713	0.951198610265672	0.956459387015831	0.0113483457928278	0.611559621193868	0.127393349941781
+a_1	0.235214515530521	0.50917637648828	0.0303152651414629	0.305595242012361	0.470145996588881	0.356776179776951	0.569840649303474	0.720070419680388	0.875026990189028	0.97246313990283	0.936423978578332	0.810603455355391	0.903046784946495	0.667091730522105	0.0282601148338295	0.276666638740528	0.747503427028951
+b_1	0.251801918471682	0.871383805557867	0.285183681272061	0.552739436194454	0.863766301215097	0.182656918760194	0.977603710051043	0.204845724382198	0.751690583305025	0.751475804910098	0.938399878874186	0.218163132174348	0.523463794277572	0.987156468237196	0.630938391969655	0.495061607430081	0.815474132321848
+c_1	0.907412839750932	0.857498273276021	0.370137361785406	0.76678484779183	0.213299689296413	0.521214352529346	0.0851731095099456	0.868227767553325	0.0711706993343434	0.70186429888193	0.700568035764899	0.7467824290166	0.570332959002042	0.23270290523468	0.126423339798572	0.816262268500797	0.466363859676536
+a_2	0.344288940919619	0.308219131305663	0.218449898667526	0.700869668247368	0.932538878977527	0.396198994630489	0.710306820874376	0.124235068279782	0.56608643523601	0.887647287670482	0.0375011938139768	0.282378766400105	0.757492159558571	0.506567258021703	0.990910788272054	0.326205008250378	0.61003856679129
+b_2	0.308709890328272	0.717202505490233	0.777934118812417	0.604807545422864	0.588458968776734	0.940112596977594	0.788662314418432	0.133046934771924	0.891405172730758	0.915119678712577	0.401136527896346	0.996068607925829	0.049077648050296	0.157657286859101	0.598183619914656	0.439531332356748	0.11995300831499
+c_2	0.0861033910635205	0.243889357950567	0.848801588667359	0.972183114768299	0.311829870889657	0.434854970574638	0.0240613698880671	0.273335646139236	0.902686361056168	0.73479376111027	0.232132726965829	0.471097756642369	0.511949019774828	0.934158039531663	0.60125450357768	0.972297241140637	0.63149263296722
+a_3	0.336373953934809	0.521412085356266	0.281632887739949	0.67004516763179	0.0199332367594847	0.867732114278491	0.973477443505332	0.883197938525362	0.334509105447652	0.793947578560618	0.465167375556954	0.508757674191867	0.983758014396725	0.100582744588671	0.501301982240787	0.789637338939369	0.967382850752139
+b_3	0.65083934802851	0.915695024588	0.0376667088550816	0.514003854683931	0.274761574286474	0.652108809243866	0.689393057486628	0.262205073769319	0.871958663956254	0.709490850507154	0.854477673591409	0.672918329289054	0.141693817710263	0.00543057257281332	0.273084303937691	0.39570748778882	0.303196826092465
+c_3	0.798331012769621	0.806128809071498	0.519974578571807	0.0237856823099186	0.396426673475168	0.75979784245693	0.0589336105092753	0.763144123705766	0.16086904822931	0.301000258395631	0.321186481311644	0.0091434029302796	0.0346149352313591	0.276366137673702	0.686099471259438	0.0548240244354505	0.909361338008149
+a_4	0.981561422839383	0.755973696318293	0.328878596436459	0.233341270249666	0.14569201922932	0.458105216271765	0.191023237667199	0.775603857680909	0.146769440956804	0.86812372109824	0.601678275863019	0.782019307745586	0.955614654474782	0.836058192741214	0.454550085076576	0.181788519803465	0.325277631599655
+b_4	0.920089977342539	0.249031996586174	0.105577675363886	0.805216649434891	0.505774902707566	0.619612431793644	0.337662179244335	0.672829320507873	0.387228581340173	0.209795853201976	0.0403285073621635	0.540614252108851	0.43362855410287	0.160204078494507	0.924783730297701	0.116837628312753	0.58763473928668
+c_4	0.418651623550921	0.668434005412235	0.845525871017258	0.567468950919516	0.111441846749533	0.411424602517146	0.0743349602270699	0.583730221710347	0.0105008018078939	0.918789674284249	0.808643595994088	0.33578972219198	0.536848200622412	0.898842910125025	0.333954421105444	0.0390509357521919	0.159857705429294
+a_5	0.3266193089274	0.806668730531573	0.87265879590923	0.934940869880726	0.548967615908753	0.250539517744596	0.75436043048449	0.597444122305604	0.343955002787363	0.560987092777944	0.134929631392942	0.958047956861493	0.870429681664852	0.66286672214456	0.441523248613101	0.437073092741238	0.265031623006715
+b_5	0.462672931523031	0.74679446664976	0.151929368261195	0.165870989887449	0.90931621240424	0.423706631494886	0.337742032589001	0.184993498717115	0.0792523932129463	0.071353352835237	0.525247607449536	0.647744088759121	0.158725526449032	0.203927461340644	0.20055683200405	0.897053444943847	0.506954538974894
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/test-data/output1_IDc_variableMetadata.tabular	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,18 @@
+newID	variable	A	B	C	D
+a	5d_-kkcùf	0	a	ze$ùj	0
+b	npèt	1	b	 g	0
+c	5PY4(*3	2	c	 15j-è,	0
+a_1	k	3	a	6jè	1
+b_1	t v^ptok!R/; 	4	b	8j4,	1
+c_1	ojt*	5	c	5èj1	1
+a_2	lmtki	6	a	j84	2
+b_2	1h6-(587 t	7	b	j4e54	2
+c_2	r154 (54 86	8	c	j	2
+a_3	(h4 	9	a	54j6@44èu6(è4	3
+b_3	2	10	b	(51h	3
+c_3	 m(yk	11	c	8-1	3
+a_4	 -546 -3 -3	12	a	hy-81u	4
+b_4	nz^à  t 	13	b	zs5-hj1	4
+c_4	kzjù	14	c	861h	4
+a_5	. Glk(ôepjg$	15	a	(8168(h1	9
+b_5	rmlgj*lr ,	16	b	8hjè1	9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/test-data/output2_IDc_dataMatrix.tabular	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,18 @@
+sample	a	b	c	d	b_1	a_1	r	c_1	f	s	b_2	b_3	r_1	a_2	a_3	k	d_1
+5d_-kkcùf	0.356426723610756	0.380152310071702	0.0306944207412024	0.334137638848017	0.298147485608469	0.975073793297568	0.129099504745855	0.973451663994064	0.334792719284834	0.0751565260418877	0.322897933010729	0.129033714279026	0.722966330196726	0.580654367692078	0.644502528016206	0.352827235332827	0.511778286438001
+npèt	0.801750949101246	0.535593104115636	0.258351312473067	0.599475573145688	0.0763319665667417	0.504558103160623	0.367963830290116	0.440540211857668	0.158066366765388	0.609574253877002	0.550590276177951	0.232864384033621	0.637065775537391	0.424098276140436	0.662053737304139	0.0217541227637467	0.299053946391647
+5PY4(*3	0.875199970420953	0.0825428101366147	0.253659010703906	0.507762246807195	0.856444177031262	0.291594962324086	0.616538655402613	0.388475672176377	0.914254939740854	0.449607330807756	0.628469388494906	0.436558212905713	0.951198610265672	0.956459387015831	0.0113483457928278	0.611559621193868	0.127393349941781
+k	0.235214515530521	0.50917637648828	0.0303152651414629	0.305595242012361	0.470145996588881	0.356776179776951	0.569840649303474	0.720070419680388	0.875026990189028	0.97246313990283	0.936423978578332	0.810603455355391	0.903046784946495	0.667091730522105	0.0282601148338295	0.276666638740528	0.747503427028951
+t v^ptok!R/; 	0.251801918471682	0.871383805557867	0.285183681272061	0.552739436194454	0.863766301215097	0.182656918760194	0.977603710051043	0.204845724382198	0.751690583305025	0.751475804910098	0.938399878874186	0.218163132174348	0.523463794277572	0.987156468237196	0.630938391969655	0.495061607430081	0.815474132321848
+ojt*	0.907412839750932	0.857498273276021	0.370137361785406	0.76678484779183	0.213299689296413	0.521214352529346	0.0851731095099456	0.868227767553325	0.0711706993343434	0.70186429888193	0.700568035764899	0.7467824290166	0.570332959002042	0.23270290523468	0.126423339798572	0.816262268500797	0.466363859676536
+lmtki	0.344288940919619	0.308219131305663	0.218449898667526	0.700869668247368	0.932538878977527	0.396198994630489	0.710306820874376	0.124235068279782	0.56608643523601	0.887647287670482	0.0375011938139768	0.282378766400105	0.757492159558571	0.506567258021703	0.990910788272054	0.326205008250378	0.61003856679129
+1h6-(587 t	0.308709890328272	0.717202505490233	0.777934118812417	0.604807545422864	0.588458968776734	0.940112596977594	0.788662314418432	0.133046934771924	0.891405172730758	0.915119678712577	0.401136527896346	0.996068607925829	0.049077648050296	0.157657286859101	0.598183619914656	0.439531332356748	0.11995300831499
+r154 (54 86	0.0861033910635205	0.243889357950567	0.848801588667359	0.972183114768299	0.311829870889657	0.434854970574638	0.0240613698880671	0.273335646139236	0.902686361056168	0.73479376111027	0.232132726965829	0.471097756642369	0.511949019774828	0.934158039531663	0.60125450357768	0.972297241140637	0.63149263296722
+(h4 	0.336373953934809	0.521412085356266	0.281632887739949	0.67004516763179	0.0199332367594847	0.867732114278491	0.973477443505332	0.883197938525362	0.334509105447652	0.793947578560618	0.465167375556954	0.508757674191867	0.983758014396725	0.100582744588671	0.501301982240787	0.789637338939369	0.967382850752139
+2	0.65083934802851	0.915695024588	0.0376667088550816	0.514003854683931	0.274761574286474	0.652108809243866	0.689393057486628	0.262205073769319	0.871958663956254	0.709490850507154	0.854477673591409	0.672918329289054	0.141693817710263	0.00543057257281332	0.273084303937691	0.39570748778882	0.303196826092465
+ m(yk	0.798331012769621	0.806128809071498	0.519974578571807	0.0237856823099186	0.396426673475168	0.75979784245693	0.0589336105092753	0.763144123705766	0.16086904822931	0.301000258395631	0.321186481311644	0.0091434029302796	0.0346149352313591	0.276366137673702	0.686099471259438	0.0548240244354505	0.909361338008149
+ -546 -3 -3	0.981561422839383	0.755973696318293	0.328878596436459	0.233341270249666	0.14569201922932	0.458105216271765	0.191023237667199	0.775603857680909	0.146769440956804	0.86812372109824	0.601678275863019	0.782019307745586	0.955614654474782	0.836058192741214	0.454550085076576	0.181788519803465	0.325277631599655
+nz^à  t 	0.920089977342539	0.249031996586174	0.105577675363886	0.805216649434891	0.505774902707566	0.619612431793644	0.337662179244335	0.672829320507873	0.387228581340173	0.209795853201976	0.0403285073621635	0.540614252108851	0.43362855410287	0.160204078494507	0.924783730297701	0.116837628312753	0.58763473928668
+kzjù	0.418651623550921	0.668434005412235	0.845525871017258	0.567468950919516	0.111441846749533	0.411424602517146	0.0743349602270699	0.583730221710347	0.0105008018078939	0.918789674284249	0.808643595994088	0.33578972219198	0.536848200622412	0.898842910125025	0.333954421105444	0.0390509357521919	0.159857705429294
+. Glk(ôepjg$	0.3266193089274	0.806668730531573	0.87265879590923	0.934940869880726	0.548967615908753	0.250539517744596	0.75436043048449	0.597444122305604	0.343955002787363	0.560987092777944	0.134929631392942	0.958047956861493	0.870429681664852	0.66286672214456	0.441523248613101	0.437073092741238	0.265031623006715
+rmlgj*lr ,	0.462672931523031	0.74679446664976	0.151929368261195	0.165870989887449	0.90931621240424	0.423706631494886	0.337742032589001	0.184993498717115	0.0792523932129463	0.071353352835237	0.525247607449536	0.647744088759121	0.158725526449032	0.203927461340644	0.20055683200405	0.897053444943847	0.506954538974894
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IDchoice/test-data/output2_IDc_sampleMetadata.tabular	Thu Oct 11 05:47:29 2018 -0400
@@ -0,0 +1,18 @@
+newID	data	ABCD	E	AAA	fp	uv
+a	j 785	1	91	a	a	s
+b	y54j 68y4j6	2	60	b	z	d
+c	5-6 4	2	43	c	e	f
+d	hrh	3	24	d	r	s
+b_1	5h -	4	29	b	t	d
+a_1	3	56	71	a	y	f
+r	t564	4	4	r	u	s
+c_1	t54 66	23	91	c	i	d
+f	y6y	5	61	f	o	f
+s	t6 5h	8	21	s	p	s
+b_2	(5y	98	77	b	q	d
+b_3	g51	67	1	b	s	f
+r_1	(	98	48	r	d	s
+a_2	6	2	10	a	f	d
+a_3	98 j7-0	1	36	a	g	f
+k	06654h	34	100	k	h	s
+d_1	60	67	38	d	j	d