Agent skill

Immune Pathway Analysis

by aipoch in aipoch/medical-research-skills

Run immune pathway GSVA or ssGSEA analysis from a bulk expression matrix, a sample group file, and a local immune Reactome gene-set table, then export differential pathway results and a heatmap for…

MITAuto-check passedData & Analytics

Install Immune Pathway Analysis

skills CLI
$ npx skills add aipoch/medical-research-skills --skill immune-pathway-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aipoch/medical-research-skills immune-pathway-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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/immune-pathway-analysis' .claude/skills/immune-pathway-analysis && rm -rf skills-src

Use ~/.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/

Facts

Skill name
immune-pathway-analysis
GitHub stars
2k
Token cost
~3k tokens
SKILL.md length
1,366 words
Files
20 (incl. scripts, references)
Skills in repo
578
Repo updated
First seen
Licence
MIT

At a glance

Run immune pathway GSVA or ssGSEA analysis from a bulk expression matrix, a sample group file, and a local immune Reactome gene-set table, then export differential pathway results and a heatmap for…

  • Works in 8 steps: Confirm the request is in scope with… → Ask only for missing file paths or… → Run scripts/main.R with the appropriate… → …
  • Data & Analytics work in your project
  • SKILL.md covers When to Use, Execution Model, Completion Format and When to Read External Files, plus 8 more sections
  • Runs R scripts from its folder

What it does

Immune Pathway Analysis is an agent skill from aipoch/medical-research-skills. Run immune pathway GSVA or ssGSEA analysis from a bulk expression matrix, a sample group file, and a local immune Reactome gene-set table, then export differential pathway results and a heatmap for two-group comparison.

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 23 other files, including scripts and reference files (for example `eval_report_immune-pathway-analysis_result.json`, `references/algorithm.md` and `references/cli-guide.md`).

It sits in Data & Analytics. 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.

When your agent uses it

  • Data & Analytics work in your project

Example prompts

  • “/immune-pathway-analysis”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the request is in scope with this SKILL.md.
  2. Ask only for missing file paths or missing group labels.
  3. Run scripts/main.R with the appropriate mode.
  4. Use --mode analyze to score pathways and export tables.
  5. Use --mode visualize to regenerate a heatmap from a saved result object.
  6. Use --mode full to run analysis and visualization in one pass.
  7. Read reference files only when you need deeper algorithm, troubleshooting, or CLI details.
  8. After execution, report the output directory, scoring method, comparison groups, and the primary output files.

What it can do on your machine

Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Ships 9 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.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Immune Pathway Analysis loads about 3k tokens when it runs, and up to ~7.1k if it reads all its reference files. Until then it costs about 61 tokens; SKILL.md has 1,366 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.1k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 1,366 words, ~3,003 tokens.

Download SKILL.mdSave it as .claude/skills/immune-pathway-analysis/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.
name
immune-pathway-analysis
description
Run immune pathway GSVA or ssGSEA analysis from a bulk expression matrix, a sample group file, and a local immune Reactome gene-set table, then export differential pathway results and a heatmap for two-group comparison.
license
MIT
author
AIPOCH

Source: https://github.com/aipoch/medical-research-skills

Immune Pathway Analysis

When to Use

Use this skill when the goal is to quantify immune-related pathway activity from bulk expression data and compare pathway enrichment between two sample groups.

Typical requests:

  • "Run immune pathway GSVA for these samples."
  • "Score immune Reactome pathways and compare case versus control."
  • "Generate an immune pathway heatmap from a saved result."
  • "Use a local immune gene-set table for pathway scoring."

This skill is appropriate for:

  • Bulk RNA-seq or microarray-like expression matrices
  • Local immune Reactome gene-set tables prepared in advance
  • Two-group pathway differential analysis with limma
  • Reproducible CLI execution with append-only provenance files

Execution Model

This is a hybrid skill.

  1. Confirm the request is in scope with this SKILL.md.
  2. Ask only for missing file paths or missing group labels.
  3. Run scripts/main.R with the appropriate mode.
  4. Use --mode analyze to score pathways and export tables.
  5. Use --mode visualize to regenerate a heatmap from a saved result object.
  6. Use --mode full to run analysis and visualization in one pass.
  7. Read reference files only when you need deeper algorithm, troubleshooting, or CLI details.
  8. After execution, report the output directory, scoring method, comparison groups, and the primary output files.

Completion Format

After a successful run, summarize the outcome in 3 short parts:

  1. Mode and method used, plus the compared groups.
  2. Output directory and key files written.
  3. Important warnings that affect interpretation, such as no pathways meeting fdr_threshold and fallback to |t| ranking.

Example completion summary:

