From f0d111ed967f844c87ad59063a74d320b94130f9 Mon Sep 17 00:00:00 2001 From: littlecabiria <71769896+littlecabiria@users.noreply.github.com> Date: Fri, 29 Nov 2024 16:00:44 +1100 Subject: [PATCH] update --- src/helpers/utils.R | 2 -- src/metrics/downstream/script.R | 1 - 2 files changed, 3 deletions(-) diff --git a/src/helpers/utils.R b/src/helpers/utils.R index 44301af..53747a7 100644 --- a/src/helpers/utils.R +++ b/src/helpers/utils.R @@ -20,8 +20,6 @@ generate_moransI <- function(adata) { generate_cosine <- function(real, sim) { - requireNamespace("lsa", quietly = TRUE) - real_new <- real[!is.na(real) & !is.na(sim)] sim_new <- sim[!is.na(real) & !is.na(sim)] similarity <- lsa::cosine(lsa::as.textmatrix(cbind(as.vector(real_new$Morans.I), as.vector(sim_new$Morans.I)))) diff --git a/src/metrics/downstream/script.R b/src/metrics/downstream/script.R index 21f7aa6..dacffe3 100644 --- a/src/metrics/downstream/script.R +++ b/src/metrics/downstream/script.R @@ -48,7 +48,6 @@ cat("spatial clustering evaluation\n") real_cluster <- input_real_sp$obs[, c("spatial_cluster")] sim_cluster <- generate_sim_spatialCluster(input_real_sp, input_simulated_sp) location <- rownames(input_simulated_sp) -location sim_new_cluster <- reclassify_simsce(location, real_cluster, sim_cluster) # ART and NMI