bio-experimental-design-batch-design
Designs experiments to minimize and account for batch effects using balanced layouts and blocking strategies. Use when planning multi-batch experiments, assigning samples to sequencing lanes, or designing studies where technical variation could confound biological signals.
npx skills add majiayu000/claude-skill-registry --skill batch-design --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 Design and Mitigation ## Core Principle Batch effects are unavoidable. Good design makes them correctable. ## Design Rules 1. **Never confound batch with condition** - Each batch must contain all conditions 2. **Balance samples across batches** - Equal numbers per condition per batch 3. **Randomize within constraints** - Avoid systematic patterns 4. **Include controls** - Same samples across batches if possible ## Balanced Design Example ```r # BAD: Confounded design # Batch 1: All treated samples # Batch 2: All control samples # -> Cannot separate batch from treatment # GOOD: Balanced design # Batch 1: 3 treated, 3 control # Batch 2: 3 treated, 3 control # -> Batch effect can be estimated and removed ``` ## Sample Assignment ```r library(designit) # Create balanced assignment samples <- data.frame( sample_id = paste0('S', 1:24), condition = rep(c('ctrl', 'treat'), each = 12), sex = rep(c('M', 'F'), 12) ) # Optimize batch assignment batch_design <- osat(samples, batch_size = 8, balance_cols = c('condition', 'sex')) ``` ## Detecting Batch Effects ```r library(sva) # From count matrix mod <- model.matrix(~condition, colData) mod0 <- model.matrix(~1, colData) # Estimate number
- Core Principle
- Design Rules
- Balanced Design Example
- Sample Assignment
- Detecting Batch Effects
- Correction Methods
- Documenting Design
- Related Skills
What does the bio-experimental-design-batch-design skill do?
Designs experiments to minimize and account for batch effects using balanced layouts and blocking strategies. Use when planning multi-batch experiments, assigning samples to sequencing lanes, or designing studies where technical variation could confound biological signals.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill batch-design --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.