Completed immune pathway analysis in ./output/run_001 using gsva for Case versus Control. Key outputs: table/immune_pathway_diff.csv, table/immune_pathway_scores.csv, data/immune_pathway_result.rds, and plot/immune_pathway_heatmap.pdf. No pathways passed FDR <= 0.05, so the workflow used the documented fallback ranking by |t| for the top-pathway export and heatmap subset.

When to Read External Files

SituationFile to ReadPurpose
Need method details or interpretation guidancereferences/algorithm.mdReview GSVA logic, limma comparison, and interpretation guidance
Need runnable commands or dependency setupreferences/cli-guide.mdReuse CLI examples, fixture notes, and validated baseline records
Need error remediationreferences/troubleshooting.mdMap error codes, fallback behavior, and common fixes
Need the executable workflowscripts/main.RUse the CLI entry point
Need minimal demo inputstests/data/Use the bundled example expression, group, and gene-set files

When Not to Use

  • Immune cell fraction estimation or deconvolution
  • Gene-level differential expression without pathway scoring
  • Single-cell clustering, annotation, or communication analysis
  • Clinical diagnosis or treatment selection

If the request falls outside these boundaries, stop and state that this skill only covers bulk immune pathway GSVA or ssGSEA analysis from a local immune gene-set table.

Input Validation

This skill accepts:

  • A bulk expression matrix in CSV or TSV format
  • A sample group file with exactly two comparison groups for analysis mode
  • A local immune gene-set table in long format
  • An existing output directory containing data/immune_pathway_result.rds for visualize mode

If the user's request does not involve bulk immune pathway scoring from local files, do not proceed with the workflow. Instead respond:

"Immune Pathway Analysis is designed for bulk immune pathway GSVA or ssGSEA analysis from a local gene-set table. Your request appears to be outside this scope. Please provide a bulk expression matrix, a two-group sample file, and a local pathway table, or use a more appropriate skill for deconvolution, differential expression, or single-cell analysis."

If the request is in scope but required inputs are missing, ask only for the missing file paths or group labels before running scripts/main.R.

Usage

bash
Rscript scripts/main.R \
  --mode full \
  --input_file ./expression_matrix.csv \
  --group_file ./group_info.csv \
  --geneset_file ./immune_genesets.csv \
  --case_group Case \
  --control_group Control \
  --output_dir ./output/run_001 \
  --seed 42

Arguments

ShortLongTypeDefaultDescription
-m--modecharacteranalyzeRun mode: analyze, visualize, or full
-i--input_filecharacterrequired for analyze or fullExpression matrix file in CSV or TSV format
-g--group_filecharacterrequired for analyze or fullSample group file in CSV or TSV format
--geneset_filecharacterrequired for analyze or fullLocal immune gene-set table in long format
--geneset_columncharactergs_namePathway column in the gene-set table
--gene_columncharactergene_symbolGene symbol column in the gene-set table
--focus_genesetscharacteroptionalComma-separated pathway names to prioritize in the heatmap
-a--case_groupcharacterrequired for analyze or fullCase group label
-c--control_groupcharacterrequired for analyze or fullControl group label
-o--output_dircharacter./outputOutput directory inside this skill folder
--methodcharactergsvaScoring method: gsva or ssgsea
--kcdfcharacterGaussianGSVA kernel: Gaussian, Poisson, or none
--min_szinteger2Minimum gene-set size
--max_szinteger5000Maximum gene-set size
--parallel_szinteger1Worker count passed to GSVA::gsva
--mx_difflogicalTRUEGSVA mx.diff flag
--taudouble1GSVA tau value
--fdr_thresholddouble0.05FDR threshold for significance summaries
--top_ninteger20Maximum number of pathways exported to the top-score matrix
--seedinteger42Random seed
--timeout_secondsinteger0Optional timeout in seconds; 0 disables timeout
--plot_filecharacterimmune_pathway_heatmap.pdfHeatmap file name stored under plot/
--plot_titlecharacterImmune Pathway GSVA HeatmapHeatmap title
--widthdouble14Heatmap width in inches
--heightdouble8Heatmap height in inches
--colorscharacter#91bfdb,#ffffbf,#fc8d59Comma-separated heatmap colors
--scalecharacternoneHeatmap scale mode: none, row, or column
--cluster_rowslogicalTRUECluster heatmap rows
--cluster_colslogicalFALSECluster heatmap columns
--show_rownameslogicalTRUEShow pathway names on the heatmap
--show_colnameslogicalFALSEShow sample names on the heatmap
--fontsizedouble10Base heatmap font size
--fontsize_rowdouble8Heatmap row font size
--fontsize_coldouble9Heatmap column font size
--legend_cexdouble1Legend text scaling factor
--top_upintegeroptionalNumber of up-regulated pathways kept for plotting
--top_downintegeroptionalNumber of down-regulated pathways kept for plotting
--top_modecharacterbothHeatmap subset mode: both, up, down, or total
--sort_bycharacterFDRPathway ranking: FDR, absLFC, or LFC
--append_statslogicalFALSEAppend FDR and logFC to heatmap labels
--label_max_charsinteger90Maximum heatmap label length
Show full SKILL.md (430 more words)Show less

