Closed ivykos closed 1 year ago
I converted a Seurat object into a SingleCellExperiment object and then attempted to run spatialCluster() on the data with the following code
s1 <- Load10X_Spatial("Sample_V108-ILS19526ova-A", assay="Spatial") s1 <- FindVariableFeatures(s1) s1 <- ScaleData(s1) s1 <- RunPCA(s1) s1_sce <- as.SingleCellExperiment(s1) colData(s1_sce) = cbind(colData(s1_sce), s1@images$slice1@coordinates) #add spatial info to SCE s1_sce <- spatialPreprocess(s1_sce, platform = "Visium", skip.PCA = TRUE, log.normalize = FALSE) s1_sce <- spatialCluster(s1_sce, nrep=1000, burn.in = 100, q =10)
However, it returned the following error
Error in neighbor.positions$col + neighbor.positions$x.offset : non-numeric argument to binary operator
Any idea what might be causing this?
Edit: I solved this problem. See https://stackoverflow.com/questions/73131436/error-in-funleft-right-non-numeric-argument-to-binary-operator-when-runni
I converted a Seurat object into a SingleCellExperiment object and then attempted to run spatialCluster() on the data with the following code
However, it returned the following error
Any idea what might be causing this?