02.取细胞子集后的Seurat标准流程(简洁版)

在项目取子集后,需要对所取细胞子集进行重新聚类分群,这里提供简洁的流程代码。
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数量
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')

对于最佳PC数量的选择建议结合,先前文章01.单细胞降维最佳PC数量选取

你可能感兴趣的:(02.取细胞子集后的Seurat标准流程(简洁版))