diff univariate_script.R @ 2:09799fc16bc6 draft

planemo upload for repository https://github.com/workflow4metabolomics/univariate.git commit 2c0d4d97c208edca1ada2035a7b7af9c4eb31afe
author ethevenot
date Sat, 06 Aug 2016 12:42:42 -0400
parents ef64d3752050
children 140290de7986
line wrap: on
line diff
--- a/univariate_script.R	Sat Jul 30 12:38:02 2016 -0400
+++ b/univariate_script.R	Sat Aug 06 12:42:42 2016 -0400
@@ -54,7 +54,7 @@
         sigVn <- as.numeric(fdrVn < thrN)
 
         if(tesC %in% c("ttest", "wilcoxon"))
-            varPfxC <- paste0(varPfxC, paste(rev(facLevVc), collapse = "-"), "_")
+            varPfxC <- paste0(varPfxC, paste(rev(facLevVc), collapse = "."), "_")
 
         varDF[, paste0(varPfxC, ifelse(tesC %in% c("ttest", "wilcoxon"), "dif", "cor"))] <- staVn
 
@@ -67,6 +67,8 @@
         ## getting the names of the pairwise comparisons 'class1Vclass2'
         prwVc <- rownames(TukeyHSD(aov(datMN[, 1] ~ facFcVn))[["facFcVn"]])
 
+        prwVc <- gsub("-", ".", prwVc, fixed = TRUE) ## 2016-08-05: '-' character in dataframe column names seems not to be converted to "." by write.table on ubuntu R-3.3.1
+
         aovMN <- t(apply(datMN, 2, function(varVn) {
 
             aovMod <- aov(varVn ~ facFcVn)
@@ -97,9 +99,9 @@
         nemVl <- c(lower.tri(nemMN, diag = TRUE))
         nemClaMC <- cbind(rownames(nemMN)[c(row(nemMN))][nemVl],
                           colnames(nemMN)[c(col(nemMN))][nemVl])
-        nemNamVc <- paste0(nemClaMC[, 1], "-", nemClaMC[, 2])
+        nemNamVc <- paste0(nemClaMC[, 1], ".", nemClaMC[, 2])
         nemNamVc <- paste0(varPfxC, nemNamVc)
-
+        
         nemMN <- t(apply(datMN, 2, function(varVn) {
 
             pvaN <- kruskal.test(varVn ~ facFcVn)[["p.value"]]