Batch Effect Correction

Use when correcting batch effects in merged bulk expression matrices with sample-level batch metadata while preserving biological group structure and generating before-and-after QC plots. NOT for: single-cell integration, raw FASTQ processing, differential expression without batch labels, or datasets without biological groups.

2,068 stars 206 forksData & Analytics

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add aipoch/medical-research-skills --skill batch-effect-correction
Manual install
git clone --depth 1 https://github.com/aipoch/medical-research-skills.git /tmp/medical-research-skills
mkdir -p ~/.claude/skills
cp -r /tmp/medical-research-skills/awesome-med-research-skills/Data Analysis/batch-effect-correction ~/.claude/skills/batch-effect-correction

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Batch Effect Correction

## Prerequisites

Run the following before the first analysis to install all required R packages:

```bash
Rscript -e "if (!require('BiocManager', quietly=TRUE)) install.packages('BiocManager'); BiocManager::install(c('sva', 'limma')); install.packages('ggplot2', repos='https://cloud.r-project.org')"
```

> Note: `sva` and `limma` are Bioconductor packages and require `BiocManager` for installation. `ggplot2` is a standard CRAN package.

**The skill cannot run until these packages are installed.** In new or bare R environments, always run the prerequisite step first.

---

## When to Read External Files

| Situation | File to Read | Purpose |
|-----------|--------------|---------|
| **Need algorithm details** | `references/algorithm.md` | ComBat workflow, assumptions, and QC logic |
| **Need to run analysis** | `scripts/main.R` | Execute: `Rscript scripts/main.R --input_file ... --group_file ...` |
| **Encounter errors** | `references/troubleshooting.md` | Common errors and solutions |
| **Need CLI examples** | `references/cli-guide.md` | Detailed CLI usage examples and baseline run record |
| **Need test data** | `tests/data/` | Sample input files for testing |

---

## Usage
Read the full skill on GitHub

Details

Skill name
batch-effect-correction
Path
awesome-med-research-skills/Data Analysis/batch-effect-correction/SKILL.md
License
MIT
Repo updated
17 September 2026

FAQ

What does the Batch Effect Correction skill do?

Use when correcting batch effects in merged bulk expression matrices with sample-level batch metadata while preserving biological group structure and generating before-and-after QC plots. NOT for: single-cell integration, raw FASTQ processing, differential expression without batch labels, or datasets without biological groups.

How do I install the Batch Effect Correction skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add aipoch/medical-research-skills --skill batch-effect-correction. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Batch Effect Correction popular?

It lives in aipoch/medical-research-skills, which has 2,068 GitHub stars and 206 forks.

Related skills

Browse the most popular Claude skills, all data & analytics skills, or write your own with the skills generator.