六、左右倒卷肱
1、右倒卷肱
稍右转体 撤手托球 退步卷肱 虚步推掌
2、左倒卷肱
稍左转体 撤手托球 退步卷肱 虚步推掌
3、右倒卷肱
稍右转体 撤手托球 退步卷肱 虚步推掌
4、左倒卷肱
稍左转体 撤手托球 退步卷肱 虚步推掌
在此文中,我们提出了略微修改的工作流程,用于整合scRNA-seq数据集。与其使用典范的相关分析('CCA')来识别锚点,不如使用互惠的PCA('RPCA')。在使用RPCA确定任何两个数据集之间的锚点时,我们将每个数据集投影到其他PCA空间中,并通过相同的相互邻域要求约束这些锚点。这两个工作流程的命令在很大程度上是相同的,但是这两种方法可以在不同的上下文中应用。
通过识别数据集之间共享的变异来源,CCA非常适合在保存细胞类型时识别锚点,但是整个实验中的基因表达存在非常大的差异。因此,基于CCA的集成可以在实验条件或疾病状态引入非常强的表达偏移时,或者在跨模式和物种整合数据集时启用集成分析。但是,基于CCA的集成也可能导致过度校正,尤其是当大部分单元在数据集中不重叠时。
基于RPCA的整合运行速度明显加快,并且也代表了一种更为保守的方法,即处于不同生物学状态的细胞整合后不太可能“对齐”。因此,我们建议在进行综合分析时使用RPCA,其中:一个数据集中的大部分单元格中的其他单元格都不具有匹配类型数据集源自同一平台(例如,多个泳道的10x基因组学)*存在大量的数据集或要集成的单元格(有关集成大型数据集的更多提示,请参阅INSERT LINK)
下面,我们演示了使用倒数PCA来对齐在我们对scRNA-seq整合小插图的介绍中首先分析的相同刺激数据和静止数据集。尽管命令列表几乎相同,但是此工作流要求用户在集成之前分别在每个数据集上运行主成分分析(PCA)。在运行时,用户还应将'reduction'参数设置为'rpca' FindIntegrationAnchors()`。
library(SeuratData)
# install dataset
InstallData("ifnb")
# load dataset
LoadData("ifnb")
# split the dataset into a list of two seurat objects (stim and CTRL)
ifnb.list <- SplitObject(ifnb, split.by = "stim")
# normalize and identify variable features for each dataset independently
ifnb.list <- lapply(X = ifnb.list, FUN = function(x) {
x <- NormalizeData(x)
x <- FindVariableFeatures(x, selection.method = "vst", nfeatures = 2000)
})
# select features that are repeatedly variable across datasets for integration run PCA on each
# dataset using these features
features <- SelectIntegrationFeatures(object.list = ifnb.list)
ifnb.list <- lapply(X = ifnb.list, FUN = function(x) {
x <- ScaleData(x, features = features, verbose = FALSE)
x <- RunPCA(x, features = features, verbose = FALSE)
})
执行整合
然后,我们使用FindIntegrationAnchors()`函数来识别锚点,该函数将Seurat对象的列表作为输入,并使用这些锚点将两个数据集与集成在一起IntegrateData()。
immune.anchors <- FindIntegrationAnchors(object.list = ifnb.list, anchor.features = features, reduction = "rpca")
# this command creates an 'integrated' data assay
immune.combined <- IntegrateData(anchorset = immune.anchors)
现在,我们可以在所有单元上运行单个集成分析!
# specify that we will perform downstream analysis on the corrected data note that the original
# unmodified data still resides in the 'RNA' assay
DefaultAssay(immune.combined) <- "integrated"
# Run the standard workflow for visualization and clustering
immune.combined <- ScaleData(immune.combined, verbose = FALSE)
immune.combined <- RunPCA(immune.combined, npcs = 30, verbose = FALSE)
immune.combined <- RunUMAP(immune.combined, reduction = "pca", dims = 1:30)
immune.combined <- FindNeighbors(immune.combined, reduction = "pca", dims = 1:30)
immune.combined <- FindClusters(immune.combined, resolution = 0.5)
# Visualization
p1 <- DimPlot(immune.combined, reduction = "umap", group.by = "stim")
p2 <- DimPlot(immune.combined, reduction = "umap", group.by = "seurat_annotations", label = TRUE,
repel = TRUE)
p1 + p2
修改整合实力
结果表明,基于rpca的整合更为保守,在这种情况下,无法在整个实验中完美对齐细胞子集(即幼稚的T细胞和记忆T细胞)。您可以通过增加k.anchor
参数来增加对齐强度,该参数默认情况下设置为5。将此参数增加到20将有助于对齐这些总体。
immune.anchors <- FindIntegrationAnchors(object.list = ifnb.list, anchor.features = features, reduction = "rpca",
k.anchor = 20)
immune.combined <- IntegrateData(anchorset = immune.anchors)
immune.combined <- ScaleData(immune.combined, verbose = FALSE)
immune.combined <- RunPCA(immune.combined, npcs = 30, verbose = FALSE)
immune.combined <- RunUMAP(immune.combined, reduction = "pca", dims = 1:30)
immune.combined <- FindNeighbors(immune.combined, reduction = "pca", dims = 1:30)
immune.combined <- FindClusters(immune.combined, resolution = 0.5)
## Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
##
## Number of nodes: 13999
## Number of edges: 594589
##
## Running Louvain algorithm...
## Maximum modularity in 10 random starts: 0.9128
## Number of communities: 15
## Elapsed time: 4 seconds
# Visualization
p1 <- DimPlot(immune.combined, reduction = "umap", group.by = "stim")
p2 <- DimPlot(immune.combined, reduction = "umap", label = TRUE, repel = TRUE)
p1 + p2
现在已经集成了数据集,您可以按照scRNA-seq整合小插图介绍中的先前步骤进行操作,以识别细胞类型和特定于细胞类型的反应。
对使用SCTransform标准化的数据集执行集成
再举一个例子,我们重复上面的分析,但是使用SCTransform标准化了数据集。我们可以选择将method
参数设置为glmGamPoi
(在此处安装),以便能够更快地估算中的回归参数SCTransform()`。
LoadData("ifnb")
ifnb.list <- SplitObject(ifnb, split.by = "stim")
ifnb.list <- lapply(X = ifnb.list, FUN = SCTransform, method = "glmGamPoi")
features <- SelectIntegrationFeatures(object.list = ifnb.list, nfeatures = 3000)
ifnb.list <- PrepSCTIntegration(object.list = ifnb.list, anchor.features = features)
ifnb.list <- lapply(X = ifnb.list, FUN = RunPCA, features = features)
immune.anchors <- FindIntegrationAnchors(object.list = ifnb.list, normalization.method = "SCT",
anchor.features = features, dims = 1:30, reduction = "rpca", k.anchor = 20)
immune.combined.sct <- IntegrateData(anchorset = immune.anchors, normalization.method = "SCT", dims = 1:30)
immune.combined.sct <- RunPCA(immune.combined.sct, verbose = FALSE)
immune.combined.sct <- RunUMAP(immune.combined.sct, reduction = "pca", dims = 1:30)
# Visualization
p1 <- DimPlot(immune.combined.sct, reduction = "umap", group.by = "stim")
p2 <- DimPlot(immune.combined.sct, reduction = "umap", group.by = "seurat_annotations", label = TRUE,
repel = TRUE)
p1 + p2