Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
csangara committed Oct 1, 2024
1 parent 20f39e7 commit 41b7f39
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions unit-test/test_run_dataset.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
library(testthat)

methods_all <- c("cell2location", "destvi", "music", "rctd",
"spatialdwls", "spotlight", "stereoscope")
"spatialdwls", "spotlight", "stereoscope",
"nnls", "dstg", "stride", "tangram", "seurat")
methods <- strsplit(commandArgs(trailingOnly=TRUE), ",")[[1]]

if (methods[1] == "all"){ methods <- methods_all }
Expand Down Expand Up @@ -39,8 +40,9 @@ for (method in methods){
output_metrics <- read.table(paste0("results/test_sp_data/metrics_", method, "_test_sp_data"),
sep=" ", header=TRUE)
metric_names <- c("corr", "RMSE", "accuracy", "balanced_accuracy",
"sensitivity", "specificity", "precision", "F1", "F2", "prc")
expect_equal(ncol(output_metrics), 10)
"sensitivity", "specificity", "precision",
"F1", "F2", "prc", "roc", "jsd")
expect_equal(ncol(output_metrics), 12)
expect_equal(nrow(output_metrics), 1)
expect_equal(colnames(output_metrics), metric_names)

Expand Down

0 comments on commit 41b7f39

Please sign in to comment.