10X单细胞(10X空间转录组)数据分析之NMF寻找转录programs

hello,大家好,今天我们分享的内容来自文章Spatially organized multicellular immune hubs in human colorectal cancer,很多的内容都非常的经典,其中最重要的部分就是NMF对单细胞数据分析的影响,当然,也涉及到空间位置信息,很好的文章,我们把其中的重点提取出来,供大家参考。

前言部分

1、Recently, imaging-based studies have highlighted cellular interaction networks based on recurrent co-localization of different cells in neighborhoods (说白了还是要做临近通讯,而不是单细胞通讯的分析方法)。

2、revealed multicellular interaction networks based on co-variation of gene program activities(这个地方是今天的重点) in different cell subsets across individual tumors and imaged key molecules for predicted cell subsets and programs to localize these interaction networks in matched tissues from affected individuals.(空间网络与临近)。

单细胞分析部分

质控部分需要注意的地方,

(1)dropletUtils去除empty cell droplets,by testing against a background generated from barcodes with 1,000 to 10 UMIs, with cutoffs determined dynamically based on channel-specific characteristics.
(2) UMI and gene saturation was estimated in individual cells by sub-sampling reads without replacement in each cell barcode, in incremental fractions of 2%, with 20 repeats. A saturation function of the form y = ax/(x + b) + c was fit based on the number of UMIs observed while sampling reads at different depths.(这个地方对测序深度的计算跟10X官网的计算方法是类似的,目的在于尽量测到尽可能多的基因)。
(3)1、Fewer than 200 genes; 2、Fewer than 1,000 read(这个过滤我们可以忽略); 3、Fewer than 500 UMIs; 4、 More than 50% of UMIs mapping to the mitochondrial genome(线粒体基因的阈值是50%);5、 Non-empty droplet with false discovery rate (FDR) less than 0.1; 6、 Over 5% of reads estimated as coming from swapped barcodes/chimeric reads 这几个过滤标准大家要注意了。
(4)对每个通道和每个通道细胞类型组合分别使用异常值排除,然后根据以下标准标记偏离中位数 > 2 个四分位距 (IQR) 的细胞,1、 log10(total transcript UMI), 2、 Fraction of barcode swaps, 3、 Gene saturation estimate,4、 UMI saturation estimate, 5、 Fraction of UMI supported by > 1 read(异常值排除的地方也值得大家借鉴)。
(5)如果细胞显着偏离拟合,则根据以下关系进一步标记细胞: 1、 Total reads versus total UMI, 2、 Total UMI versus log likelihood of being empty; 3、 Total UMI versus total number of genes. A cell was excluded if it was flagged by at least two of these criteria for epithelial and immune cells, or at least three criteria for stromal cells.(这过滤标准真够严格的)。

Selection of variable genes, dimensionality reduction and clustering

高变基因的选择,这个地方考虑到样本的差异
图片.png
降维,这里用NMF替代了PCA,NMF was used to reduce the dimensionality of the full dataset to between 15 and 40 dimensions as the product of two non-negative matrices these NMF components were used to calculate the k-nearest neighbors (k-NN) graph (k = 21) based on a cosine similarity distance. This graph was clustered using stability optimizing graph clustering, to identify 7 top level cell type clusters(当然,这里的单细胞数据没有用我们常用的seurat软件,而是作者自己的方法)。
批次效应的去除,也采用的直接算法而不是软件,To minimize differences across samples due to technical reasons (e.g., 10x v2 versus 10x v3), gene expression measurements of individual genes were quantile normalized, separately among cells of each top-level cellular compartment, such that the expression CDFs for each gene matched across all batches. Next, the same dimensionality reduction by NMF and graph-clustering procedure was applied iteratively to the transcriptomes of each top-level cell type separately, resulting in a total of 88 cell clusters spanning distinct types or states。(毕竟降维是NMF,很难直接嵌套现有的批次去除的软件)。
值得注意的是,基于 PCA 的 louvain 聚类导致质量相似的细胞子集定义(数据未显示)。 然而,由于我们通过 NMF 从头发现基因表达程序,因此决定始终使用 NMF 而不是 PCA 来定义cluster。
图片.png

