From 720b37a65faed4b10f7d7f162927ef768015bfa9 Mon Sep 17 00:00:00 2001 From: George Chen <72078254+jiajic@users.noreply.github.com> Date: Wed, 29 Jan 2025 22:32:24 -0500 Subject: [PATCH] fix: `identifyTMAcores()` add catch for 0 dim matrices in rbind --- NEWS.md | 4 ++++ R/spatial_clusters.R | 1 + 2 files changed, 5 insertions(+) diff --git a/NEWS.md b/NEWS.md index eb259f0bc..ac65f5929 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# Giotto 4.2.1 +## Bug fixes +* fix `identifyTMAcores()` when no overlap relations are found and an `rbind` error is thrown + # Giotto 4.2.0 (2024/01/17) ## Breaking Changes diff --git a/R/spatial_clusters.R b/R/spatial_clusters.R index 71f0bf292..f235533ba 100644 --- a/R/spatial_clusters.R +++ b/R/spatial_clusters.R @@ -231,6 +231,7 @@ identifyTMAcores <- function( # determine sorted pairs of overlaps apply(MARGIN = 2, sort) |> t() + if (any(dim(ovlp) == 0)) ovlp <- NULL return(ovlp) }) # combine test reps