diff tests/heatmap_tests.R @ 0:ad06aeed02c9 draft

planemo upload for repository https://github.com/workflow4metabolomics/heatmap.git commit 7e599d006e53fefb7e1b923ba8894b4fb19f9cfa-dirty
author ethevenot
date Tue, 02 Aug 2016 06:26:41 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/heatmap_tests.R	Tue Aug 02 06:26:41 2016 -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')
+
+}
+