with one click
gsea
Run GSEA on a ranked gene list and produce the enrichment table, running-score table, and enrichment plots.
Run GSEA on a ranked gene list and produce the enrichment table, running-score table, and enrichment plots.
| name | gsea |
| description | Run GSEA on a ranked gene list and produce the enrichment table, running-score table, and enrichment plots. |
| license | MIT |
| author | AIPOCH |
| Situation | Read | Purpose |
|---|---|---|
| Need algorithm details | references/algorithm.md | Statistical method and formulas |
| Need to run an analysis | scripts/main.R | Full command reference |
| Hit an error | references/troubleshooting.md | Look up error codes and fixes |
| Need CLI examples | references/cli-guide.md | Worked argument examples |
Use this skill for:
enrichGSEA.csv and gsea_running_scores.csvtests/data/sample_deg_results.csvDo not use it for:
Analysis mode:
Rscript scripts/main.R --input tests/data/sample_deg_results.csv --outdir ./GSEA_analysis --type KEGG --species human --seed 42 --timeout 300
Plot mode:
Rscript scripts/main.R --running_file ./GSEA_analysis/Table/gsea_running_scores.csv --enrich_file ./GSEA_analysis/Table/enrichGSEA.csv --plot_output ./GSEA_analysis/plot/gsea_plot.pdf --top_n 5 --plot_format pdf --seed 42 --timeout 300
See references/cli-guide.md for more.
Mode selection:
--input runs analysis mode--running_file and --enrich_file runs plot mode| Short | Long | Type | Default | Required | Description |
|---|---|---|---|---|---|
-i | --input | character | NULL | yes | Input CSV file |
-o | --outdir | character | GSEA_analysis | no | Output directory |
-g | --gene_col | character | name | no | Gene column name |
-f | --fc_col | character | logFC | no | Ranking-statistic column name |
-t | --type | character | KEGG | no | Gene-set type: KEGG, HALLMARKS, GO_BP, GO_MF, GO_CC. With a preloaded RDS, HALLMARKS is automatically mapped to the asset key Hallmarks |
-s | --species | character | human | no | Species: human, mouse, rat |
-p | --pvalue_cutoff | numeric | 0.05 | no | Significance threshold |
-m | --method | character | fgsea | no | GSEA backend: fgsea or DOSE |
-c | --chunk_size | numeric | 1000 | no | Chunk size for large gene-set conversion |
-r | --rds_path | character | NULL | no | Path to a pre-stored gene-set RDS |
-v | --verbose | logical | FALSE | no | Verbose logging |
--seed | integer | 42 | no | Random seed | |
--timeout | integer | 300 | no | Timeout in seconds; <=0 disables it | |
-h | --help | logical | FALSE | no | Show help |
| Short | Long | Type | Default | Required | Description |
|---|---|---|---|---|---|
--running_file | character | NULL | yes | Path to gsea_running_scores.csv | |
--enrich_file | character | NULL | yes | Path to enrichGSEA.csv | |
--plot_output | character | gsea_plot.pdf | no | Output plot path | |
--plot_width | numeric | 8 | no | Plot width | |
--plot_height | numeric | 6 | no | Plot height | |
--plot_format | character | pdf | no | Output format: pdf or png | |
--top_n | numeric | 1 | no | Number of top pathways to plot when geneSetID is not given | |
--rank_by | character | p.adjust | no | Column used to rank pathways | |
--geneSetID | character | "" | no | Comma-separated pathway IDs | |
--plot_title | character | "" | no | Plot title | |
--colors | character | #4DBBD5,#E64B35,#00A087,#F39B7F,#3C5488,#8491B4 | no | Color list | |
--base_size | numeric | 11 | no | Base font size | |
--subplots | character | 1,2,3 | no | Sub-panel indices to display | |
--rel_heights | character | 1.5,0.8,1 | no | Relative panel heights | |
--NES_table | logical | TRUE | no | Show NES annotation | |
--no_NES_table | logical | FALSE | no | Disable NES annotation | |
--NES_label_size | numeric | 4 | no | NES label font size | |
--NES_label_x | numeric | 0.75 | no | NES label x position | |
--NES_label_y | numeric | 0.75 | no | NES label y position | |
--NES_label_color | character | black | no | NES label color | |
--NES_label_hjust | numeric | 0 | no | NES label horizontal justification | |
--NES_label_vjust | numeric | 1 | no | NES label vertical justification | |
--line_width | numeric | 1 | no | ES line width | |
--dot_size | numeric | 1.2 | no | ES dot size | |
--legend_position | character | auto | no | Legend position | |
--legend_x | numeric | 0.02 | no | Inset legend x coordinate | |
--legend_y | numeric | 0.02 | no | Inset legend y coordinate | |
--legend_just_x | numeric | 0 | no | Legend horizontal justification | |
--legend_just_y | numeric | 0 | no | Legend vertical justification | |
--legend_text_size | numeric | 9 | no | Legend text size | |
--legend_key_size | numeric | 0.6 | no | Legend key size | |
--legend_bg_alpha | numeric | 0 | no | Legend background alpha | |
--grid_major_color | character | grey92 | no | Major grid color | |
--grid_minor_color | character | grey92 | no | Minor grid color | |
--ylab_es | character | Enrichment Score | no | ES panel y-axis title | |
--ylab_rank | character | Ranked List Metric | no | Rank panel y-axis title | |
--xlab_rank | character | Rank in Ordered Dataset | no | Rank panel x-axis title | |
--hit_height | numeric | 1 | no | Hit-bar height | |
--hit_gap | numeric | 0 | no | Hit-bar gap | |
--hit_linewidth | numeric | 0.5 | no | Hit-bar line width | |
--rank_bar_alpha | numeric | 0.9 | no | Rank-bar alpha | |
--rank_bar_height_ratio | numeric | 0.3 | no | Rank-bar height ratio | |
--rank_metric_segment_color | character | grey | no | Rank-line color | |
--rank_metric_segment_width | numeric | 0.3 | no | Rank-line width | |
--rank_metric_segment_alpha | numeric | 1 | no | Rank-line alpha | |
--pvalue_table | logical | FALSE | no | Show p-value table | |
--ES_geom | character | line | no | ES geometry: line or dot | |
--verbose | logical | FALSE | no | Verbose logging | |
--seed | integer | 42 | no | Random seed | |
--timeout | integer | 300 | no | Timeout in seconds; <=0 disables it | |
-h | --help | logical | FALSE | no | Show help |
Analysis-mode input is a CSV with at least:
name)logFC)Example:
name,logFC,pvalue,padj
TP53,2.5,0.001,0.01
BRCA1,1.8,0.005,0.02
EGFR,-1.2,0.01,0.05
Value constraints:
type accepts KEGG, HALLMARKS, GO_BP, GO_MF, GO_CCHALLMARKS is automatically matched to the asset key Hallmarksspecies accepts human, mouse, rat| File | Format | Description |
|---|---|---|
data/GSEA_list.rda | RDA | Full GSEA result object |
Table/enrichGSEA.csv | CSV | Enrichment result table |
Table/gsea_running_scores.csv | CSV | Running-score table; if no enrichment passes, a header-only file is still written |
plot/ | directory | Plot output directory |
session_info.txt | TXT | R version and package versions |
enrichGSEA.csv mainly contains: ID, Description, NES, pvalue, p.adjust, core_enrichment.
Common error codes:
SKILL_FILE_NOT_FOUND: input file does not existSKILL_MISSING_COLUMNS: required columns are missingSKILL_EMPTY_DATA: input is empty, or empty after filteringSKILL_INVALID_PARAMETER: an argument has an invalid valueSKILL_PACKAGE_NOT_FOUND: a required package is not installedSKILL_ANALYSIS_FAILED: GSEA still failed after retriesTriage doc: references/troubleshooting.md
Exit codes:
0: success1: failureMinimal test dataset: tests/data/sample_deg_results.csv
Minimal command:
Rscript scripts/main.R --input tests/data/sample_deg_results.csv --outdir ./test_output --type KEGG --species human --seed 42 --timeout 300 --verbose
Expected output:
./test_output/data/GSEA_list.rda./test_output/Table/enrichGSEA.csv./test_output/Table/gsea_running_scores.csv./test_output/session_info.txtgsea_running_scores.csv is still written but contains only the header0A comprehensive auditor for any agent skill — including Manus, OpenClaw/ClawHub, Claude, LobeHub, or custom SKILL.md-based skills. Use this skill whenever a user wants to evaluate, audit, review, score, or quality-check an agent skill before publishing, updating, or deploying. Covers two hard veto gates (structural redlines + research integrity redlines), static quality scoring across 25 criteria (ISO 25010 + OpenSSF + Agent), dynamic test input generation, multi-mode execution testing, multi-layer output evaluation with five specialized category rubrics (Evidence Insight / Protocol Design / Data Analysis / Academic Writing / Other), a Research Veto that applies to all four research categories, human eval viewer generation, actionable P0/P1/P2 optimization recommendations, and automatic skill improvement that outputs a polished, production-ready SKILL.md. Also use whenever a user says "audit my skill", "evaluate my skill", "improve my skill", or wants a corrected version after evaluation.
Identifies real, evidence-audited, topic-specific research gaps in medical research by first retrieving and verifying literature from trusted sources, then mapping the current evidence landscape, rejecting pseudo-gaps, and converting only medium/high-confidence gaps into study-ready research opportunities. Always require real literature retrieval before formal gap claims. Never fabricate references, metadata, or findings.
Converts an audited medical research gap into a complete, structured, gap-traceable study design. Always use this skill whenever a user already has one or more candidate research gaps and wants to transform them into an executable biomedical research plan rather than re-run broad topic ideation. Covers six gap-to-design patterns (evidence-completion, mechanism-resolution, cell-state/context-mapping, translation-bridge, causality-upgrade, population/stage-specific) and always outputs one recommended primary protocol, a gap-to-design dependency map, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path, and verified design-support literature rules. Never fabricate references. Preserve claim-evidence discipline and do not replace a topic-specific gap with a generic workflow.
Evidence-based medical knowledge and research mentor grounded in the Bian Que tradition. Covers clinical reasoning, diagnostic thinking (望闻问切), pharmacology, pathology, differential diagnosis, medical literature appraisal, and the philosophy of early intervention. Trigger whenever users ask about medicine, clinical science, drugs, disease mechanisms, diagnosis, lab interpretation, treatment comparison, or health sciences. Even without explicit research framing, trigger on any topic touching disease, therapeutics, or clinical decision-making. Part of the AIPOCH Medical Research Skill Hub.
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.
Use when building a ceRNA regulatory network from a key gene list by combining bundled miRNA-mRNA and miRNA-lncRNA database files, with flat-file CSV exports and PDF visualization in a single output directory. NOT for: differential expression, single-cell analysis, enrichment analysis, or workflows without a key gene list.