在項(xiàng)目取子集后,需要對(duì)所取細(xì)胞子集進(jìn)行重新聚類分群,這里提供簡(jiǎn)潔的流程代碼。
sce <- NormalizeData(sce, normalization.method = "LogNormalize", scale.factor = 1e4)
sce <- FindVariableFeatures(sce, selection.method = 'vst', nfeatures = 2000)
sce[["percent.mt"]] <- PercentageFeatureSet(sce, pattern = "^MT-")
sce <- ScaleData(sce, vars.to.regress = "percent.mt")
sce <- RunPCA(sce, features = VariableFeatures(object = sce))
##選定下游分析PC數(shù)量
sce <- FindNeighbors(sce, dims = 1:40)
###更改聚類粒度
sce <- FindClusters(sce, resolution = 0.4 )
# Look at cluster IDs of the first 5 cells
head(Idents(sce), 5)
table(sce$seurat_clusters)
sce <- RunUMAP(sce, dims = 1:40)
DimPlot(sce, reduction = 'umap')
對(duì)于最佳PC數(shù)量的選擇建議結(jié)合,先前文章01.單細(xì)胞降維最佳PC數(shù)量選取