... | ... |
@@ -247,7 +247,7 @@ renderCeldaHeatmap <- function(counts, z = NULL, y = NULL, |
247 | 247 |
#' @import graphics |
248 | 248 |
#' @export |
249 | 249 |
absoluteProbabilityHeatmap <- function(counts, celda.mod, main = NA){ |
250 |
- factorized <- factorizeMatrix(celda.mod = model, counts = counts) |
|
250 |
+ factorized <- factorizeMatrix(celda.mod = celda.mod, counts = counts) |
|
251 | 251 |
pop <- factorized$proportions$population.states |
252 | 252 |
z <- 1:ncol(pop) |
253 | 253 |
y <- 1:nrow(pop) |
254 | 254 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,15 @@ |
1 |
+# celda_C.R |
|
2 |
+library(celda) |
|
3 |
+library(Rtsne) |
|
4 |
+context("Testing celda Visualization Experiments") |
|
5 |
+ |
|
6 |
+load("../celdaCGsim.rda") |
|
7 |
+load("../celdaCG.rda") |
|
8 |
+model_CG = getModel(celdaCG.res, K = 5, L=3)[[1]] |
|
9 |
+factorized <- factorizeMatrix(celda.mod = model_CG, counts = celdaCG.sim$counts) |
|
10 |
+counts.matrix <- celdaCG.sim$counts |
|
11 |
+ |
|
12 |
+test_that(desc = "Testing that absoluteProbabilityHeatmap runs",{ |
|
13 |
+ plot.obj = absoluteProbabilityHeatmap(counts=counts.matrix, celda.mod=model_CG) |
|
14 |
+ expect_true(!is.null(plot.obj)) |
|
15 |
+}) |