satijalab / seurat

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

FindVariableFeatures of Sketch-based analysis #9015

Closed BenxiaHu closed 3 months ago

BenxiaHu commented 3 months ago

Hello, based on https://satijalab.org/seurat/articles/seurat5_sketch_analysis, obj <- NormalizeData(obj) obj <- FindVariableFeatures(obj) obj <- SketchData( object = obj, ncells = 50000, method = "LeverageScore", sketched.assay = "sketch" ) the obj has normlaizaed values, and subsample 50000 cells.

for Perform clustering on the sketched dataset, DefaultAssay(obj) <- "sketch" obj <- FindVariableFeatures(obj) obj <- ScaleData(obj)

I do not understand why FindVariableFeatures is run 2 times. please explain a little bit.

zskylarli commented 3 months ago

Hi - FindVariableFeatures is run twice because the first run identifies variable features on the full dataset, ensuring a comprehensive selection of informative genes, while the second run identifies variable features on the sketched subset, which may have different variability characteristics. We'll close this issue for now but please feel free to redirect more analysis-related questions to the Discussions board if you have any!