diff --git a/DESCRIPTION b/DESCRIPTION index 5442163..7bf273a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,7 +18,7 @@ Description: clustSIGNAL: clustering of Spatially Informed Gene expression with License: GPL-2 Encoding: UTF-8 LazyData: true -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 Depends: R (>= 4.0.0), SpatialExperiment, doParallel Imports: BiocNeighbors, bluster, scater, aricode, distances, cluster, ggplot2, patchwork, BiocStyle Suugests: knitr, rmarkdown diff --git a/R/clustering.R b/R/clustering.R index 6295ee8..692ef5c 100644 --- a/R/clustering.R +++ b/R/clustering.R @@ -50,7 +50,7 @@ nsClustering <- function(spe, dimRed, reclust, ...) { second = bluster::NNGraphParam(k = 5, cluster.fun = "louvain"))) subclusters_list[[c]] <- setNames(paste0(c, ".", nsClustX), colnames(speX)) } - spe$nsSubcluster <- unlist(subclusters_list)[colnames(spe)] + spe$nsSubcluster <- factor(unlist(subclusters_list)[colnames(spe)]) print(paste("Nonspatial subclustering performed. Subclusters =", length(unique(spe$nsSubcluster)), Sys.time())) } else if (reclust == TRUE) { diff --git a/R/entropyMeasure.R b/R/entropyMeasure.R index f44ec8d..8a0bcb1 100644 --- a/R/entropyMeasure.R +++ b/R/entropyMeasure.R @@ -42,7 +42,7 @@ entropyMeasure <- function(spe, cells, regXclust, threads) { } else if (check.NA.values != 0) { stop("Missing entropy values.") } else { - spe$entropy <- as.matrix(unlist(regEntropy)) + spe$entropy <- as.vector(unlist(regEntropy)) print(paste("Region domainness calculated.", Sys.time())) } return(spe)