Input Format

Expression Matrix
  • CSV or TSV file
  • The first column contains gene identifiers
  • Remaining columns are sample names
  • Values must be numeric
  • Missing values are not allowed
Group File
  • CSV or TSV file with a header
  • Supported sample column names: sample, sample_name, sample_id, sampleid
  • Supported group column names: group, condition, class, cluster
  • Sample names must match the expression matrix columns
Gene-Set Table
  • CSV or TSV file in long format
  • One row per gene-to-pathway mapping
  • Must contain a pathway column and a gene column
  • Default column names are gs_name and gene_symbol
  • Alternate schemas are supported through --geneset_column and --gene_column

Output Files

FileDescription
table/immune_pathway_diff.csvDifferential pathway results from limma
table/immune_pathway_scores.csvFull GSVA or ssGSEA score matrix
table/immune_pathway_scores_top.csvTop pathway score matrix selected from the differential results
table/immune_gene_set_summary.csvPer-pathway gene counts after table parsing
data/immune_pathway_result.rdsSaved analysis object used by visualize mode
plot/immune_pathway_heatmap.pdfHeatmap PDF generated in visualize or full mode
session_info.txtR session and package version record
output_manifest.txtAppend-only output manifest
run_record.txtAppend-only run record

When no pathways pass the selected fdr_threshold, the workflow logs a warning and falls back to ranking pathways by |t|. In that case, table/immune_pathway_scores_top.csv can still be populated for downstream plotting and review.

Error Handling

Error CodeMeaningSolution
SKILL_FILE_NOT_FOUNDAn input file or saved result object does not existCheck the path and rerun
SKILL_MISSING_COLUMNSThe group file or gene-set table lacks required columnsRename the columns or export the correct table
SKILL_EMPTY_DATAThe matrix, gene-set list, or plotting matrix is emptyCheck the input content, gene overlap, and selected gene-set columns
SKILL_INVALID_PARAMETERA CLI value is missing, invalid, or unsafeReview the argument table and rerun
SKILL_SAMPLE_MISMATCHSamples do not align between the matrix and group fileAlign sample names before rerunning
SKILL_PACKAGE_NOT_FOUNDRequired R packages are missingInstall the packages listed in references/cli-guide.md
SKILL_VERSION_INCOMPATIBLEInstalled package versions are a known incompatible combinationFollow the version guidance in references/cli-guide.md and rerun

Read references/troubleshooting.md if the error persists.

Testing

  • Minimal runnable files are bundled in tests/data/.
  • The bundled smoke-test dataset is intended to validate execution and the fallback path. It may legitimately produce zero pathways with FDR <= 0.05.
  • tests/data/immune_genesets_minimal.csv is a unit-test fixture, not a drop-in full-workflow demo with tests/data/expression_matrix.csv unless you prepare a matching matrix with overlapping genes.
  • Use Rscript tests/run_unit_tests.R to run boundary checks, helper-function checks, and validation tests without the full GSVA workflow.
  • Use Rscript tests/run_tests.R to execute the unit checks plus the full smoke-test workflow.
  • Use Rscript tests/test_skill.R tests/output to validate the expected outputs.
  • The validated test baseline, package versions, fixture notes, and custom-column CLI examples are documented in references/cli-guide.md.

© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 19 other files (scripts, references) in awesome-med-research-skills/Data Analysis/immune-pathway-analysis of aipoch/medical-research-skills.

  • SKILL.md
  • eval_report_immune-pathway-analysis_result.json
  • references/algorithm.md
  • references/cli-guide.md
  • references/troubleshooting.md
  • scripts/cli_options.R
  • scripts/functions.R
  • scripts/io.R
  • scripts/main.R
  • scripts/plot_helpers.R
  • scripts/recording.R
  • scripts/run_analysis.R
  • scripts/utils.R
  • scripts/visualization.R
  • tests/data/expression_matrix.csv
  • tests/data/group_info.csv
  • tests/data/immune_genesets.csv
  • … and 3 more

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Immune Pathway Analysis 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.

Immune Pathway Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Immune Pathway Analysis this skillaipoch/medical-research-skills2k—~3kAutomated safety check: PassMIT
MatplotlibzLanqing/codex-claude-academic-skills4.7k17 repos~2.9kAutomated safety check: PassMIT
Exploratory Data Analysisspacering-net/codeg3.9k14 repos~3.6kAutomated safety check: PassMIT
Scikit LearnzLanqing/codex-claude-academic-skills4.7k16 repos~3.9kAutomated safety check: PassBSD-3-Clause
Chart Visualizationbytedance/deer-flow84k2 repos~840Automated safety check: PassMIT
TimesFM Forecastinggoogle-research/timesfm34k—~4.7kAutomated safety check: PassApache-2.0

