Browse code

Update LISA.R

Fix class issue

Ellis Patrick authored on 14/11/2022 00:11:17 • GitHub committed on 14/11/2022 00:11:17
Showing 1 changed files

  • R/LISA.R index c8afe66..58f3be6 100644
... ...
@@ -483,7 +483,7 @@ prepCellSummary <- function(cells, spatialCoords, cellType, imageID, region = NU
483 483
     cellSummary <- spicyR::cellSummary(data, bind = bind)
484 484
   }
485 485
   
486
-  if (is(cells, "SingleCellExperiment")) {
486
+  if (class(cells) == "SingleCellExperiment") {
487 487
     cells <- colData(cells)
488 488
     data <- SegmentedCells(cells, 
489 489
                             spatialCoords = spatialCoords,
... ...
@@ -493,7 +493,7 @@ prepCellSummary <- function(cells, spatialCoords, cellType, imageID, region = NU
493 493
     cellSummary <- spicyR::cellSummary(data, bind = bind)   
494 494
   }
495 495
   
496
-  if (is(cells, "SpatialExperiment")) {
496
+  if (class(cells) == "SpatialExperiment") {
497 497
     cells <- cbind(colData(cells), spatialCoords(cells))
498 498
     data <- SegmentedCells(cells, 
499 499
                             spatialCoords = spatialCoords,