Browse code

Store spot coordinates into spatialCoords

Gabriele Sales authored on 27/01/2023 18:31:41
Showing 2 changed files

... ...
@@ -34,7 +34,6 @@ Imports:
34 34
     methods,
35 35
     SummarizedExperiment,
36 36
     Matrix,
37
-    S4Vectors,
38 37
     ggplot2,
39 38
     ggrepel,
40 39
     scales,
... ...
@@ -49,8 +49,7 @@ mockSVG <- function(size = 10, tot_genes = 1000, de_genes = 100,
49 49
     if (return_SPE) {
50 50
         out <- SpatialExperiment::SpatialExperiment(
51 51
             assays = list(counts = counts),
52
-            spatialData = S4Vectors::DataFrame(coordinates),
53
-            spatialCoordsNames = c("x", "y")
52
+            spatialCoords = as.matrix(coordinates)
54 53
         )
55 54
     }
56 55
     out