RubD / Giotto_site

Website for the Giotto spatial toolbox
MIT License
4 stars 6 forks source link

Error in running interactive seelction in R studio : Object of type 'S4' cannot be indexed #15

Closed hndyilm closed 12 months ago

hndyilm commented 1 year ago

Hello everyone,

While running the interactive selection in Giotto in R studio, I get an error:

Load visium data

load("C:/Users/yilmazha/Desktop/visium_data.Robj") #That works

Transform the data.table or data.frame with coordinates into a Giotto polygon object

my_giotto_polygons <- createGiottoPolygonsFromDfr(my_polygon_coordinates, name = 'selections') #That works

Add the polygons to the Giotto object

visium_data <- addGiottoPolygons(gobject = visium_data, gpolygons = list(my_giotto_polygons)) #That works

While I am adding polygon ID to cell metadata in R studio, I get such an error:

Error in cellMeta[] <- data.table::copy(cellMeta[]) : Object of type 'S4' cannot be indexed

Add the corresponding polygon ID to the cell Metadata.Using the default parameters

visium_data <- addPolygonCells(visium_data, polygon_name = 'selections') #That does not work

Any tips about that? Thanks in advance.