Scanpy Single-Cell Analysis
davila7/claude-code-templates
Walks through single-cell RNA-seq analysis with Scanpy: loading .h5ad and 10X data, QC, normalization, PCA and UMAP, Leiden clustering, marker genes and cell type annotation.
A skill your agent uses when correcting batch effects in merged bulk expression matrices with sample-level batch metadata while preserving biological group structure and generating before-and-after…
$ npx skills add aipoch/medical-research-skills --skill batch-effect-correction -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install aipoch/medical-research-skills batch-effect-correction --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'awesome-med-research-skills/Data Analysis/batch-effect-correction' .claude/skills/batch-effect-correction && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "batch-effect-correction" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/batch-effect-correction into .claude/skills/batch-effect-correction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "batch-effect-correction", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/batch-effect-correctionType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add aipoch/medical-research-skills --skill batch-effect-correction -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install aipoch/medical-research-skills batch-effect-correction --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/'awesome-med-research-skills/Data Analysis/batch-effect-correction' .agents/skills/batch-effect-correction && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "batch-effect-correction" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/batch-effect-correction into .agents/skills/batch-effect-correction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "batch-effect-correction", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add aipoch/medical-research-skills --skill batch-effect-correction -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install aipoch/medical-research-skills batch-effect-correction --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/'awesome-med-research-skills/Data Analysis/batch-effect-correction' .cursor/skills/batch-effect-correction && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "batch-effect-correction" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/batch-effect-correction into .cursor/skills/batch-effect-correction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "batch-effect-correction", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/aipoch/medical-research-skills.git --path 'awesome-med-research-skills/Data Analysis/batch-effect-correction'--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add aipoch/medical-research-skills --skill batch-effect-correction -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install aipoch/medical-research-skills batch-effect-correction --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/'awesome-med-research-skills/Data Analysis/batch-effect-correction' .gemini/skills/batch-effect-correction && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "batch-effect-correction" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/batch-effect-correction into .gemini/skills/batch-effect-correction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "batch-effect-correction", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install aipoch/medical-research-skills batch-effect-correctionInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add aipoch/medical-research-skills --skill batch-effect-correction -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/'awesome-med-research-skills/Data Analysis/batch-effect-correction' .github/skills/batch-effect-correction && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "batch-effect-correction" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/batch-effect-correction into .github/skills/batch-effect-correction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "batch-effect-correction", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add aipoch/medical-research-skills --skill batch-effect-correction -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install aipoch/medical-research-skills batch-effect-correction --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/'awesome-med-research-skills/Data Analysis/batch-effect-correction' .opencode/skills/batch-effect-correction && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "batch-effect-correction" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/batch-effect-correction into .opencode/skills/batch-effect-correction/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "batch-effect-correction", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
batch-effect-correctionA skill your agent uses when correcting batch effects in merged bulk expression matrices with sample-level batch metadata while preserving biological group structure and generating before-and-after…
Batch Effect Correction is an agent skill from aipoch/medical-research-skills. 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.
Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 22 other files, including scripts and reference files (for example `eval_report_batch-effect-correction_result.json`, `references/algorithm.md` and `references/cli-guide.md`).
It sits in Research & Science, covering Bioinformatics. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 7 files in scripts/ (R, from the files we listed), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
cloud.r-project.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Batch Effect Correction loads about 2.8k tokens when it runs, and up to ~6.2k if it reads all its reference files. Until then it costs about 88 tokens; SKILL.md has 1,074 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 1,074 words, ~2,757 tokens.
.claude/skills/batch-effect-correction/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.Run the following before the first analysis to install all required R packages:
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:
svaandlimmaare Bioconductor packages and requireBiocManagerfor installation.ggplot2is 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.
| 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 |
Rscript scripts/main.R \
--input_file ./expression_matrix.csv \
--group_file ./sample_info.csv \
--output_dir ./output/ \
--batch_column batch \
--group_column group \
--sample_column sample \
--log_transform auto \
--timeout_seconds 600 \
--seed 42| Short | Long | Type | Default | Description |
|---|---|---|---|---|
-i | --input_file | character | required | Expression matrix file (genes as rows, samples as columns) |
-g | --group_file | character | required | Sample metadata file (sample ID, group, and batch columns) |
-o | --output_dir | character | ./output/ | Output directory |
-b | --batch_column | character | batch | Batch column name in metadata |
-c | --group_column | character | group | Biological group column name in metadata |
-n | --sample_column | character | sample | Sample ID column name in metadata |
-l | --log_transform | character | auto | Log transform mode: auto, yes, no |
-t | --timeout_seconds | integer | 600 | Elapsed time limit in seconds; use 0 to disable |
-s | --seed | integer | 42 | Random seed for reproducibility |
Genes as rows, samples as columns, CSV format with gene ID in the first column.
"","Sample01","Sample02","Sample03"
"GeneA",5.12,4.87,6.03
"GeneB",8.44,8.11,7.95Requirements:
CSV with sample ID, biological group, and batch columns.
"sample","group","batch"
"Sample01","Control","Batch1"
"Sample02","Case","Batch1"
"Sample03","Case","Batch2"Requirements:
| File | Description |
|---|---|
corrected_expression_matrix.csv | Batch-corrected expression matrix |
matched_sample_info.csv | Standardized metadata used in the analysis |
batch_before_boxplot.pdf | Sample distribution boxplot before correction |
batch_after_boxplot.pdf | Sample distribution boxplot after correction |
batch_before_pca.pdf | PCA scatter plot before correction with batch-colored points |
batch_after_pca.pdf | PCA scatter plot after correction with batch-colored points |
batch_before_clustering.pdf | Hierarchical clustering before correction |
batch_after_clustering.pdf | Hierarchical clustering after correction |
session_info.txt | R session and package version info |
auto, yes, or no)log2(x + 1) only when requiredsva::ComBat() to remove batch-driven variationlimma::normalizeBetweenArrays() after ComBatEmpirical Bayes batch-effect correction using sva::ComBat(). Recommended when merged bulk expression datasets contain known batch labels and at least two biological groups.
Supports auto, yes, and no. The auto mode applies log2(x + 1) only when the matrix appears to be on a raw-like scale.
Post-correction normalization with limma::normalizeBetweenArrays() to reduce remaining cross-sample distribution differences.
Generates paired boxplots, PCA scatter plots with conditional batch ellipses, and hierarchical clustering plots before and after correction to assess whether batch-driven structure is reduced.
After a successful run, report:
corrected_expression_matrix.csv, batch_after_pca.pdf, batch_after_clustering.pdfRscript scripts/main.R \
-i expression_matrix.csv \
-g sample_info.csv \
-o ./outputRscript scripts/main.R \
-i expression_matrix.csv \
-g metadata.csv \
-o ./output \
-n sample_id \
-c condition \
-b platform_batchRscript scripts/main.R \
-i expression_matrix.csv \
-g sample_info.csv \
-o ./output \
-l no \
-t 0 \
-s 42| Error | Cause | Solution |
|---|---|---|
SKILL_FILE_NOT_FOUND | Input file does not exist | Check file path |
SKILL_EMPTY_FILE | Input file exists but contains no data | Recreate or re-export the file |
SKILL_MISSING_COLUMNS | Metadata file is missing sample, group, or batch columns | Check header names or pass custom column names |
SKILL_SAMPLE_MISMATCH | Metadata sample IDs do not match expression matrix columns | Verify sample names between files |
SKILL_INVALID_DATA | Dataset fails minimum design checks (< 2 batches, < 2 groups, < 2 samples per batch/group) | Review group counts, batch counts, and ID validity |
SKILL_INVALID_TYPE | Expression values are non-numeric or non-finite | Clean matrix values before running |
SKILL_TIMEOUT | Run exceeded the configured time limit | Increase --timeout_seconds or set it to 0 |
SKILL_DEPENDENCY_MISSING | Required R package is not installed | Install with: Rscript -e "BiocManager::install(c('sva','limma')); install.packages('ggplot2')" |
SKILL_RUNTIME_ERROR | Runtime I/O or filesystem error occurred | Check read/write permissions and environment |
IF error persists, READ: references/troubleshooting.md
Troubleshooting note: In environments where packages are not yet installed, SKILL_DEPENDENCY_MISSING will fire before file-validation or --help. Install dependencies first, then re-run to expose file-related errors or access --help.
This skill accepts:
If the user's request does not involve batch effect correction on merged bulk expression matrices — for example, asking to integrate single-cell RNA-seq data, process raw FASTQ files, run differential expression without batch labels, or analyze datasets with only one batch — do not proceed with the workflow. Instead respond:
"Batch Effect Correction is designed to remove batch-driven variation from merged bulk expression matrices using ComBat, while preserving biological group structure. Your request appears to be outside this scope. Please provide a multi-batch expression matrix with sample-level batch metadata, or use a more appropriate tool for single-cell integration, differential expression, or raw sequencing processing."
# Check help (requires packages installed)
Rscript scripts/main.R --help
# Run with bundled test data
Rscript scripts/main.R \
-i tests/data/expression_matrix_merged.csv \
-g tests/data/sample_info.csv \
-o tests/output/# Check corrected matrix exists
ls -la tests/output/corrected_expression_matrix.csv
# Check matched metadata exists
ls -la tests/output/matched_sample_info.csv
# Check PCA output exists
ls -la tests/output/batch_after_pca.pdfoptparseset.seed() for reproducibilityrequireNamespace() dependency checkssetTimeLimit()scripts/SKILL_* codesreferences/ directoryLast updated: 2026-04-27 | Version: 1.1.0
© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 17 other files (scripts, references) in awesome-med-research-skills/Data Analysis/batch-effect-correction of aipoch/medical-research-skills.
Open the folder on GitHubat commit 686e09d
Batch Effect Correction next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Batch Effect Correction this skillaipoch/medical-research-skills | 2k | — | ~2.8k | Automated safety check: Pass | MIT | |
| Scanpy Single-Cell Analysisdavila7/claude-code-templates | 32k | 16 repos | ~2.8k | Automated safety check: Pass | MIT | |
| deepTools NGS Toolkitdavila7/claude-code-templates | 32k | 13 repos | ~4.5k | Automated safety check: Pass | MIT | |
| Bulkrna Cosinor RhythmTianGzlab/OmicsClaw | 161 | — | ~840 | Automated safety check: Pass | Apache-2.0 | |
| PyDESeq2 Differential Expressiondavila7/claude-code-templates | 32k | 12 repos | ~4k | Automated safety check: Pass | MIT | |
| Gtars Genomic Interval Toolkitdavila7/claude-code-templates | 32k | 12 repos | ~1.9k | Automated safety check: Pass | MIT |
davila7/claude-code-templates
Walks through single-cell RNA-seq analysis with Scanpy: loading .h5ad and 10X data, QC, normalization, PCA and UMAP, Leiden clustering, marker genes and cell type annotation.
davila7/claude-code-templates
Guides use of deepTools on sequencing data: BAM to bigWig conversion, QC, sample correlation, and heatmaps or profiles around TSS and peaks for ChIP-seq, RNA-seq and ATAC-seq.
TianGzlab/OmicsClaw
Load when the user needs Deterministic fixed-period 24-hour single-component cosinor OLS rhythm analysis for a bulk RNA time-course CSV.
davila7/claude-code-templates
Runs differential gene expression analysis on bulk RNA-seq counts with PyDESeq2: design formulas, Wald tests, FDR correction and volcano or MA plots.
davila7/claude-code-templates
Works with genomic intervals using gtars, a Rust toolkit with Python bindings: overlap detection, coverage tracks, tokenization for ML models and reference sequences.
davila7/claude-code-templates
Manages biological datasets with LaminDB: versioned artifacts, run lineage, ontology-based annotation, schema validation and links to workflow managers and ML tools.
aipoch/medical-research-skills
Complete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster…
aipoch/medical-research-skills
Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.
aipoch/medical-research-skills
Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.
aipoch/medical-research-skills
A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.
aipoch/medical-research-skills
Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…
aipoch/medical-research-skills
Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.
Categories
A skill your agent uses when correcting batch effects in merged bulk expression matrices with sample-level batch metadata while preserving biological group structure and generating before-and-after…. Batch Effect Correction is an agent skill from aipoch/medical-research-skills. 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.
Batch Effect Correction fits situations like: tasks that involve Bioinformatics.
Run `npx skills add aipoch/medical-research-skills --skill batch-effect-correction -a claude-code`. Or copy the skill folder (awesome-med-research-skills/Data Analysis/batch-effect-correction in aipoch/medical-research-skills) into .claude/skills/batch-effect-correction in your project. Claude Code loads it when a task matches its description.
Run `npx skills add aipoch/medical-research-skills --skill batch-effect-correction -a codex`. Or copy the skill folder (awesome-med-research-skills/Data Analysis/batch-effect-correction in aipoch/medical-research-skills) into .agents/skills/batch-effect-correction in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill batch-effect-correction -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/batch-effect-correction, .gemini/skills/batch-effect-correction, .github/skills/batch-effect-correction and .opencode/skills/batch-effect-correction in your project.
Going by SKILL.md and its folder, Batch Effect Correction needs R for the scripts in its folder.
SKILL.md names 1 domain. In commands or code: cloud.r-project.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Batch Effect Correction is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Batch Effect Correction: Scanpy Single-Cell Analysis (davila7/claude-code-templates, 32k stars), deepTools NGS Toolkit (davila7/claude-code-templates, 32k stars), Bulkrna Cosinor Rhythm (TianGzlab/OmicsClaw, 161 stars) and PyDESeq2 Differential Expression (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,974 GitHub stars. The repository holds 567 skills in this directory. The repository was last updated on September 17, 2026.
Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.