Seurat -- Introduction to scRNA-seq integration 跟随学习记录

本文详细介绍了在Seurat中对RNA-seq数据进行预处理、标准化(如NormalizeData和ScaleData)、PCA分析、聚类(FindClusters)以及样本整合(IntegrateLayers)的过程,展示了如何从原始ifnb数据对象逐步构建和优化数据对象以进行后续分析。
摘要由CSDN通过智能技术生成

数据是如何转换的

seurat object 中assays R N A @ l a y e r s RNA@layers RNA@layerscounts 存放了 expression matrix (counts)
NormalizeData(sce) 后 assays R N A @ l a y e r s RNA@layers RNA@layersdata 存放了 normalization后的数据
FindVariableFeatures(sce) 就是把一些细胞高表达一些细胞低表达的高变基因抽出来放在 assays R N A @ f e a t u r e s 下面 S c a l e D a t a ( s c e ) 把上述的高变基因中心化,数据放在 a s s a y s RNA@features下面 ScaleData(sce) 把上述的高变基因中心化,数据放在assays RNA@features下面ScaleData(sce)把上述的高变基因中心化,数据放在assaysRNA@layers$scale.data 下面

RunPCA(sce) 使用assays R N A @ l a y e r s RNA@layers RNA@layersscale.data 数据进行PCA降维
FindNeighbors(sce) 根据PCA结果@reductions$pca 构建SNN图 结果放在@graphs下面

FindClusters(sce) 根据@graphs下面的数据寻找cluster 结果放到 @meta.data$unintegrated_clusters 下面

如果进行了样本整合:
IntegrateLayers(object = sce, method = CCAIntegration, orig.reduction = “pca”, new.reduction = “integrated.cca”)该方法使用PCA和scale.data下面的数据进行学习,产生一个新的降维数据 @reductions$integrated.cca,然后这个降维数据用于后续的构建SNN图和聚类

原始ifnb数据对象

library(Seurat)
library(SeuratData)
library(patchwork)

# install dataset
InstallData("ifnb")

# load dataset
ifnb <- LoadData("ifnb")

原始的ifnb数据对象是什么样子?
在这里插入图片描述

Splits object后的数据对象

在这里插入图片描述

数据对象构建完成后的标准流程

# run standard anlaysis workflow
ifnb <- NormalizeData(ifnb)
ifnb <- FindVariableFeatures(ifnb)
ifnb <- ScaleData(ifnb)
ifnb <- RunPCA(ifnb)

ifnb <- FindNeighbors(ifnb, dims = 1:30, reduction = "pca")
ifnb <- FindClusters(ifnb, resolution = 2, cluster.name = "unintegrated_clusters")

ifnb <- RunUMAP(ifnb, dims = 1:30, reduction = "pca", reduction.name = "umap.unintegrated")
DimPlot(ifnb, reduction = "umap.unintegrated", group.by = c("stim", "seurat_clusters"))

ifnb <- RunUMAP(ifnb, dims = 1:30, reduction = "integrated.cca")

在这里插入图片描述

Normalization后的数据对象

在这里插入图片描述

scale 后的数据对象

在这里插入图片描述

不同的样本进行整合

ifnb <- IntegrateLayers(object = ifnb, method = CCAIntegration, orig.reduction = "pca", new.reduction = "integrated.cca",
    verbose = FALSE)

# re-join layers after integration
ifnb[["RNA"]] <- JoinLayers(ifnb[["RNA"]])

ifnb <- FindNeighbors(ifnb, reduction = "integrated.cca", dims = 1:30)
ifnb <- FindClusters(ifnb, resolution = 1)
JoinLayers干了什么

在这里插入图片描述

  • 22
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值