diff runit/heatmap_tests.R @ 0:81ffd91ba495 draft default tip

planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit bbfc13f2e4fa9e7e5b562c96d0e570318d3482d9
author ethevenot
date Tue, 24 Oct 2017 09:32:23 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runit/heatmap_tests.R	Tue Oct 24 09:32:23 2017 -0400
@@ -0,0 +1,57 @@
+test_input_cut4 <- function() {
+
+    testDirC <- "input"
+    argLs <- list(disC = "1-cor",
+                  cutSamN = "4",
+                  cutVarN = "3",
+                  corMetC = "spearman",
+                  aggMetC = "ward",
+                  colC = "blueOrangeRed",
+                  scaL = "TRUE",
+                  cexN = "0.8")
+
+    argLs <- c(defaultArgF(testDirC), argLs)
+    outLs <- wrapperCallF(argLs)
+ 
+    checkEqualsNumeric(outLs[['samDF']][13, 'heat_clust'], 4)
+
+}
+
+test_exa1_cut3 <- function() {
+
+    testDirC <- "exa1"
+    argLs <- list(disC = "1-cor",
+                  cutSamN = "3",
+                  cutVarN = "4",
+                  corMetC = "spearman",
+                  aggMetC = "ward",
+                  colC = "blueOrangeRed",
+                  scaL = "TRUE",
+                  cexN = "1")
+
+    argLs <- c(defaultArgF(testDirC), argLs)
+    outLs <- wrapperCallF(argLs)
+
+    checkEqualsNumeric(outLs[['varDF']]['V24', 'heat_clust'], 4)
+
+}
+
+test_exa2_cut4 <- function() {
+
+    testDirC <- "exa2"
+    argLs <- list(disC = "1-cor",
+                  cutSamN = "1",
+                  cutVarN = "1",
+                  corMetC = "spearman",
+                  aggMetC = "ward",
+                  colC = "blueOrangeRed",
+                  scaL = "TRUE",
+                  cexN = "1")
+
+    argLs <- c(defaultArgF(testDirC), argLs)
+    outLs <- wrapperCallF(argLs)
+
+    checkEquals(outLs[['varDF']]['V31', 'meta2'], 'AM')
+
+}
+