# 富集分析

富集分析是[生物信息学](https://www.edgepedia.org/zh/bioinformatics)中的一类统计方法，用于检验一个预先定义的基因集合或其他生物学特征，是否在一个全基因组实验产生的列表或排序中过度出现，或发生了系统性的偏移。它主要有两种形式：过表征分析（ORA），对经过阈值筛选的显著基因列表应用超几何检验或Fisher精确检验；以及功能类评分（FCS），以基因集富集分析（GSEA）为代表，使用完整的排序列表而不设显著性截断值。<sup>[1](https://bioconductor.org/help/course-materials/2016/CSAMA/lect-17-gene-set-enrichment/lect-17-gene-set-enrichment.pdf)</sup><sup> • </sup><sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC1239896/)</sup> 这种方法无处不在：诸如“通路分析”和“富集分析”之类的关键词每年出现在大约10,000篇文章中，2024年的数量是2014年的5.4倍。<sup>[3](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1014122)</sup>

| 关键事实 | 数值 |
|---|---|
| 两大类方法 | ORA（对阈值化列表做超几何/Fisher检验）与对完整排序列表做功能类评分（GSEA）<sup>[1](https://bioconductor.org/help/course-materials/2016/CSAMA/lect-17-gene-set-enrichment/lect-17-gene-set-enrichment.pdf)</sup><sup> • </sup><sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC1239896/)</sup> |
| GSEA富集分数 | 排序列表上运行和偏离零的最大值，一种加权类柯尔莫哥洛夫-斯米尔诺夫统计量<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC1239896/)</sup> |
| 默认基因集大小过滤 | 去除数据集中不存在的基因后，保留15至500个基因<sup>[4](https://docs.gsea-msigdb.org/GSEA/GSEA_User_Guide/)</sup> |
| 推荐显著性截断值 | 标准化富集分数（NES）的FDR q值低于0.25<sup>[4](https://docs.gsea-msigdb.org/GSEA/GSEA_User_Guide/)</sup> |
| 两种零假设 | 竞争性（集合基因不比其它基因更相关）与自包含（集合基因无关联）<sup>[1](https://bioconductor.org/help/course-materials/2016/CSAMA/lect-17-gene-set-enrichment/lect-17-gene-set-enrichment.pdf)</sup> |
| 最快的p值估计 | fgsea通过自适应多级分裂蒙特卡洛将GSEA p值估计到约10^-100<sup>[5](https://www.biorxiv.org/content/10.1101/060012v3)</sup> |
| 发表量 | 每年约10,000篇文章；2024年数量为2014年的5.4倍<sup>[3](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1014122)</sup> |

## 工作原理

这两类方法检验的是不同的问题。ORA问的是：在给定差异表达（DE）基因数目和基因全集大小的条件下，差异表达基因在某个基因集内部是否比外部更常见；p值即观测到的重叠数在超几何（Fisher精确）分布下的尾部概率。<sup>[1](https://bioconductor.org/help/course-materials/2016/CSAMA/lect-17-gene-set-enrichment/lect-17-gene-set-enrichment.pdf)</sup>

GSEA则不同，它检验的是一个集合的成员是否在全部n个被测基因的排序列表中随机散布。它沿着列表向下走，当基因属于集合\( S \)时增加一个运行和统计量，否则减少；富集分数（ES）就是这次行走偏离零的最大值，一种加权类柯尔莫哥洛夫-斯米尔诺夫统计量。<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC1239896/)</sup><sup> • </sup><sup>[6](http://www.stat.ucla.edu/~jingyi.li/statsm254-s14/survey_papers/ChelseaJU.pdf)</sup> 在原始表述中，上步步长为\( 1/G \)，下步步长为\( -1/(N-G) \)，其中\( N \)是被测基因数，\( G \)是集合中的基因数，因此对所有基因求和为零。<sup>[7](https://www.science.org/doi/10.1126/scisignal.2001966)</sup><sup> • </sup><sup>[8](https://www.pathwaycommons.org/guide/primers/data_analysis/gsea/)</sup>

显著性在样本量允许时来自置换表型（样本）标签，因为基因间的相关性必须被保留；基因集置换是一种替代方案，对应不同的零假设。ES会按基因集大小标准化为NES，计算方法是将观测到的ES除以同号零假设ES值的均值，并在各集合间估计FDR。<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC1239896/)</sup><sup> • </sup><sup>[4](https://docs.gsea-msigdb.org/GSEA/GSEA_User_Guide/)</sup><sup> • </sup><sup>[8](https://www.pathwaycommons.org/guide/primers/data_analysis/gsea/)</sup>

检验使用哪种零假设，决定了哪些混杂因素会起作用。古曼（Goeman）和比尔曼（Bühlmann）（2007）区分了竞争性零假设——集合基因与条件的关联不比其它基因更强——和自包含零假设——集合基因完全无关联；他们认为自包含零假设可能更接近生物学上真正关心的问题。竞争性和自包含描述的是零假设，而非统计量的普适分类：一个实现检验的是哪种零假设，取决于其置换方案，[表型](https://www.edgepedia.org/zh/phenotype)标签置换产生自包含零假设，基因集置换评估竞争性零假设。<sup>[1](https://bioconductor.org/help/course-materials/2016/CSAMA/lect-17-gene-set-enrichment/lect-17-gene-set-enrichment.pdf)</sup><sup> • </sup><sup>[6](http://www.stat.ucla.edu/~jingyi.li/statsm254-s14/survey_papers/ChelseaJU.pdf)</sup> 竞争性检验随机化基因，对影响哪些基因进入列表的混杂因素敏感；自包含检验置换样本标签，对细微变化有更高的功效，但不太适合在一组检验中同时测试许多集合。<sup>[9](https://biodatamining.biomedcentral.com/articles/10.1186/s13040-017-0125-9)</sup>

## 操作流程

一次典型的GSEA运行如下进行。基因按差异表达度量排序，默认使用信噪比。<sup>[10](https://www.genepattern.org/modules/docs/GSEA/18/)</sup> 基因集经过预处理，丢弃不在表达数据集中的基因，默认忽略少于15个或多于500个基因的集合，因为极端大小下标准化不准确。<sup>[4](https://docs.gsea-msigdb.org/GSEA/GSEA_User_Guide/)</sup> 当每种表型至少有7个样本时，推荐使用表型置换；样本较少时使用基因集置换，给出较不严格的评估。<sup>[4](https://docs.gsea-msigdb.org/GSEA/GSEA_User_Guide/)</sup> 结果通过NES比较，FDR q值截断值为0.25。<sup>[4](https://docs.gsea-msigdb.org/GSEA/GSEA_User_Guide/)</sup>

对于RNA-seq，FPKM/RPKM或TPM标准化不适合GSEA；应改用DESeq2标准化、TMM或几何均值方法。<sup>[11](https://help.connected.illumina.com/icm/analyses/analysis-functionality/task-menu/biological-interpretation/gsea)</sup> 对于ORA，前景列表的大小很重要；测试表明，对于差异表达研究，700至900个基因——约占检测到基因的5%至9%——是最佳的。<sup>[3](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1014122)</sup>

## 起源

GSEA由莫塔（Mootha）及其同事于2003年在《自然遗传学》上提出，旨在检测功能相关基因群中适度但协调的变化；它鉴定出一个氧化磷酸化基因集在人类糖尿病肌肉中协调性降低。<sup>[12](https://doi.org/10.1038/ng1180)</sup> 苏布拉马尼安（Subramanian）及其同事于2005年在《美国国家科学院院刊》（PNAS）上发表了改进方法，用相关性加权步长替代等权步长，用NES和FDR替代家族错误率校正，并发布了包含1,325个基因集的MSigDB 1.0。<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC1239896/)</sup> 同一时期较早的基因集表征工具包括FuncAssociate（贝里兹（Berriz）及其同事，《生物信息学》2003年）。<sup>[13](https://doi.org/10.1093/bioinformatics/btg363)</sup> GSEA属于第二代“功能和表达显著性分析”（SAFE）类方法，使用整个数据集而非阈值化的基因列表。<sup>[8](https://www.pathwaycommons.org/guide/primers/data_analysis/gsea/)</sup>

## 变体

fgsea是一个用于快速预排序GSEA的R包，其自适应多级分裂[蒙特卡洛](https://www.edgepedia.org/zh/monte-carlo)方法能估计任意小的p值，常规可低至10^-100，耗时仅数分钟或数秒；在对605个数据集的系统评估中，它比其他实现恢复了更多显著通路，因为参考实现无法准确估计小p值，这限制了多重假设校正下的灵敏度。<sup>[14](https://bioconductor.org/packages/devel/bioc/manuals/fgsea/man/fgsea.pdf)</sup><sup> • </sup><sup>[5](https://www.biorxiv.org/content/10.1101/060012v3)</sup>

对于RNA-seq，goseq（扬（Young）、[韦克菲尔德](https://www.edgepedia.org/zh/wakefield)（Wakefield）、史密斯（Smyth）和奥什拉克（Oshlack），《基因组生物学》2010年）校正ORA中的选择偏差——长且高表达的转录本被过度检测为差异表达：它拟合一个差异表达概率权重函数，以转录本长度为自变量，然后通过Wallenius非中心超几何近似计算类别p值。<sup>[15](https://doi.org/10.1186/gb-2010-11-2-r14)</sup> CAMERA（吴（Wu）和史密斯（Smyth），《核酸研究》2012年）是一种竞争性基因集检验，估计基因间相关性并相应调整检验统计量。<sup>[16](https://doi.org/10.1093/nar/gks461)</sup>

样本级评分方法将表达数据从基因变换到基因集。GSVA（汉泽尔曼（Hänzelmann）、卡斯特洛（Castelo）和吉尼（Guinney），《BMC生物信息学》2013年）是一种无监督方法，无需类别标签即可计算样本级富集分数，在微阵列和RNA-seq数据上类似地工作；较早的单样本方法包括ssGSEA，它利用集合内外表达秩的经验累积分布函数之差。<sup>[17](https://doi.org/10.1186/1471-2105-14-7)</sup> PAGE（金（Kim）和沃尔斯基（Volsky），2005年）是一种参数化替代方案；GSA（埃夫隆（Efron）和蒂布希拉尼（Tibshirani），2006年）使用最大均值统计量和再标准化。<sup>[6](http://www.stat.ucla.edu/~jingyi.li/statsm254-s14/survey_papers/ChelseaJU.pdf)</sup><sup> • </sup><sup>[18](https://doi.org/10.48550/arxiv.math/0610667)</sup> Python实现包括GSEApy（方（Fang）、刘（Liu）和佩尔茨（Peltz），2022年）和BlitzGSEA，后者通过伽马分布近似零分布。<sup>[19](https://doi.org/10.1093/bioinformatics/btac757)</sup><sup> • </sup><sup>[20](https://doi.org/10.1093/bioinformatics/btac076)</sup>

## 应用

在一个前列腺癌数据集上校正读数偏差后，超过50%的显著GO类别与标准超几何方法找到的不同，表明偏差校正对RNA-seq结论的改变有多大。<sup>[15](https://doi.org/10.1186/gb-2010-11-2-r14)</sup>

富集方法现在已被改编用于单细胞和空间转录组学。spatialGE（奥斯皮纳（Ospina）及其同事，2022年）检测表达特定基因集的斑点的空间聚集，GSDensity（2023年）通过多重对应分析将细胞和基因共同嵌入潜在空间；一项比较发现，来自拓扑感知PSF工具包的通路活性估计在约10至12个细胞聚集时趋于稳定，与10x Visium分辨率相匹配。<sup>[21](https://doi.org/10.1093/bioinformatics/btac145)</sup><sup> • </sup><sup>[22](https://peerj.com/articles/19729)</sup>

## 局限与替代方案

已发表的实践未能达到方法的假设要求。在对186篇开放获取文章的筛查中，95%的过表征分析没有使用或没有报告合适的背景基因列表，43%未能对p值进行多重检验校正；对RNA-seq使用不合适的全基因组背景，所得结果与正确背景下结果的平均相似度仅为44%。<sup>[23](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1009935)</sup>

从方法结构本身可以得出若干定量方面的警示。小基因集不稳定，因此有15至500个基因的默认过滤；重复或近乎重复的基因集会扭曲FDR统计量；基因集统计量和显著性度量取决于零假设的选择，且功效不同。<sup>[4](https://docs.gsea-msigdb.org/GSEA/GSEA_User_Guide/)</sup><sup> • </sup><sup>[6](http://www.stat.ucla.edu/~jingyi.li/statsm254-s14/survey_papers/ChelseaJU.pdf)</sup> 基因间相关性会在假设基因独立的检验中膨胀I型错误；GOseq的超几何检验做出了该独立性假设，其I型错误因此被膨胀，而CAMERA通过估计相关性来校正。<sup>[9](https://biodatamining.biomedcentral.com/articles/10.1186/s13040-017-0125-9)</sup>

工具选择本身就会改变结果。一项2026年的基准测试对12种流行的基于ORA的GO富集工具（DAVID、PANTHER、WebGestalt、Enrichr、ShinyGO、limma、topGO、GOstats、clusterProfiler、g:Profiler、ClueGO、BiNGO）使用随机阴性对照和靶向阳性对照，发现尽管采用相同的ORA方法和GO数据库，各工具的结果差异显著。<sup>[24](https://www.frontiersin.org/journals/bioinformatics/articles/10.3389/fbinf.2026.1755664/full)</sup> DAVID版本6.8被超过10,000篇出版物使用，在2026年期间经历了临时服务器中断，随后得到解决，服务仍然可用。<sup>[3](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1014122)</sup>

## References

1. [Gene Set Enrichment – Introduction (Bioconductor CSAMA 2016 lecture, Martin Morgan)](https://bioconductor.org/help/course-materials/2016/CSAMA/lect-17-gene-set-enrichment/lect-17-gene-set-enrichment.pdf)
2. [Gene set enrichment analysis: A knowledge-based approach for interpreting genome-wide expression profiles (Subramanian et al., PNAS 2005)](https://pmc.ncbi.nlm.nih.gov/articles/PMC1239896/)
3. [Ten common mistakes that could ruin your enrichment analysis](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1014122)
4. [GSEA User Guide - GSEA-MSigDB Documentation](https://docs.gsea-msigdb.org/GSEA/GSEA_User_Guide/)
5. [Fast gene set enrichment analysis (FGSEA preprint, bioRxiv)](https://www.biorxiv.org/content/10.1101/060012v3)
6. [An Overview of Gene Set Enrichment Analysis (survey paper, UCLA stats course)](http://www.stat.ucla.edu/~jingyi.li/statsm254-s14/survey_papers/ChelseaJU.pdf)
7. [Introduction to Statistical Methods for Analyzing Large Data Sets: Gene-Set Enrichment Analysis (Science Signaling Teaching Resource)](https://www.science.org/doi/10.1126/scisignal.2001966)
8. [Gene Set Enrichment Analysis · Pathway Guide (PathwayCommons primer)](https://www.pathwaycommons.org/guide/primers/data_analysis/gsea/)
9. [Gene set analysis controlling for length bias in RNA-seq experiments (SeqGSA)](https://biodatamining.biomedcentral.com/articles/10.1186/s13040-017-0125-9)
10. [GenePattern - GSEA (v18) module documentation](https://www.genepattern.org/modules/docs/GSEA/18/)
11. [GSEA | Illumina Connected Software documentation](https://help.connected.illumina.com/icm/analyses/analysis-functionality/task-menu/biological-interpretation/gsea)
12. [Vamsi K Mootha and colleagues (2003). PGC-1α-responsive genes involved in oxidative phosphorylation are coordinately downregulated in human diabetes. Nature Genetics.](https://doi.org/10.1038/ng1180)
13. [Gabriel F. Berriz and colleagues (2003). Characterizing gene sets with FuncAssociate. Bioinformatics.](https://doi.org/10.1093/bioinformatics/btg363)
14. [fgsea: Fast Gene Set Enrichment Analysis, reference manual](https://bioconductor.org/packages/devel/bioc/manuals/fgsea/man/fgsea.pdf)
15. [Matthew D Young and colleagues (2010). Gene ontology analysis for RNA-seq: accounting for selection bias. Genome biology.](https://doi.org/10.1186/gb-2010-11-2-r14)
16. [Di Wu, Gordon K. Smyth (2012). Camera: a competitive gene set test accounting for inter-gene correlation. Nucleic Acids Research.](https://doi.org/10.1093/nar/gks461)
17. [Sonja Hänzelmann, Robert Castelo, Justin Guinney (2013). GSVA: gene set variation analysis for microarray and RNA-Seq data. BMC Bioinformatics.](https://doi.org/10.1186/1471-2105-14-7)
18. [Efron, Bradley, Tibshirani, Robert (2006). On testing the significance of sets of genes. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.math/0610667)
19. [Zhuoqing Fang, Xinyuan Liu, Gary Peltz (2022). GSEApy: a comprehensive package for performing gene set enrichment analysis in Python. Bioinformatics.](https://doi.org/10.1093/bioinformatics/btac757)
20. [Alexander Lachmann, Zhuorui Xie, Avi Ma’ayan (2022). blitzGSEA: efficient computation of gene set enrichment analysis through gamma distribution approximation. Bioinformatics.](https://doi.org/10.1093/bioinformatics/btac076)
21. [Oscar E Ospina and colleagues (2022). spatialGE: quantification and visualization of the tumor microenvironment heterogeneity using spatial transcriptomics. Bioinformatics.](https://doi.org/10.1093/bioinformatics/btac145)
22. [Topology-aware pathway analysis of spatial transcriptomics](https://peerj.com/articles/19729)
23. [Urgent need for consistent standards in functional enrichment analysis](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1009935)
24. [Benchmarking multiple gene ontology enrichment tools reveals high biological significance, ranking, and stringency heterogeneity among datasets](https://www.frontiersin.org/journals/bioinformatics/articles/10.3389/fbinf.2026.1755664/full)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 生命与健康 › 生物学基础

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/enrichment-analysis

English original: https://www.edgepedia.org/enrichment-analysis
