KlugerLab / GeneTrajectory

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

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

Open handesome opened 6 months ago

handesome commented 6 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 6 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 6 months ago

Thanks! it works now/