msraredon / NICHES

Niche Interactions and Cellular Heterogeneity in Extracellular Signaling
https://msraredon.github.io/NICHES/
49 stars 15 forks source link

Error in `$<-.data.frame`(`*tmp*`, "x", value = character(0)) #41

Closed annaminyifeng closed 4 months ago

annaminyifeng commented 4 months ago

Hello,

I am trying to run NICHES on one of my Slide-seq experiments which has been converted to a Seurat object (v5) but I receiving the error: Error in $<-.data.frame(*tmp*, "x", value = character(0)) : replacement has 0 rows, data has 9059.

I am using the following code: NICHES_output <- RunNICHES(object = CTL1, LR.database = "fantom5", species = "human", assay = 'alra', # Note: using alra imputed data here instead of SCT cell_types = "CellType", CellToCellSpatial = T, # We are interested in local relationships NeighborhoodToCell = T, # We are interested in local niches CellToCell = F, # We do not want crosses which don't take into account spatial information position.x = "SPATIAL_1", position.y= "SPATIAL_2", meta.data.to.map = c('orig.ident','CellType'))

I'm not quite sure where the error is stemming from. Any advice would be greatly appreciated!

annaminyifeng commented 4 months ago

I thought I would leave this reply in case others run into the same error as me. I realized that renaming the columns called SPATIAL_1 and SPATIAL_2 to x and y worked for me!