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 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 ) 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] } # -----------------------------------------------------------------------------