# 批次效应校正

批次效应校正是一类计算方法，用于去除高通量生物数据在加工批次之间引入的系统性技术变异，从而得以分析真实的生物学差异。校正方法估计数据中与批次相关的成分并将其去除，理想情况下同时保留条件、细胞类型及其他生物学变异；当批次与生物学条件发生混杂时，任何程序都无法在不一并去除生物学变异的情况下校正批次效应<sup>[1](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0017238)</sup>，而校正过程中的过拟合可能导致统计功效损失，并使模型对新数据的泛化能力较差。<sup>[2](https://link.springer.com/article/10.1186/s13059-024-03401-9)</sup>

| 关键事实 | 详情 |
|---|---|
| 批次效应的来源 | 测序深度、泳道、板、流动池、实验方案、实验室、试剂、操作、样本组成及采样时间<sup>[3](https://www.nature.com/articles/s41592-021-01336-8)</sup> |
| ComBat 模型 | 对每个基因和批次分别建立加性（均值）和乘性（方差）批次项，并在基因间进行经验贝叶斯收缩<sup>[4](https://bmcbioinformatics.biomedcentral.com/counter/pdf/10.1186/s12859-018-2263-6.pdf)</sup> |
| 小批次稳健性 | ComBat 可对样本量低于 10 的批次调整数据，而早期方法要求超过 25 个样本<sup>[5](https://www.genepattern.org/modules/docs/ComBat/2/)</sup> |
| 方法输出 | 校正后的计数矩阵或表达矩阵（ComBat、ComBat-seq、MNN、Seurat）、校正后的 PCA 嵌入（Harmony）、修改后的 k-NN 图（BBKNN）或学习到的潜空间（scVI）<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC12315870/)</sup> |
| 混杂设计 | 当病例与对照在不同批次中运行时，校正会连同批次效应一起去除病例-对照变异<sup>[1](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0017238)</sup> |
| 验证指标 | kBET、LISI、对齐分数、香农熵、信噪比、调整兰德指数及平均轮廓宽度<sup>[2](https://link.springer.com/article/10.1186/s13059-024-03401-9)</sup> |
| 方法家族 | 位置-尺度、矩阵分解、距离-邻域及深度学习方法<sup>[2](https://link.springer.com/article/10.1186/s13059-024-03401-9)</sup> |

## 工作原理

大多数批次校正方法假定，一个基因的实测表达可分解为生物学成分加上批次特异的位置（均值）偏移、批次特异的尺度（方差）变化，或两者兼有。在 ComBat 中，来自批次 \( i \) 的样本 \( j \) 中基因 \( g \) 的模型为 \( Y_{ijg} = \alpha_{g} + X_{ij} \cdot \beta_{g} + \gamma_{ig} + \delta_{ig} \cdot \varepsilon_{ijg} \)，其中 \( \alpha_{g} \) 为基因总体表达，\( X_{ij} \) 为样本条件的设计矩阵，系数为 \( \beta_{g} \)，\( \gamma_{ig} \) 为加性批次效应，\( \delta_{ig} \) 为乘性批次效应，误差 \( \varepsilon_{ijg} \) 假定为均值为零的正态分布。<sup>[4](https://bmcbioinformatics.biomedcentral.com/counter/pdf/10.1186/s12859-018-2263-6.pdf)</sup> 因此 ComBat 将批次效应视为加性与乘性并存，即均值中心化与尺度调整的混合，这被认为是其在微阵列评估中表现强劲的原因。<sup>[1](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0017238)</sup>

其独特之处在于经验贝叶斯收缩：ComBat 对 \( \gamma_{ig} \) 和 \( \delta_{ig} \) 施加参数或非参数分层贝叶斯先验，并在每个批次内跨基因汇集信息，将批次效应估计值向经验估计的总体均值收缩。<sup>[4](https://bmcbioinformatics.biomedcentral.com/counter/pdf/10.1186/s12859-018-2263-6.pdf)</sup> 这种稳定化对小批次至关重要。<sup>[7](https://pmc.ncbi.nlm.nih.gov/articles/PMC4679072/)</sup> 对于 RNA-seq 计数，ComBat-seq 用负二项分布替代正态模型，\( \log\mu_{gij} = \log N_{j} + \alpha_{g} + X_{j} \cdot \beta_{g} + \gamma_{gi} \)，其中 \( \log N_{j} \) 为文库大小偏移量，\( \mathrm{Var}(y_{gij}) = \mu_{gij} + \phi_{gi} \cdot \mu_{gij}^{2} \)，因为计数具有偏态和过度离散，其均值-方差依赖关系无法用高斯假设捕捉。<sup>[8](https://link.springer.com/article/10.1186/s12859-023-05578-5)</sup><sup> • </sup><sup>[9](https://par.nsf.gov/servlets/purl/10293518)</sup>

## 操作流程

典型工作流包括五个阶段：初步评估、标准化、批次效应诊断、批次校正及校正效果评估；若仅标准化即可获得满意结果，则应尽量减少数据处理。<sup>[2](https://link.springer.com/article/10.1186/s13059-024-03401-9)</sup>

**检测。** 诊断包括可视化检查（如按批次着色的 PCA）和定量指标：基于距离的度量（对齐分数、距离比值分数、引导 PCA、kBET、LISI、香农熵、信噪比）和基于聚类的度量（调整[兰德指数](https://www.edgepedia.org/zh/rand-index)、平均轮廓宽度）。<sup>[2](https://link.springer.com/article/10.1186/s13059-024-03401-9)</sup> kBET 衡量 k 近邻中的批次混合程度，对较小的批次效应敏感。<sup>[2](https://link.springer.com/article/10.1186/s13059-024-03401-9)</sup>

**选择与应用。** 选择取决于数据类型和设计：ComBat 适用于对数转换的微阵列类数据，ComBat-seq 适用于原始 RNA-seq 计数，单细胞整合方法适用于 scRNA-seq。

**验证。** 同时检查批次混合和生物学变异的保留程度。在一项评估中，校正用于聚类的局部结构的方法优于直接校正计数数据的方法，而对校正后计数进行检验时会出现差异表达中的伪影，当差异表达检验在未校正数据上运行时该效应减弱。<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC12315870/)</sup>

## 起源

ComBat 由 W. Evan Johnson、Cheng Li 和 Ariel Rabinovic 于 2006 年在《Biostatistics》上报道。<sup>[10](https://doi.org/10.1093/biostatistics/kxj037)</sup> 其宣称的相对于先前方法的优势在于能够对小批次（少于 10 个样本，而此前要求超过 25 个）调整数据，使用参数或非参数经验贝叶斯估计。<sup>[5](https://www.genepattern.org/modules/docs/ComBat/2/)</sup> 早期的批次调整方法依赖于奇异值分解和机器学习分类，随后出现了灵活的替代方案：Jeffrey T. Leek 和 [John D. Storey](https://www.edgepedia.org/zh/john-d-storey) 于 2007 年在《PLoS Genetics》上报道的替代变量分析（Surrogate Variable Analysis）<sup>[11](https://doi.org/10.1371/journal.pgen.0030161)</sup>，以及 Jeffrey T. Leek 及其同事于 2012 年在《Bioinformatics》上发布的 sva 包。<sup>[12](https://doi.org/10.1093/bioinformatics/bts034)</sup>

## 变体

**批量数据。** ComBat-seq 由 Yuqing Zhang、Giovanni Parmigiani 和 W. Evan Johnson 于 2020 年报道<sup>[9](https://par.nsf.gov/servlets/purl/10293518)</sup>，将经验计数分布的分位数映射到无批次的负二项分布，校正后的数据保持为整数计数，兼容 edgeR 和 DESeq2。<sup>[9](https://par.nsf.gov/servlets/purl/10293518)</sup> 扩展包括集成到 sva 3.26.0 版本中的仅均值模型和参考批次模式<sup>[4](https://bmcbioinformatics.biomedcentral.com/counter/pdf/10.1186/s12859-018-2263-6.pdf)</sup>，以及 reComBat，后者用[正则化回归](https://www.edgepedia.org/zh/regularized-regression)替代线性回归，适用于批次-样本高度相关的情形。<sup>[2](https://link.springer.com/article/10.1186/s13059-024-03401-9)</sup>

**单细胞数据。** MNN 通过在高维表达空间中检测互近邻来校正批次，仅要求批次间共享一部分细胞群体；每个 MNN 对产生一个等于配对细胞间表达差异的校正向量，细胞特异性校正是这些向量的高斯核加权平均值。<sup>[13](https://www.nature.com/articles/nbt.4091)</sup> Harmony 由 Ilya Korsunsky 及其同事于 2019 年报道<sup>[14](https://doi.org/10.1038/s41592-019-0619-0)</sup>，校正 PCA 嵌入；BBKNN 由 Krzysztof Polański 及其同事于 2019 年报道<sup>[15](https://doi.org/10.1093/bioinformatics/btz625)</sup>，仅修改 k-NN 图；scVI 由 Romain Lopez 及其同事于 2018 年报道<sup>[16](https://doi.org/10.1038/s41592-018-0229-2)</sup>，使用变分自编码器学习潜空间并填补校正后的计数。

## 应用

基准测试显示出一致的权衡而非单一优胜者。scIB 研究在 13 项任务上对 16 种整合工具进行了基准测试，涉及多达 23 个批次和 100 万个细胞，涵盖 scRNA-seq 和 scATAC-seq，以批次去除与生物学变异保留程度 40/60 的权重评分。<sup>[3](https://www.nature.com/articles/s41592-021-01336-8)</sup> 在无标签情况下，该研究推荐 Scanorama 和 scVI 用于大型数据集，Scanorama 用于稀有细胞类型和细微变异，BBKNN 或 Seurat v3 用于较小数据集上的强批次效应。<sup>[3](https://www.nature.com/articles/s41592-021-01336-8)</sup> 这些排名与后来一项对八种广泛使用方法的校准研究相冲突，该研究发现 MNN、scVI 和 LIGER 常大幅改变数据，ComBat、ComBat-seq、BBKNN 和 Seurat 引入可检测的伪影，而 Harmony 是唯一始终表现良好的方法，部分原因是当批次不存在局部偏倚时它会减弱校正。<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC12315870/)</sup>

## 局限与替代方案

**混杂与不平衡设计。** 当病例与对照在不同批次中运行时，没有一种被评估的方法能在不去除病例-对照变异的情况下降低批次效应。<sup>[1](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0017238)</sup> 没有任何共享细胞群体的批次本质上难以校正，因为批次效应与生物学差异完全混杂，MNN 作者建议掺入已知组成的细胞对照。<sup>[13](https://www.nature.com/articles/nbt.4091)</sup> 在不平衡的组-批次设计中，保留组差异的两步校正会系统性膨胀 t 统计量并缩小置信区间，即使没有批次效应也会诱导出表观的组间差异；平衡设计不受影响，不平衡设计需要在统计模型中建模批次后重新分析。<sup>[7](https://pmc.ncbi.nlm.nih.gov/articles/PMC4679072/)</sup>

**过度校正。** 误用的校正可能产生虚假效应、使模型评估结果偏于乐观，并将生物学异质性误认为批次效应<sup>[17](https://doi.org/10.1016/j.tibtech.2017.02.012)</sup>，校正过程中的过拟合可导致统计功效损失和泛化能力差。<sup>[2](https://link.springer.com/article/10.1186/s13059-024-03401-9)</sup>

**替代方案。** 基于设计的规避，即在实验阶段跨条件平衡批次，避免了对校正的需求，是应对混杂的推荐方案。批次感知的统计建模，即在差异表达模型中包含批次项而非先校正，解决了不平衡设计中的误差膨胀问题。<sup>[7](https://pmc.ncbi.nlm.nih.gov/articles/PMC4679072/)</sup> RUV 方法从技术重复或阴性对照基因估计不需要的变异，当真实对照不可用时，RUV-III-PRPS 构建模拟技术重复的伪样本。<sup>[2](https://link.springer.com/article/10.1186/s13059-024-03401-9)</sup>

## References

1. [Removing Batch Effects in Analysis of Expression Microarray Data: An Evaluation of Six Batch Adjustment Methods](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0017238)
2. [Assessing and mitigating batch effects in large-scale omics studies (Genome Biology, 2024)](https://link.springer.com/article/10.1186/s13059-024-03401-9)
3. [Benchmarking atlas-level data integration in single-cell genomics (Nature Methods, 2022; Luecken et al., scIB)](https://www.nature.com/articles/s41592-021-01336-8)
4. [Batch effects: a diagnostic and an improved ComBat model (Zhang et al., BMC Bioinformatics 2018)](https://bmcbioinformatics.biomedcentral.com/counter/pdf/10.1186/s12859-018-2263-6.pdf)
5. [GenePattern - ComBat (v2) module documentation](https://www.genepattern.org/modules/docs/ComBat/2/)
6. [Batch correction methods used in single-cell RNA sequencing analyses are often poorly calibrated](https://pmc.ncbi.nlm.nih.gov/articles/PMC12315870/)
7. [Methods that remove batch effects while retaining group differences may lead to exaggerated confidence in downstream analyses (Nygaard et al., Biostatistics 2016)](https://pmc.ncbi.nlm.nih.gov/articles/PMC4679072/)
8. [pyComBat, a Python tool for batch effects correction in high-throughput molecular data using empirical Bayes methods (BMC Bioinformatics 2023)](https://link.springer.com/article/10.1186/s12859-023-05578-5)
9. [ComBat-seq: batch effect adjustment for RNA-seq count data (Zhang, Parmigiani, Johnson, NAR Genomics and Bioinformatics 2020)](https://par.nsf.gov/servlets/purl/10293518)
10. [W. Evan Johnson, Cheng Li, Ariel Rabinovic (2006). Adjusting batch effects in microarray expression data using empirical Bayes methods. Biostatistics.](https://doi.org/10.1093/biostatistics/kxj037)
11. [Jeffrey T Leek, John D Storey (2007). Capturing Heterogeneity in Gene Expression Studies by Surrogate Variable Analysis. PLoS Genetics.](https://doi.org/10.1371/journal.pgen.0030161)
12. [Jeffrey T. Leek and colleagues (2012). The sva package for removing batch effects and other unwanted variation in high-throughput experiments. Bioinformatics.](https://doi.org/10.1093/bioinformatics/bts034)
13. [Batch effects in single-cell RNA-sequencing data are corrected by matching mutual nearest neighbors (Nature Biotechnology 2018)](https://www.nature.com/articles/nbt.4091)
14. [Ilya Korsunsky and colleagues (2019). Fast, sensitive and accurate integration of single-cell data with Harmony. Nature Methods.](https://doi.org/10.1038/s41592-019-0619-0)
15. [Krzysztof Polański and colleagues (2019). BBKNN: fast batch alignment of single cell transcriptomes. Bioinformatics.](https://doi.org/10.1093/bioinformatics/btz625)
16. [Romain Lopez and colleagues (2018). Deep generative modeling for single-cell transcriptomics. Nature Methods.](https://doi.org/10.1038/s41592-018-0229-2)
17. [Why Batch Effects Matter in Omics Data, and How to Avoid Them (Trends in Biotechnology, 2017)](https://doi.org/10.1016/j.tibtech.2017.02.012)

---
*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/batch-effect-correction

English original: https://www.edgepedia.org/batch-effect-correction
