From b796a44fe4a98512a8e913434185f92a92b8eca2 Mon Sep 17 00:00:00 2001 From: toobiwankenobi Date: Thu, 5 Jun 2025 17:50:53 +0200 Subject: [PATCH 1/3] ignore NAs for rowSums2(). This was throwing an error before when NAs were present. --- R/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index 483674c..c713793 100644 --- a/R/utils.R +++ b/R/utils.R @@ -185,7 +185,7 @@ } loadNamespace("DelayedMatrixStats") } - cnts[MatrixGenerics::rowSums2(cnts) != 0, , drop = FALSE] + cnts[MatrixGenerics::rowSums2(cnts, na.rm = TRUE) != 0, , drop = FALSE] } # ----------------------------------------------------------------------------- From 273d1a13f1b4b1068bd607a30ef687f43997079d Mon Sep 17 00:00:00 2001 From: toobiwankenobi Date: Thu, 5 Jun 2025 17:52:31 +0200 Subject: [PATCH 2/3] fix the conversion from wide to long format. See issue #160 --- R/heatmapEnrichment.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/heatmapEnrichment.R b/R/heatmapEnrichment.R index be80a04..821f982 100644 --- a/R/heatmapEnrichment.R +++ b/R/heatmapEnrichment.R @@ -96,7 +96,7 @@ heatmapEnrichment <- function(input.data, # ---------- 4. long format for ggplot (base-R) -------------------------- long <- data.frame( variable = rep(gene.set, each = nrow(agg)), - value = as.vector(t(agg[gene.set])), + value = unlist(agg[gene.set], use.names = FALSE), group = rep(agg[[group.by]], times = length(gene.set)), stringsAsFactors = FALSE ) From cad1c944cfde9e7cdd230969a9eb783780985228 Mon Sep 17 00:00:00 2001 From: theHumanBorch Date: Thu, 5 Jun 2025 11:52:08 -0500 Subject: [PATCH 3/3] minor fix version bump --- DESCRIPTION | 2 +- NEWS.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1fa4b8d..772045e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: escape Title: Easy single cell analysis platform for enrichment -Version: 2.5.3 +Version: 2.5.4 Authors@R: c( person(given = "Nick", family = "Borcherding", role = c("aut", "cre"), email = "ncborch@gmail.com"), person(given = "Jared", family = "Andrews", role = c("aut"), email = "jared.andrews07@gmail.com"), diff --git a/NEWS.md b/NEWS.md index 17b327a..98e3fae 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# 2.5.4 (2025-06-05) + +## Bug fixes +* Fix conversion wide-to-long format for ```heatmapEnrichment()``` +* Fix issue with t() call on sparse matrices. + # 2.5.3 (2025-05-19) ## Highlights