Similar skills

  • Matplotlib

    zLanqing/codex-claude-academic-skills

    Low-level plotting library for full customization. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 17 repos~2.9k tokens
    Data & AnalyticsAuto-check passed
  • Exploratory Data Analysis

    spacering-net/codeg

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    3.9k GitHub starsUsed in 14 repos~3.6k tokens
    Data & AnalyticsAuto-check passed
  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 16 repos~3.9k tokens
    Data & AnalyticsAuto-check passed
  • Chart Visualization

    bytedance/deer-flow

    Picks a suitable chart type from 26 options for your data, maps the data to that chart's parameters and generates a chart image through a JavaScript script.

    84k GitHub starsUsed in 2 repos~840 tokens
    Data & AnalyticsAuto-check passed
  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 9 days ago
    Data & AnalyticsAuto-check passed
  • Sandbox Bench

    vercel/next.js

    Official

    Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…

    143k GitHub stars~4.1k tokensUpdated today
    Data & AnalyticsAuto-check passed

More from aipoch/medical-research-skills

All 578 skills in this repo
  • Academic Poster Generator

    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…

    2k GitHub stars~2.2k tokensUpdated 22 days ago
    Auto-check passed
  • Diagnostic Study Quality Assessment Quadas

    aipoch/medical-research-skills

    Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.

    2k GitHub stars~1.4k tokensUpdated 22 days ago
    Auto-check passed
  • Exploratory Data Analysis

    aipoch/medical-research-skills

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    2k GitHub stars~3.7k tokensUpdated 22 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

    A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.

    2k GitHub stars~1.8k tokensUpdated 22 days ago
    Auto-check passed
  • Journal Skills

    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…

    2k GitHub stars~1.7k tokensUpdated 22 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

    Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.

    2k GitHub stars~1.3k tokensUpdated 22 days ago
    Auto-check passed

Questions about Immune Pathway Analysis

What does Immune Pathway Analysis do?

Run immune pathway GSVA or ssGSEA analysis from a bulk expression matrix, a sample group file, and a local immune Reactome gene-set table, then export differential pathway results and a heatmap for…. Immune Pathway Analysis is an agent skill from aipoch/medical-research-skills. Run immune pathway GSVA or ssGSEA analysis from a bulk expression matrix, a sample group file, and a local immune Reactome gene-set table, then export differential pathway results and a heatmap for two-group comparison.

When should I use Immune Pathway Analysis?

Immune Pathway Analysis fits situations like: data & Analytics work in your project.

How do I install Immune Pathway Analysis in Claude Code?

Run `npx skills add aipoch/medical-research-skills --skill immune-pathway-analysis -a claude-code`. Or copy the skill folder (awesome-med-research-skills/Data Analysis/immune-pathway-analysis in aipoch/medical-research-skills) into .claude/skills/immune-pathway-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Immune Pathway Analysis in Codex?

Run `npx skills add aipoch/medical-research-skills --skill immune-pathway-analysis -a codex`. Or copy the skill folder (awesome-med-research-skills/Data Analysis/immune-pathway-analysis in aipoch/medical-research-skills) into .agents/skills/immune-pathway-analysis in your project. Codex loads it when a task matches its description.

Can I use Immune Pathway Analysis in Cursor, Gemini CLI or GitHub Copilot?

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 immune-pathway-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/immune-pathway-analysis, .gemini/skills/immune-pathway-analysis, .github/skills/immune-pathway-analysis and .opencode/skills/immune-pathway-analysis in your project.

What does Immune Pathway Analysis need to run?

Going by SKILL.md and its folder, Immune Pathway Analysis needs R for the scripts in its folder.

Does Immune Pathway Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Immune Pathway Analysis safe to install?

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.

What licence does Immune Pathway Analysis use?

Immune Pathway Analysis is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Immune Pathway Analysis use?

About 3k tokens (SKILL.md is roughly 12k 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 4.1k tokens, read only when the agent opens those files.

What are the alternatives to Immune Pathway Analysis?

Skills that share tags, products or a category with Immune Pathway Analysis: Matplotlib (zLanqing/codex-claude-academic-skills, 4.7k stars), Exploratory Data Analysis (spacering-net/codeg, 3.9k stars), Scikit Learn (zLanqing/codex-claude-academic-skills, 4.7k stars) and Chart Visualization (bytedance/deer-flow, 84k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Immune Pathway Analysis?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,978 GitHub stars. The repository holds 578 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.