Bulk RNA-seq batch correction with ComBat

Apply ComBat batch correction to merged RNA-seq and microarray expression matrices.

1.2k|145|Updated Mar 22, 2021
One-click install
npx skills add https://github.com/Starlitnightly/omicverse --skill bulk-rna-seq-batch-correction-with-combat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Bulk RNA-seq batch correction with ComBat
Source: https://github.com/Starlitnightly/omicverse/tree/main/.claude/skills/bulk-combat-correction
Command: npx skills add https://github.com/Starlitnightly/omicverse --skill bulk-rna-seq-batch-correction-with-combat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires omicverse, anndata, pandas, matplotlib, numpy, and includes references (resource) components.

What problem does it solves? Combining bulk RNA-seq or microarray data from multiple experiments often introduces technical batch effects that can obscure biological signals. This Skill automates the ComBat batch correction process to harmonize datasets, ensuring more reliable downstream analyses.

Core Features & Use Cases

  • Data Merging: Concatenate multiple bulk expression matrices from different batches into a unified dataset.
  • ComBat Batch Correction: Apply the ComBat algorithm to effectively remove technical batch effects.
  • Matrix Export: Export both the raw and batch-corrected expression matrices for transparency and further use.
  • Correction Benchmarking: Visualize PCA embeddings before and after correction to assess the effectiveness of batch removal.
  • Use Case: Integrate three independent microarray datasets of ovarian cancer, apply ComBat to remove batch effects, and then visualize the PCA plots to confirm successful harmonization before downstream analysis.

Quick Start

Combine my three bulk RNA-seq batches, apply ComBat correction, and show PCA plots before and after to confirm batch removal.

Frequently Asked Questions about Bulk RNA-seq batch correction with ComBat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove batch effects from bulk RNA-seq data across multiple experiments?

Batch effects from different sequencing runs or platforms can be removed using ComBat batch correction. This Skill applies ComBat via omicverse to harmonize merged expression matrices, outputting corrected data alongside the original in AnnData format for reliable downstream analyses like differential expression and PCA.

Can I use ComBat to correct microarray and bulk RNA-seq data together?

Yes. ComBat batch correction works on both bulk RNA-seq and microarray expression matrices. This Skill merges multi-platform datasets into a unified gene × sample matrix and applies ComBat to remove technical batch effects, enabling cross-platform data integration.

What format do I need to prepare my expression data in before batch correction?

Expression data must be formatted as an AnnData object with gene × sample dimensions and batch metadata annotations. This Skill accepts merged bulk matrices in this format and outputs corrected expression in adata.layers['batch_correction'] alongside raw data in adata.X.

How do I verify that batch correction worked on my data?

Batch correction effectiveness is assessed by comparing PCA embeddings before and after ComBat correction. This Skill generates visualization plots to confirm that batch-driven clustering has been removed and biological signal is preserved across batches.

Can I export the batch-corrected matrices after correction?

Yes. After ComBat batch correction, this Skill exports both raw and corrected expression matrices in CSV and h5ad formats, enabling transparency and downstream use of harmonized data in other analysis tools.