KlugerLab / GeneTrajectory

R implementation of GeneTrajectory
https://www.nature.com/articles/s41587-024-02186-3
45 stars 9 forks source link

No cell overlap between new meta data and Seurat object #8

Open handesome opened 5 months ago

handesome commented 5 months ago

Hi! Thank you for developing the package!when I download human_myeloid_seurat_obj.rds and run the vignette data_S$celltype <- cluster_relabel[as.character(data_S$cluster)] error: No cell overlap between new meta data and Seurat object so how to solve the problem?Thanks!!

RihaoQu commented 5 months ago

Hi, if you are using Seurat v5, you can try to update the object by

library(SeuratObject)
data_S = SeuratObject::UpdateSeuratObject(data_S)

Then, change the following line in the first code block to

data_S@meta.data$celltype <- cluster_relabel[as.character(data_S$cluster)]

Hope this can solve the issue.

handesome commented 5 months ago

Thanks! it works now/