# 加权基因共表达网络分析

加权基因共表达网络分析（WGCNA）是一种系统生物学方法：它根据跨样本测量的基因两两相关性构建加权网络，将网络聚类为共表达模块，并将这些模块与样本性状（如疾病状态、基因型或组织）关联起来。一次典型的运行会输出基因模块、每个模块一个模块特征基因（即概要表达谱）、每个基因的模块成员度得分、枢纽基因候选者，以及带有 p 值的模块—性状相关性。<sup>[1](https://link.springer.com/article/10.1186/1471-2105-9-559)</sup><sup> • </sup><sup>[2](https://systemsbio.ucsd.edu/WGCNAdemo/)</sup> WGCNA 模块往往反映细胞类型、共同的细胞功能或与组织相关的生物子系统。<sup>[3](https://link.springer.com/article/10.1186/s12918-017-0420-6)</sup>

| 关键事实 | 详情 |
|---|---|
| 输出 | 相关基因模块、模块特征基因、模块成员度（kME）、枢纽基因、模块—性状相关性<sup>[1](https://link.springer.com/article/10.1186/1471-2105-9-559)</sup> |
| 邻接函数 | 无符号：\( a_{ij} = |cor(x_i, x_j)|^{\beta} \)；有符号：\( a_{ij} = (0.5 \cdot (1 + cor(x_i, x_j)))^{\beta} \)；有符号混合：若 cor > 0 则为 \( cor^{\beta} \)，否则为 0<sup>[4](https://cran.r-project.org/web/packages/WGCNA/WGCNA.pdf)</sup> |
| 选择 β | 无标度拓扑准则；有符号 \( R^2 > 0.80 \) 的网络被视为近似无标度<sup>[5](https://gds-yazarlab.bilkent.edu.tr/wp-content/uploads/GBMTutorialHorvath.pdf)</sup> |
| 样本量 | 不建议低于 15 个样本；建议 20 个或更多；推荐幂次从样本数低于 20 时的 9（无符号）/ 18（有符号）到样本数高于 40 时的 6 / 12<sup>[6](https://github.com/edo98811/WGCNA_official_documentation/blob/main/faq.html)</sup> |
| 默认参数 | blockwiseModules：maxBlockSize 5000，power 6，networkType “unsigned”，TOMType “signed”，mergeCutHeight 0.15<sup>[4](https://cran.r-project.org/web/packages/WGCNA/WGCNA.pdf)</sup> |
| 规模 | 分块计算使在 R 中以 7,000 个基因为一块处理 50,000 个基因成为可行<sup>[1](https://link.springer.com/article/10.1186/1471-2105-9-559)</sup>；PyWGCNA 在 R 包因内存不足而失败的情况下，为 96,000 个转录本识别出了模块<sup>[7](https://academic.oup.com/bioinformatics/article/39/7/btad415/7218311)</sup> |

## 工作原理

WGCNA 从共表达相似性矩阵 \( s_{ij} = cor(x_i, x_j) \) 出发，通常取跨样本基因表达谱之间的皮尔逊相关系数。软阈值化将相似性提升到幂次 \( \beta \geq 1 \)：无符号邻接为 \( a_{ij} = |cor(x_i, x_j)|^{\beta} \)，有符号邻接为 \( a_{ij} = (0.5 \cdot (1 + cor(x_i, x_j)))^{\beta} \)，有符号混合邻接为 \( \max(cor(x_i, x_j), 0)^{\beta} \)，从而以弱化小相关性为代价强调大相关性；对数关系 \( \log(a_{ij}) = \beta \cdot \log(s_{ij}) \) 仅适用于正底数，其中 \( s_{ij} \) 应理解为相关的变换后相似性。<sup>[1](https://link.springer.com/article/10.1186/1471-2105-9-559)</sup>

无标度拓扑准则用于选择 \( \beta \)：即能使网络近似无标度的最低幂次，意味着节点连接度的分布遵循幂律。拟合是对分箱连接度上的对数相对频率关于对数连接度做回归，有符号拟合指数为 \( -\operatorname{sign}(slope)R^2 \)，这考虑了斜率的符号。<sup>[8](https://pages.stat.wisc.edu/~yandell/statgen/ucla/WGCNA/wgcna.pdf)</sup> 随后，模块被定义为基于拓扑重叠构建的聚类树的枝，拓扑重叠是一种相似性度量，计算两个基因通过其共享邻居连接的强度，\[ \mathrm{TOM}_{ij} = \frac{\sum_u A_{iu} A_{uj} + A_{ij}}{\min(k_i, k_j) + 1 - A_{ij}} \]<sup>[9](https://zaoqu-liu.github.io/hdWGCNA/articles/algorithm.html)</sup>

## 操作流程

标准工作流按以下顺序进行：<sup>[8](https://pages.stat.wisc.edu/~yandell/statgen/ucla/WGCNA/wgcna.pdf)</sup><sup> • </sup><sup>[2](https://systemsbio.ucsd.edu/WGCNAdemo/)</sup>

1. **数据清洗。** 移除缺失值过多的基因和样本（goodSamplesGenes），并对样本聚类以检测离群值。<sup>[2](https://systemsbio.ucsd.edu/WGCNAdemo/)</sup>
2. **选择 β。** pickSoftThreshold 根据无标度准则评估候选幂次，并将选择权留给用户；6（无符号）和 12（有符号）是样本量指南给出的推荐值，而 blockwiseModules 的默认 power 为 6。<sup>[1](https://link.springer.com/article/10.1186/1471-2105-9-559)</sup><sup> • </sup><sup>[6](https://github.com/edo98811/WGCNA_official_documentation/blob/main/faq.html)</sup>
3. **构建网络。** 计算加权邻接和拓扑重叠相异性。<sup>[8](https://pages.stat.wisc.edu/~yandell/statgen/ucla/WGCNA/wgcna.pdf)</sup>
4. **切割树。** 对 \( 1 - \mathrm{TOM} \) 做平均连锁层次聚类，随后进行动态树切割（cutreeDynamic），开发者将其描述为最灵活的枝切割方法。<sup>[8](https://pages.stat.wisc.edu/~yandell/statgen/ucla/WGCNA/wgcna.pdf)</sup>
5. **合并模块。** 特征基因高度相关的模块被合并；包的默认 mergeCutHeight 为 0.15。<sup>[4](https://cran.r-project.org/web/packages/WGCNA/WGCNA.pdf)</sup>
6. **将模块与性状关联。** 模块特征基因与性状相关（cor(MEs, datTraits)），并用 corPvalueStudent 计算 p 值；基因显著性为 \( GS = |cor(\mathrm{gene}, \mathrm{trait})| \)，模块成员度为 \( kME = cor(x_i, E_M) \)，对每个基因计算，而不仅限于模块成员。<sup>[2](https://systemsbio.ucsd.edu/WGCNAdemo/)</sup><sup> • </sup><sup>[8](https://pages.stat.wisc.edu/~yandell/statgen/ucla/WGCNA/wgcna.pdf)</sup><sup> • </sup><sup>[5](https://gds-yazarlab.bilkent.edu.tr/wp-content/uploads/GBMTutorialHorvath.pdf)</sup>

## 起源

WGCNA 框架由张斌和 [Steve Horvath](https://www.edgepedia.org/zh/steve-horvath) 在《加权基因共表达网络分析的一般框架》（Statistical Applications in Genetics and Molecular Biology，2005）中描述，该文引入了软阈值化、用于选择邻接参数的无标度拓扑准则、加权拓扑重叠，以及连接度和聚类系数的加权推广。<sup>[10](https://doi.org/10.2202/1544-6115.1128)</sup> 2005 年的论文建立在其引用的早期共表达和网络工作之上：Eisen 及其同事 1998 年对全基因组表达模式的聚类分析，<sup>[11](https://doi.org/10.1073/pnas.95.25.14863)</sup> Stuart 及其同事 2003 年用于发现保守遗传模块的基因共表达网络，<sup>[12](https://doi.org/10.1126/science.1087447)</sup> 以及 van Noort、Snel 和 Huynen 2004 年关于酵母共表达网络具有小世界、无标度架构的报告。<sup>[13](https://doi.org/10.1038/sj.embor.7400090)</sup> Peter Langfelder 和 Steve Horvath 在 WGCNA R 包中实现了该方法（BMC Bioinformatics，2008）。<sup>[1](https://link.springer.com/article/10.1186/1471-2105-9-559)</sup> 同一团队随后提出了支持性方法：用于研究共表达模块之间关系的特征基因网络（BMC Systems Biology，2007）<sup>[14](https://doi.org/10.1186/1752-0509-1-54)</sup>，以及由 Langfelder、张斌和 Steve Horvath 开发的 R 语言 Dynamic Tree Cut 包（Bioinformatics，2007）。<sup>[15](https://doi.org/10.1093/bioinformatics/btm563)</sup>

## 变体

**有符号与无符号网络。** 在无符号网络中，强负相关的基因与正相关基因连接强度相同，而有符号网络则降低负相关的权重；有符号混合网络将非正相关的邻接设为零。<sup>[16](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0061505)</sup> 有符号混合选项将正相关的邻接设为 \( cor^{\beta} \)，否则为 0。<sup>[4](https://cran.r-project.org/web/packages/WGCNA/WGCNA.pdf)</sup> 这一区别是经验性的，而非表面功夫：在小鼠胚胎干细胞中，有符号 WGCNA 识别出了无符号网络未能识别出的多能性模块和分化模块。<sup>[17](https://plathlab.org/wp-content/uploads/2009/07/2009-Mason-1471-2164-10-327.pdf)</sup>

**扩展与共识。** 对 \( n \) 个基因的单块分析需要 \( O(n^2) \) 内存和 \( O(n^3) \) 计算量；块大小为 \( n_b \) 的分块方法将其降低为 \( O(n_b^2) \) 内存和 \( O(n \cdot n_b^2) \) 计算量，使以 7,000 个基因为一块处理 50,000 个基因成为可行。<sup>[1](https://link.springer.com/article/10.1186/1471-2105-9-559)</sup> 特征基因网络将特征基因组织为称为元模块的更高层聚类，有符号特征基因网络保留特征基因相关性的符号。<sup>[14](https://doi.org/10.1186/1752-0509-1-54)</sup>

**单细胞适配。** hdWGCNA（Cell Reports Methods，2023，由 Samuel Morabito 及其同事开发）将该流程扩展到单细胞和空间 RNA 测序：由于许多单细胞数据集有超过 90% 的零值，它在聚合的元细胞或元空间点谱上而非单个细胞上构建网络，计算细胞类型特异性网络，并与 Seurat 集成。<sup>[18](https://doi.org/10.1016/j.crmeth.2023.100498)</sup><sup> • </sup><sup>[9](https://zaoqu-liu.github.io/hdWGCNA/articles/algorithm.html)</sup>

## 应用

包作者列出的早期应用包括脑癌、酵母细胞周期、小鼠遗传学、灵长类脑组织、糖尿病、慢性疲劳患者和植物。<sup>[1](https://link.springer.com/article/10.1186/1471-2105-9-559)</sup> 在胚胎干细胞中，模块成员度与表观遗传修饰（包括组蛋白修饰和启动子 CpG 甲基化状态）显示出高度显著的关系。<sup>[17](https://plathlab.org/wp-content/uploads/2009/07/2009-Mason-1471-2164-10-327.pdf)</sup> 在一项重度抑郁症转录组研究中，通过近似无标度拓扑（\( R^2 = 0.88 \)）选择的软阈值 \( \beta = 5 \) 产生了 9 个模块，其中一个包含 491 个基因的绿松石色模块富集于中性粒细胞脱颗粒和免疫反应。<sup>[19](https://pmc.ncbi.nlm.nih.gov/articles/PMC7079285/)</sup> 在阿尔茨海默病小鼠模型中，PyWGCNA 应用于 5xFAD 皮层和海马体的 192 个整体 RNA 测序样本，恢复了 17 个与年龄、基因型、组织和性别相关的模块。<sup>[7](https://academic.oup.com/bioinformatics/article/39/7/btad415/7218311)</sup>

## 局限性与替代方案

**样本量与数据质量。** 少于 15 个样本的相关性对于具有生物学意义的网络来说噪声太大；建议使用 20 个或更多样本。<sup>[6](https://github.com/edo98811/WGCNA_official_documentation/blob/main/faq.html)</sup> 存在技术伪影、组织污染或实验设计不佳时，结果可能有偏或无效。<sup>[1](https://link.springer.com/article/10.1186/1471-2105-9-559)</sup> 在构建网络前按差异表达过滤基因会使无标度拓扑假设失效，因此通过无标度拟合选择 \( \beta \) 会失败；如果在合理幂次（无符号或有符号混合低于 15，有符号低于 30）下拟合指数不超过 0.8，而平均连接度保持高位，则数据很可能含有强驱动因素，如批次效应或组织异质性。<sup>[6](https://github.com/edo98811/WGCNA_official_documentation/blob/main/faq.html)</sup> 模块在第二数据集中的保守性用 \( Z_{summary} \) 统计量量化：\( Z_{summary} < 2 \) 表示无保守性证据，2 到 10 为弱到中等，\( \geq 10 \) 为强。<sup>[9](https://zaoqu-liu.github.io/hdWGCNA/articles/algorithm.html)</sup>

**枢纽基因。** 枢纽地位在模块内定义（模块内连接度或 kME），开发者认为关注模块内枢纽而非全网络枢纽至关重要；尽管如此，枢纽往往并不重要，基于连接度的基因选择缺乏成熟基因选择程序的理论基础。<sup>[16](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0061505)</sup> 在肺癌生存、甲基化和小鼠性状数据集的比较中，模块内枢纽地位比荟萃分析 p 值更有助于产生具有生物学意义的基因列表，但标准荟萃分析在独立数据中的验证成功率与之相当或更好。<sup>[16](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0061505)</sup>

**替代方案。** 与其他网络方法相比，一项基准测试发现 WGCNA 和 ARACNE 在构建全局网络结构方面表现最佳，而 GeneNet 和 SPACE 在以高特异性识别少量连接方面更好；WGCNA 在样本数极少时表现良好，但随着样本增加被 SPACE 超越。<sup>[20](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0029348)</sup> 普通聚类具有互补的弱点：层次聚类无法撤销枝分配且依赖距离度量，而 k-means 需要预先指定 \( k \) 并严重依赖质心初始化；使用基因—特征基因相似性 \( co(g_i, eg_j) = 0.5 \cdot (1 + cor(g_i, eg_j)) \) 添加 k-means 步骤已被提出作为 WGCNA 流程的附加步骤，而非替代方案。<sup>[3](https://link.springer.com/article/10.1186/s12918-017-0420-6)</sup>

## References

1. [WGCNA: an R package for weighted correlation network analysis (Langfelder & Horvath, BMC Bioinformatics, 2008)](https://link.springer.com/article/10.1186/1471-2105-9-559)
2. [WGCNA demo with step-by-step R code (UCSD systems biology)](https://systemsbio.ucsd.edu/WGCNAdemo/)
3. [An additional k-means clustering step improves the biological features of WGCNA gene co-expression networks (BMC Systems Biology 2017, km2gcn)](https://link.springer.com/article/10.1186/s12918-017-0420-6)
4. [WGCNA R package reference manual (CRAN)](https://cran.r-project.org/web/packages/WGCNA/WGCNA.pdf)
5. [Brain Cancer Microarray Data WGCNA R Tutorial (Horvath lab)](https://gds-yazarlab.bilkent.edu.tr/wp-content/uploads/GBMTutorialHorvath.pdf)
6. [WGCNA FAQ (Horvath lab official documentation)](https://github.com/edo98811/WGCNA_official_documentation/blob/main/faq.html)
7. [PyWGCNA: a Python package for weighted gene co-expression network analysis (Bioinformatics 2023)](https://academic.oup.com/bioinformatics/article/39/7/btad415/7218311)
8. [WGCNA book tutorial (Horvath group), corrected R code from chapter 12](https://pages.stat.wisc.edu/~yandell/statgen/ucla/WGCNA/wgcna.pdf)
9. [Algorithm and Mathematical Framework • hdWGCNA (official vignette)](https://zaoqu-liu.github.io/hdWGCNA/articles/algorithm.html)
10. [Bin Zhang, Steve Horvath (2005). A General Framework for Weighted Gene Co-Expression Network Analysis. Statistical Applications in Genetics and Molecular Biology.](https://doi.org/10.2202/1544-6115.1128)
11. [Michael B. Eisen and colleagues (1998). Cluster analysis and display of genome-wide expression patterns. Proceedings of the National Academy of Sciences.](https://doi.org/10.1073/pnas.95.25.14863)
12. [Joshua M. Stuart and colleagues (2003). A Gene-Coexpression Network for Global Discovery of Conserved Genetic Modules. Science.](https://doi.org/10.1126/science.1087447)
13. [Vera van Noort, Berend Snel, Martijn A Huynen (2004). The yeast coexpression network has a small‐world, scale‐free architecture and can be explained by a simple model. EMBO Reports.](https://doi.org/10.1038/sj.embor.7400090)
14. [Peter Langfelder, Steve Horvath (2007). Eigengene networks for studying the relationships between co-expression modules. BMC Systems Biology.](https://doi.org/10.1186/1752-0509-1-54)
15. [Peter Langfelder, Bin Zhang, Steve Horvath (2007). Defining clusters from a hierarchical cluster tree: the Dynamic Tree Cut package for R. Bioinformatics.](https://doi.org/10.1093/bioinformatics/btm563)
16. [When Is Hub Gene Selection Better than Standard Meta-Analysis? (PLOS One 2013)](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0061505)
17. [Signed weighted gene co-expression network analysis of embryonic stem cells (Mason et al., BMC Genomics 2009)](https://plathlab.org/wp-content/uploads/2009/07/2009-Mason-1471-2164-10-327.pdf)
18. [Samuel Morabito and colleagues (2023). hdWGCNA identifies co-expression networks in high-dimensional transcriptomics data. Cell Reports Methods.](https://doi.org/10.1016/j.crmeth.2023.100498)
19. [Weighted Gene Coexpression Network Analysis Identifies Specific Modules and Hub Genes Related to Major Depression](https://pmc.ncbi.nlm.nih.gov/articles/PMC7079285/)
20. [Comparing Statistical Methods for Constructing Large Scale Gene Networks (PLOS One)](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0029348)

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

Topic: 生命与健康 › 生物学基础 › RNA与基因调控 › RNA元件、催化RNA与技术 › RNA方法、数据库与资源

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/weighted-gene-coexpression-network-analysis

English original: https://www.edgepedia.org/weighted-gene-coexpression-network-analysis
