satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.18k stars 891 forks source link

Can't find variable features after merging the seurat objects #9038

Open XLS987 opened 1 week ago

XLS987 commented 1 week ago

Hello,

I am using the Seurat V5. After I merged my 4 seurat objects, the FindVariableFeatures() function produces error like this: Error in VariableFeatures(): ! No variable features found image

But when I ran the FindVariableFeatures() for each seurat object individually, it passed.

My code is like below: merged_seurat <- merge(seuratobj1, y = list(seuratobj2, seuratobj3, seuratobj4), add.cell.ids = c("condition1", "condition2", "condition3", "condition4")) obj <- NormalizeData(merged_seurat) obj <- FindVariableFeatures(obj, selection.method = "vst", nfeatures = 2000)

image

zskylarli commented 1 week ago

Hi - it seems like the object has not been normalized properly, since there are no data layers in the merged_seurat object; did you inspect the object after running NormalizeData? FindVariableFeatures should find variable features by layer, so merging should not alter the behavior if it worked previous to merging.