bio-differential-expression-batch-correction
Remove batch effects from RNA-seq data using ComBat, ComBat-Seq, limma removeBatchEffect, and SVA for unknown batch variables. Use when correcting batch effects in expression data.
npx skills add majiayu000/claude-skill-registry --skill batch-correction-gptomics-bioskills-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Batch Effect Correction ## ComBat-Seq (Count Data) ```r library(sva) # counts: raw count matrix (genes x samples) # batch: vector of batch labels # group: vector of biological condition (optional, to preserve) corrected_counts <- ComBat_seq(counts = as.matrix(counts), batch = batch, group = condition, full_mod = TRUE) # Result is batch-corrected count matrix # Use for visualization, clustering, but NOT for DE (use design formula instead) ``` ## ComBat (Normalized Data) ```r library(sva) # For normalized expression (log-transformed, TPM, etc.) # NOT for raw counts # Create model matrix mod <- model.matrix(~ condition, data = metadata) mod0 <- model.matrix(~ 1, data = metadata) # Run ComBat corrected_expr <- ComBat(dat = as.matrix(normalized_expr), batch = metadata$batch, mod = mod, par.prior = TRUE) ``` ## limma removeBatchEffect ```r library(limma) # For visualization/clustering only # Preserves group differences while removing batch design <- model.matrix(~ condition, data = metadata) corrected_expr <- removeBatchEffect(normalized_expr, batch = metadata$batch, design = design) # For PCA, heatmaps, etc. ``` ## DESeq2 Design Formula (Recommended for DE) ```r library(DESeq2) # Incl
- ComBat-Seq (Count Data)
- ComBat (Normalized Data)
- limma removeBatchEffect
- DESeq2 Design Formula (Recommended for DE)
- Surrogate Variable Analysis (SVA)
- SVA with DESeq2
- Visualize Batch Effects
- Quantify Batch Effect
- Harmony (Single-Cell Integration)
- When NOT to Correct
- Related Skills
What does the bio-differential-expression-batch-correction skill do?
Remove batch effects from RNA-seq data using ComBat, ComBat-Seq, limma removeBatchEffect, and SVA for unknown batch variables. Use when correcting batch effects in expression data.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill batch-correction-gptomics-bioskills-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
