为了从基因的表达水平中得到更加具体直观的生物学功能变化的信息,多种基于已知的基因集的分析方法应运而生。其中,基因集分析(Gene Set Analysis)、基因集富集分析(Gene Set Enrichment Analysis)、单样本基因集富集分析(Single Sample Gene Set Enrichment Analysis, ssGSEA)、基因集变异分析(Gene Set Variation Analysis, GSVA)是我目前遇到比较多的基因集分析方法,在这里对四者做一个详细的阐述和比较,以加深对这些方法的理解。本文章不介绍代码,只阐述算法原理,因为现在这几种方法的代码的分享已经足够多了,而对于原理的详细阐述几乎没有。
Subramanian A, Tamayo P, Mootha VK, et al. Gene set enrichment analysis: a knowledge-based approach for interpreting genome-wide expression profiles. Proc Natl Acad Sci U S A. 2005;102(43):15545-15550. doi:10.1073/pnas.0506580102
需要注意的是,在GSEA中,不仅仅可以用log2FC对基因进行排序,根据自己的研究内容,可以使用不同的参数比如相关性系数作为排序依据。实际上,GSEA原文是这么说的:"Genes are ranked based on the correlation between their expression and the class distinction by using any suitable metric"。在我来看目前应用得比较多的是不同组间比较得到的log2FC,因此在后面的阐述中我都将以log2FC做为排序的依据。
在讲解GSEA、ssGSEA、GSVA前,需要了解几个统计学知识,因为它们与这三个方法都息息相关。
注释1. 分布函数(Cumulative Distribution Function,CDF)与概率密度函数(probability density function,PDF)
In statistics, an empirical distribution function (commonly also called an empirical Cumulative Distribution Function, eCDF) is the distribution function associated with the empirical measure of a sample.[1] This cumulative distribution function is a step function that jumps up by 1/n at each of the n data points. Its value at any specified value of the measured variable is the fraction of observations of the measured variable that are less than or equal to the specified value.
在原文中描述到,在随机游走过程中(也就是红线的游走路线),遇到基因集S中的基因后加上一个统计量 ,这个统计量就是上述的基因集S的eCDF的上升高度 。没有遇到基因集S中的基因,就减去一个统计量 ,这个统计量也就是不在基因集S中的其他基因的eCDF上升阶梯高度 。GSEA、ssGSEA、GSVA都是采用的k-s like test,也就是上述的策略,仅仅统计量的计算略有差异。在各自的原文中,D也就是ES的数学表达方式为,对整个基因list基因集S的eCDF的上升高度 求和,减去不在基因集S中的其他基因的eCDF上升阶梯高度的求和。
第四步:检验ES(S)的显著性(计算ES(S)的p-value):
"Step 2: Estimation of Significance Level of ES. We estimate the statistical significance (nominal P value) of the ES by using an empirical phenotype-based permutation test procedure that preserves the complex correlation structure of the gene expression data. Specifically, we permute the phenotype labels and recompute the ES of the gene set for the permuted data, which generates a null distribution for the ES. The empirical, nominal P value of the observed ES is then calculated relative to this null distribution. Importantly, the permutation of class labels preserves gene-gene correlations and, thus, provides a more biologically reasonable assessment of significance than would be obtained by permuting genes."
综上我们就介绍完了GSEA。总结一下,相比起GSA,GSEA不再关注于差异基因,因此不受p-value以及log2FC阈值的影响,可以获得更多生物学功能变化的信息。富集分数ES,实际上是k-s like test的统计量,所以ES主要表示基因集S的基因的log2FC的分布与不在基因集S的其他基因的log2FC的分布是否一致,当ES大于0并且具有统计学意义时,那我们可以说基因集S内基因相比其他基因表达上调。
三、ssGSEA
ssGSEA起源于2009年的一篇文章:
Barbie DA, Tamayo P, Boehm JS, et al. Systematic RNA interference reveals that oncogenic KRAS-driven cancers require TBK1. Nature. 2009;462(7269):108-112. doi:10.1038/nature08460
Hänzelmann S, Castelo R, Guinney J. GSVA: gene set variation analysis for microarray and RNA-seq data. BMC Bioinformatics. 2013;14:7. Published 2013 Jan 16. doi:10.1186/1471-2105-14-7
GSVA同样也是先进行基因排序,得到一个基因list,然后通过k-s like test得到基因集内外基因分布的两条eCDF的差值D,并基于差值D得到ES(S)。基本步骤与ssGSEA一致,下面介绍GSVA与ssGSEA的不同之处:
GSVA函数中通过kcdf(kernel estimation of cdf)选项对核函数进行选择。如上所述,microarray表达数据的log值可认为符合正态分布,所以核函数选择kcdf="Guassian" 。对于RNA-seq的counts数据可以认为符合泊松分布,所以和函数选择kcdf="Poisson"。