美文网首页
单细胞分析中的去批次问题-Harmony包

单细胞分析中的去批次问题-Harmony包

作者: expgene | 来源:发表于2023-08-18 15:34 被阅读0次

使用Harmony去批次:

安装

library(devtools)

install_github("immunogenomics/harmony")

devtools的安装:

install.packages("devtools")

运行方法:

知乎-10X单细胞(10X空间转录组)分析回顾之harmony的各种运用(联合NMF和python的harmonypy)

腾讯云-单细胞转录组 | 多样本处理与Harmony整合

CSDN-Harmony | 超好用的单细胞测序数据合并(3‘和5‘数据合并)(二)

案例演示:

运行harmony步骤之前,要对seurat数据结构进行了NormalizeData,FindVariableFeatures,ScaleData,RunPCA等操作。

seurat数据结构里的meta.data,要添加一列,注明每个细胞来自哪个样本。去批次根据这个信息识别细胞来自不同的标本。例如作者增加了一列叫group的列名。

Seurat@meta.data$group <- xxx

library(harmony)

library(Seurat)

Seurat <- RunHarmony(all10x.Seurat,"group")

Seurat <- RunTSNE(object = Seurat, dims.use=1:15,do.fast=TRUE,reduction="harmony")

Seurat <- FindNeighbors(object = Seurat,reduction="harmony",dims=1:15)

Seurat <- FindClusters(object = Seurat,resolution = 1)

DimPlot(Seurat,reduction = "tsne",label = FALSE,group.by = "group",raster=FALSE) #注意,由于本例子的细胞数比较多,有15万,所以raster参数为FALSE

原理:

参考:

Harmony整合单细胞数 (https://www2.jianshu.com/p/4c36c1ce1b5f)

单细胞多样本整合之harmony

单细胞分析实录(6): 去除批次效应/整合数据

相关文章

网友评论

      本文标题:单细胞分析中的去批次问题-Harmony包

      本文链接:https://www.haomeiwen.com/subject/avrdmdtx.html