10X单细胞(10X空间转录组)批次去除(整合)分析之Scanorama

hello,大家好,今天我们来分享一下scanpy做整合分析的一个方法---Scanorama,关于这个方法,相信用过scanpy做数据分析的同学应该都不陌生,今天我们来分享一下,因为这个方法,在特定的情况下,效果最好。文献在Efficient integration of heterogeneous single-cell transcriptomes using Scanorama,2019年发表于Nature Biotechnology,影响因子36分。

我们简单回顾一下文献,代码么,大家应该都很熟悉了。

Abstract

1、but current methods for scRNA-seq data integration are limited by a requirement for datasets to derive from functionally similar cells(这个里面最典型的方法就是Seurat做整合分析的CCA).

2、We present Scanorama, an algorithm that identifies and merges the shared cell types among all pairs of datasets and accurately integrates heterogeneous collections of scRNA-seq data.(Scanorama可以保留数据之间的异质性,这个最重要)。

Introduction

1、these approaches automatically assume that all datasets share at least one cell type in common9 or that the gene expression profiles share largely the same correlation structure across all datasets。(找锚点的基本)这些方法,往往存在过矫正的问题,尤其数据本就存在生物学差异。

2、Scanorama:analogous to computer vision algorithms for panorama stitching that identify images with overlapping content and merge these into a larger panorama(Scanorama:类似于用于全景拼接的计算机视觉算法,可识别具有重叠内容的图像并将其合并为更大的全景图 ,也就是说做整合的时候,数据之间要有一些细胞类型是共有的)。

图片.png

3、Scanorama automatically identifies scRNA-seq datasets containing cells with similar transcriptional profiles and can leverage those matches for batch correction and integration,without also merging datasets that do not overlap。原理上还很不错的。

图片.png

图注:A similar strategy can also be used to merge heterogeneous scRNA-seq datasets. Scanorama searches nearest neighbors to identify shared cell types among all pairs of datasets. Dimensionality reduction techniques and an approximate nearest-neighbors algorithm based on hyperplane locality sensitive hashing and random projection trees greatly accelerates the search step. Mutually linked cells form matches that can be leveraged to correct for batch effects and merge experiments together (Methods), whereby the datasets forming connected components on the basis of these matches become a scRNA-seq ‘panorama’.

4、方法的优势Scanorama is robust to different dataset sizes and sources, preserves dataset-specific populations and does not require that all datasets share at least one cell population(重点就是does not require that all datasets share at least one cell population,保留数据本身的异质性)。

5、Our approach generalizes mutual nearest-neighbors matching, a technique that finds similar elements between two datasets, to instead find similar elements among many datasets.(也就是两两数据找“邻居”,而不是找共有“邻居”)。

6、对于多个数据的整合,existing methods select one dataset as a reference and successively integrate all other datasets into the reference(以一个数据作为参考集), one at a time, which may lead to suboptimal results depending on the order in which the datasets are considered,这个确实是很大的问题,不过新版的Seurat已经将这个问题优化了。

图片.png

7、Although Scanorama takes a similar approach when aligning a collection of two datasets, on larger collections of data it is insensitive to order and less vulnerable to overcorrection because it finds matches between all pairs of datasets.(对参考集不敏感,不会过矫正)。

8、数据之间寻找匹配的细胞,有两个关键步骤 。一、我们不是在高维基因空间中执行最近邻匹配,而是使用逐个基因表达矩阵的高效随机奇异值分解 (SVD,线性代数的知识) 将每个细胞的基因表达谱压缩到低维嵌入中,这还有助于提高方法对噪声的鲁棒性,就是低维空间找“近邻”。 二、we use an approximate nearest neighbor search based on hyperplane locality sensitive hashing(超平面,这个大家可以参考文章10X单细胞(10X空间转录组)降维分析之tSNE(算法基础知识)) and random projection trees to greatly reduce the nearest neighbor query time both asymptotically and in practice。

简单看一下文献的示例结果

结果1、Improved integration of simulated and toy scRNA-seq datasets.

To verify the merit of our approach, we first tested Scanorama on simulated data and a small collection of scRNA-seq datasets.
图片.png
包括真实的数据:两种数据
图片.png
In both cases, we were able to merge common cell types across datasets without also merging disparate(不同的) cell types together.
图片.png

图片.png
明显CCA和MNN是过矫正的,In contrast, existing integration methods are either sensitive to the order in which datasets are considered or are highly prone to overcorrection。

图片.png

scran MNN corrected (c) and Seurat CCA integrated (d)

图片.png
存在过矫正,不知道和harmony比较会怎么样。

结果2、Scanorama integrates 105,476 cells from 26 diverse datasets.

图片.png
图片.png
图片.png

结果2、简单看看就好,文献给出的数据示例绝对是他的软件最好~~~

简单看看示例代码

其实就一个scanpy的函数

scanorama.integrate_scanpy(adatas, dimred = 50)
# Get all the integrated matrices.
scanorama_int = [ad.obsm['X_scanorama'] for ad in adatas]

# make into one matrix.
all_s = np.concatenate(scanorama_int)
print(all_s.shape)
# add to the AnnData object
adata.obsm["Scanorama"] = all_s

不过scanpy早已经更新了,函数名字已经变了,大家多看看官网,逐步提高

生活很好,等你超越

©著作权归作者所有,转载或内容合作请联系作者
禁止转载,如需转载请通过简信或评论联系作者。
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 218,682评论 6 507
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,277评论 3 395
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 165,083评论 0 355
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,763评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,785评论 6 392
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,624评论 1 305
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,358评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,261评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,722评论 1 315
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,900评论 3 336
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,030评论 1 350
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,737评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,360评论 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,941评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,057评论 1 270
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,237评论 3 371
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,976评论 2 355

推荐阅读更多精彩内容