Cluster connectivity,cluster之间的相关性,采用了PAGA。PAGA edge thresholds were selected by using the minimum edge weight of the corresponding minimum spanning tree for each k-NN graph。这里的PAGA主要是用来分析肿瘤的cluster和正常细胞的cluster之间的相关性。

图片.png

NMF运用的第二个重点,Identification of gene expression programs by NMF。有关NMF识别programs在我之前的文章10X单细胞(10X空间转录组)数据分析之细胞等级(分数),分享过具体过程,大家可以回顾一下。我们来看看文献怎么识别的。

We used as input the weight components matrices (W matrices)(数学的知识大家自行查阅,NMF矩阵降维的知识) from an NMF procedure that was run on 50-200 subsampled gene x cell subsets,We excluded outlier components by sorting components by their cosine distance to the 20th nearest neighbor and excluding components with unusually high distance by an elbow-based criterion.(我们通过components按到第 20 个最近邻居的余弦距离对components进行排序来排除离群值components,并通过基于肘部的标准排除具有异常高距离的components。 这里需要关注的是,输入的矩阵已经是原始矩阵经过NMF降维过的矩阵,而寻找program在降维过的矩阵上进行再次分析)接下来,我们构建了一个 k-NN 图 (k = 30),并使用稳定性优化图聚类(关于图聚类的知识,之前也分享了很多了,大家可以自行查阅)识别该图中高度相似components的cluster(注意这里是识别高度相似的components),具有指数变化的尺度参数(0.1 到 10)。每个cluster中的components被中值平均为一个 components,从而形成“共识 NMF”components的候选名单。 这些被用作所有细胞和高度可变基因的第二轮 NMF 的初始化components矩阵(二次NMF)。上述程序分别应用于每个top-level细胞群和来自正常通道的上皮细胞。 对于每种细胞类型,这产生了 8 个解决方案,8-48 个cluster对应于分辨率参数的不同选择。 对于每种细胞类型,基于平均cluster轮廓的检查、残差图的变化以及通过手动检查输出程序中的top-level基因来选择单个解决方案。
图片.png
这个地方跟之前分享的NMF寻找有效的programs是一致的,值得大家好好借鉴。
图片.png
每个components的top 150个基因作为一个expression programs,这个地方跟之前的研究一致,只是选取基因的数量上有不同。

接下来就是对选取的program的运用,Identification of shared gene programs in malignant epithelial cells。

为了识别来自多个个体患者的恶性上皮细胞共享的表达programs,首先将上述一致的 NMF programs分别应用于来自每个患者的恶性细胞(来自肿瘤通道并分类为如上所述的恶性细胞)。 对于每个患者,生成了一个单独的共识 NMF 表达programs集 (Wmatrix),programs的数量根据残差图自动选择。 接下来,将类似的共识方法应用于所有每名患者共识 NMF program集(所有 W 矩阵,每个患者一个)以及一组 17 个正常上皮programs(如上所述识别 - 基因表达的识别)的组合列表 NMF programs),以便在单个组合 NMF 解决方案中捕获恶性和正常上皮programs。 在这一共识聚类programs完成后,包括一个或多个正常上皮programs的 NMF cluster被排除在外,并使用相应的正常 NMF programs代替它们。

Calculating NMF transcriptional program activity

In order to calculate the NMF program activity matrix (H), we used non-negative least-squares (NNLS,关于NNLS,大家可以参考文章最优化算法-非负最小二乘-NNLS), solving the following equation for the matrix H, H = argminH>0|X - WH|F , given X andW, where H is the ‘program activity’ matrix, k is the by cell matrix; X is the gene by cell expression matrix, and W is the gene by k NMF expression program matrix. W was restricted to at most top 100 weighted genes per NMF component.In this way we can calculate the activity values for any cell including cells not part of the original NMF procedure used to discover the program ‘‘dictionary’’。数学的知识非常重要,大家如果有能力,钻研一下。

测试共变 NMF 表达programs,这个地方非常难,有大牛的话,希望讨论一下

图片.png

NMF的运用远不止如此,希望以后多多学习这方面的知识

生活很好,有你更好

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

推荐阅读更多精彩内容