batch-effect-correction
Corrects batch effects in merged bulk expression matrices with sample-level batch metadata using sva::ComBat(), preserves biological group structure, applies limma normalization, and generates paired before-and-after QC plots (boxplot, PCA, hierarchical clustering).
Veto GatesRequired pass for any deployment consideration
| Dimension | Result | Detail |
|---|---|---|
| Scientific Integrity | PASS | No fabrication of statistical values; ComBat and normalizeBetweenArrays outputs derive from sva and limma package computations on user data |
| Practice Boundaries | PASS | No medical diagnoses; skill corrects technical batch variation without clinical conclusions |
| Methodological Ground | PASS | ComBat with biological group as covariate (mod matrix) is the correct approach for preserving biological signal during batch correction; post-ComBat limma normalization is methodologically sound |
| Code Usability | PASS | Syntactically correct; sva::ComBat() called with proper mod matrix; limma::normalizeBetweenArrays() applied post-correction; OMP thread limit set at startup for reproducibility; no infinite loops; clean exit codes |
Core Capability90 / 100 — 8 Categories
Medical TaskExecution Average: 88.2 / 100 — Assertions: 24/25 Passed
Full 4-step workflow documented; auto log-transform correct; 9 output files produced; Agent Response Contract complete
Custom column resolution correct; log_transform no bypasses log2; example in SKILL.md
SKILL_INVALID_DATA correctly triggered; ComBat design requirement enforced; minimum requirements documented
Extra columns ignored with warning; subset behavior documented; SKILL_SAMPLE_MISMATCH for reverse case
SKILL_INVALID_DATA correctly triggered; source genes/samples not identified in error message
Key Strengths
- Most complete error handling of the five skills: nine SKILL_* codes covering SKILL_INVALID_DATA, SKILL_INVALID_TYPE, SKILL_EMPTY_FILE, SKILL_RUNTIME_ERROR, and SKILL_TIMEOUT
- OMP/BLAS thread limit env vars set at startup ensure cross-platform reproducibility for ComBat's numerical computations
- Graceful handling of extra expression columns (warn and continue) matches real-world pipeline usage where QC samples may be present
- Auto log-transform detection with documented thresholds (max > 50 or 99th quantile > 16) prevents silent misclassification
- Comprehensive paired before/after QC plots (boxplot, PCA, hierarchical clustering) provide full batch correction assessment