How to deal with spatial data
ElyasMo opened this issue · 2 comments
Hi,
Although you mentioned before #26, I would like to ask for more assistance regarding how to deal with spatial data.
Considering that the current version of scCATCH do not support spatial data, I tried to treat my data as a single cell data set:
## Transform Seurat object to SingleCellExperiment object
Idents(HE_control_2) <- HE_control_2$seurat_clusters
sce.HE_control_2 <- as.SingleCellExperiment(HE_control_2)
But again after trying to annotate my dataset I receive an error:
clu_markers <- findmarkergenes(sce.HE_control_2,
species = "Human",
cluster = 'All',
match_CellMatch = TRUE,
cancer = NULL,
tissue = "Brain",
cell_min_pct = 0.25,
logfc = 0.25,
pvalue = 0.05)
Error in findmarkergenes(sce.HE_control_2, species = "Human", cluster = "All", :
trying to get slot "data" from an object of a basic class ("NULL") with no slots
Any ideas on how to make it work?
Thank you very much in advance.
Hello, you don't need to transform Seurat object to SingleCellExperiment object. You just need to make sure the normalized data is stored in the Seurat object by checking sce.HE_control_2[['RNA']]@data
Thank you for the response,
According to your guidance and as a complementary comment, I fixed the problem by following this procedure:
#Renaming the "SCT" assay to "RNA" which have normalized values in data slot.
HE_sample1_RNA <- RenameAssays(HE_sample_1, SCT="RNA")
#and next doing the annotation by scCATCH and it worked fine.