[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CTJJX1D28GZ09T1CQJW786":3,"skill-same:01M7CTJJX1D28GZ09T1CQJW786":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7CTJJX1D28GZ09T1CQJW786","gsea",null,"Run GSEA on a ranked gene list and produce the enrichment table, running-score table, and enrichment plots.","mrsonord2240\u002Fopenscience-specialists","mrsonord2240","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F76487430?v=4","01M7CTEM40S43GSJZ9A3YCCXZK","Samuel Nord","01M7CTEM4K69JD1GBYNHVJ9ZP4",2,"MIT","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: gsea\ndescription: Run GSEA on a ranked gene list and produce the enrichment table, running-score table, and enrichment plots.\nlicense: MIT\nauthor: AIPOCH\n---\n\n> **Source**: [https:\u002F\u002Fgithub.com\u002Faipoch\u002Fmedical-research-skills](https:\u002F\u002Fgithub.com\u002Faipoch\u002Fmedical-research-skills)\n\n## When to read external files\n\n| Situation               | Read                            | Purpose                         |\n| ----------------------- | ------------------------------- | ------------------------------- |\n| Need algorithm details  | `references\u002Falgorithm.md`       | Statistical method and formulas |\n| Need to run an analysis | `scripts\u002Fmain.R`                | Full command reference          |\n| Hit an error            | `references\u002Ftroubleshooting.md` | Look up error codes and fixes   |\n| Need CLI examples       | `references\u002Fcli-guide.md`       | Worked argument examples        |\n\n## Scope\n\nUse this skill for:\n\n- Running GSEA on a gene list ranked by a statistic\n- Generating enrichment curve plots from existing `enrichGSEA.csv` and `gsea_running_scores.csv`\n- Smoke-testing the pipeline with `tests\u002Fdata\u002Fsample_deg_results.csv`\n\nDo not use it for:\n\n- Differential expression on raw expression matrices\n- Single-sample ssGSEA\n- Network analysis or multi-omics integration\n\n## Usage\n\nAnalysis mode:\n`Rscript scripts\u002Fmain.R --input tests\u002Fdata\u002Fsample_deg_results.csv --outdir .\u002FGSEA_analysis --type KEGG --species human --seed 42 --timeout 300`\n\nPlot mode:\n`Rscript scripts\u002Fmain.R --running_file .\u002FGSEA_analysis\u002FTable\u002Fgsea_running_scores.csv --enrich_file .\u002FGSEA_analysis\u002FTable\u002FenrichGSEA.csv --plot_output .\u002FGSEA_analysis\u002Fplot\u002Fgsea_plot.pdf --top_n 5 --plot_format pdf --seed 42 --timeout 300`\n\nSee `references\u002Fcli-guide.md` for more.\n\nMode selection:\n\n- Passing only `--input` runs analysis mode\n- Passing both `--running_file` and `--enrich_file` runs plot mode\n- If both sets of arguments are provided, plot mode takes precedence; analysis mode is skipped and a warning is logged\n\n## Arguments\n\n### Analysis-mode arguments\n\n| Short | Long              | Type      | Default         | Required | Description                                                                                                                                           |\n| ----- | ----------------- | --------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `-i`  | `--input`         | character | `NULL`          | yes      | Input CSV file                                                                                                                                        |\n| `-o`  | `--outdir`        | character | `GSEA_analysis` | no       | Output directory                                                                                                                                      |\n| `-g`  | `--gene_col`      | character | `name`          | no       | Gene column name                                                                                                                                      |\n| `-f`  | `--fc_col`        | character | `logFC`         | no       | Ranking-statistic column name                                                                                                                         |\n| `-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` |\n| `-s`  | `--species`       | character | `human`         | no       | Species: `human`, `mouse`, `rat`                                                                                                                      |\n| `-p`  | `--pvalue_cutoff` | numeric   | `0.05`          | no       | Significance threshold                                                                                                                                |\n| `-m`  | `--method`        | character | `fgsea`         | no       | GSEA backend: `fgsea` or `DOSE`                                                                                                                       |\n| `-c`  | `--chunk_size`    | numeric   | `1000`          | no       | Chunk size for large gene-set conversion                                                                                                              |\n| `-r`  | `--rds_path`      | character | `NULL`          | no       | Path to a pre-stored gene-set RDS                                                                                                                     |\n| `-v`  | `--verbose`       | logical   | `FALSE`         | no       | Verbose logging                                                                                                                                       |\n|       | `--seed`          | integer   | `42`            | no       | Random seed                                                                                                                                           |\n|       | `--timeout`       | integer   | `300`           | no       | Timeout in seconds; `\u003C=0` disables it                                                                                                                 |\n| `-h`  | `--help`          | logical   | `FALSE`         | no       | Show help                                                                                                                                             |\n\n### Plot-mode arguments\n\n| Short | Long                          | Type      | Default                                           | Required | Description                                                  |\n| ----- | ----------------------------- | --------- | ------------------------------------------------- | -------- | ------------------------------------------------------------ |\n|       | `--running_file`              | character | `NULL`                                            | yes      | Path to `gsea_running_scores.csv`                            |\n|       | `--enrich_file`               | character | `NULL`                                            | yes      | Path to `enrichGSEA.csv`                                     |\n|       | `--plot_output`               | character | `gsea_plot.pdf`                                   | no       | Output plot path                                             |\n|       | `--plot_width`                | numeric   | `8`                                               | no       | Plot width                                                   |\n|       | `--plot_height`               | numeric   | `6`                                               | no       | Plot height                                                  |\n|       | `--plot_format`               | character | `pdf`                                             | no       | Output format: `pdf` or `png`                                |\n|       | `--top_n`                     | numeric   | `1`                                               | no       | Number of top pathways to plot when `geneSetID` is not given |\n|       | `--rank_by`                   | character | `p.adjust`                                        | no       | Column used to rank pathways                                 |\n|       | `--geneSetID`                 | character | `\"\"`                                              | no       | Comma-separated pathway IDs                                  |\n|       | `--plot_title`                | character | `\"\"`                                              | no       | Plot title                                                   |\n|       | `--colors`                    | character | `#4DBBD5,#E64B35,#00A087,#F39B7F,#3C5488,#8491B4` | no       | Color list                                                   |\n|       | `--base_size`                 | numeric   | `11`                                              | no       | Base font size                                               |\n|       | `--subplots`                  | character | `1,2,3`                                           | no       | Sub-panel indices to display                                 |\n|       | `--rel_heights`               | character | `1.5,0.8,1`                                       | no       | Relative panel heights                                       |\n|       | `--NES_table`                 | logical   | `TRUE`                                            | no       | Show NES annotation                                          |\n|       | `--no_NES_table`              | logical   | `FALSE`                                           | no       | Disable NES annotation                                       |\n|       | `--NES_label_size`            | numeric   | `4`                                               | no       | NES label font size                                          |\n|       | `--NES_label_x`               | numeric   | `0.75`                                            | no       | NES label x position                                         |\n|       | `--NES_label_y`               | numeric   | `0.75`                                            | no       | NES label y position                                         |\n|       | `--NES_label_color`           | character | `black`                                           | no       | NES label color                                              |\n|       | `--NES_label_hjust`           | numeric   | `0`                                               | no       | NES label horizontal justification                           |\n|       | `--NES_label_vjust`           | numeric   | `1`                                               | no       | NES label vertical justification                             |\n|       | `--line_width`                | numeric   | `1`                                               | no       | ES line width                                                |\n|       | `--dot_size`                  | numeric   | `1.2`                                             | no       | ES dot size                                                  |\n|       | `--legend_position`           | character | `auto`                                            | no       | Legend position                                              |\n|       | `--legend_x`                  | numeric   | `0.02`                                            | no       | Inset legend x coordinate                                    |\n|       | `--legend_y`                  | numeric   | `0.02`                                            | no       | Inset legend y coordinate                                    |\n|       | `--legend_just_x`             | numeric   | `0`                                               | no       | Legend horizontal justification                              |\n|       | `--legend_just_y`             | numeric   | `0`                                               | no       | Legend vertical justification                                |\n|       | `--legend_text_size`          | numeric   | `9`                                               | no       | Legend text size                                             |\n|       | `--legend_key_size`           | numeric   | `0.6`                                             | no       | Legend key size                                              |\n|       | `--legend_bg_alpha`           | numeric   | `0`                                               | no       | Legend background alpha                                      |\n|       | `--grid_major_color`          | character | `grey92`                                          | no       | Major grid color                                             |\n|       | `--grid_minor_color`          | character | `grey92`                                          | no       | Minor grid color                                             |\n|       | `--ylab_es`                   | character | `Enrichment Score`                                | no       | ES panel y-axis title                                        |\n|       | `--ylab_rank`                 | character | `Ranked List Metric`                              | no       | Rank panel y-axis title                                      |\n|       | `--xlab_rank`                 | character | `Rank in Ordered Dataset`                         | no       | Rank panel x-axis title                                      |\n|       | `--hit_height`                | numeric   | `1`                                               | no       | Hit-bar height                                               |\n|       | `--hit_gap`                   | numeric   | `0`                                               | no       | Hit-bar gap                                                  |\n|       | `--hit_linewidth`             | numeric   | `0.5`                                             | no       | Hit-bar line width                                           |\n|       | `--rank_bar_alpha`            | numeric   | `0.9`                                             | no       | Rank-bar alpha                                               |\n|       | `--rank_bar_height_ratio`     | numeric   | `0.3`                                             | no       | Rank-bar height ratio                                        |\n|       | `--rank_metric_segment_color` | character | `grey`                                            | no       | Rank-line color                                              |\n|       | `--rank_metric_segment_width` | numeric   | `0.3`                                             | no       | Rank-line width                                              |\n|       | `--rank_metric_segment_alpha` | numeric   | `1`                                               | no       | Rank-line alpha                                              |\n|       | `--pvalue_table`              | logical   | `FALSE`                                           | no       | Show p-value table                                           |\n|       | `--ES_geom`                   | character | `line`                                            | no       | ES geometry: `line` or `dot`                                 |\n|       | `--verbose`                   | logical   | `FALSE`                                           | no       | Verbose logging                                              |\n|       | `--seed`                      | integer   | `42`                                              | no       | Random seed                                                  |\n|       | `--timeout`                   | integer   | `300`                                             | no       | Timeout in seconds; `\u003C=0` disables it                        |\n| `-h`  | `--help`                      | logical   | `FALSE`                                           | no       | Show help                                                    |\n\n## Input format\n\nAnalysis-mode input is a CSV with at least:\n\n- a gene column (default name `name`)\n- a ranking-statistic column (default name `logFC`)\n\nExample:\n\n```csv\nname,logFC,pvalue,padj\nTP53,2.5,0.001,0.01\nBRCA1,1.8,0.005,0.02\nEGFR,-1.2,0.01,0.05\n```\n\nValue constraints:\n\n- `type` accepts `KEGG`, `HALLMARKS`, `GO_BP`, `GO_MF`, `GO_CC`\n- When using a preloaded RDS, `HALLMARKS` is automatically matched to the asset key `Hallmarks`\n- `species` accepts `human`, `mouse`, `rat`\n\n## Output files\n\n| File                            | Format    | Description                                                                       |\n| ------------------------------- | --------- | --------------------------------------------------------------------------------- |\n| `data\u002FGSEA_list.rda`            | RDA       | Full GSEA result object                                                           |\n| `Table\u002FenrichGSEA.csv`          | CSV       | Enrichment result table                                                           |\n| `Table\u002Fgsea_running_scores.csv` | CSV       | Running-score table; if no enrichment passes, a header-only file is still written |\n| `plot\u002F`                         | directory | Plot output directory                                                             |\n| `session_info.txt`              | TXT       | R version and package versions                                                    |\n\n`enrichGSEA.csv` mainly contains: `ID`, `Description`, `NES`, `pvalue`, `p.adjust`, `core_enrichment`.\n\n## Error handling\n\nCommon error codes:\n\n- `SKILL_FILE_NOT_FOUND`: input file does not exist\n- `SKILL_MISSING_COLUMNS`: required columns are missing\n- `SKILL_EMPTY_DATA`: input is empty, or empty after filtering\n- `SKILL_INVALID_PARAMETER`: an argument has an invalid value\n- `SKILL_PACKAGE_NOT_FOUND`: a required package is not installed\n- `SKILL_ANALYSIS_FAILED`: GSEA still failed after retries\n\nTriage doc: `references\u002Ftroubleshooting.md`\n\nExit codes:\n\n- `0`: success\n- `1`: failure\n\n## Testing\n\nMinimal test dataset: `tests\u002Fdata\u002Fsample_deg_results.csv`\n\nMinimal command:\n`Rscript scripts\u002Fmain.R --input tests\u002Fdata\u002Fsample_deg_results.csv --outdir .\u002Ftest_output --type KEGG --species human --seed 42 --timeout 300 --verbose`\n\nExpected output:\n\n- `.\u002Ftest_output\u002Fdata\u002FGSEA_list.rda`\n- `.\u002Ftest_output\u002FTable\u002FenrichGSEA.csv`\n- `.\u002Ftest_output\u002FTable\u002Fgsea_running_scores.csv`\n- `.\u002Ftest_output\u002Fsession_info.txt`\n- If no significant enrichment is found, `gsea_running_scores.csv` is still written but contains only the header\n- Exit code `0`\n","> **Source**: [https:\u002F\u002Fgithub.com\u002Faipoch\u002Fmedical-research-skills](https:\u002F\u002Fgithub.com\u002Faipoch\u002Fmedical-research-skills)\n\n## When to read external files\n\n| Situation               | Read                            | Purpose                         |\n| ----------------------- | ------------------------------- | ------------------------------- |\n| Need algorithm details  | `references\u002Falgorithm.md`       | Statistical method and formulas |\n| Need to run an analysis | `scripts\u002Fmain.R`                | Full command reference          |\n| Hit an error            | `references\u002Ftroubleshooting.md` | Look up error codes and fixes   |\n| Need CLI examples       | `references\u002Fcli-guide.md`       | Worked argument examples        |\n\n## Scope\n\nUse this skill for:\n\n- Running GSEA on a gene list ranked by a statistic\n- Generating enrichment curve plots from existing `enrichGSEA.csv` and `gsea_running_scores.csv`\n- Smoke-testing the pipeline with `tests\u002Fdata\u002Fsample_deg_results.csv`\n\nDo not use it for:\n\n- Differential expression on raw expression matrices\n- Single-sample ssGSEA\n- Network analysis or multi-omics integration\n\n## Usage\n\nAnalysis mode:\n`Rscript scripts\u002Fmain.R --input tests\u002Fdata\u002Fsample_deg_results.csv --outdir .\u002FGSEA_analysis --type KEGG --species human --seed 42 --timeout 300`\n\nPlot mode:\n`Rscript scripts\u002Fmain.R --running_file .\u002FGSEA_analysis\u002FTable\u002Fgsea_running_scores.csv --enrich_file .\u002FGSEA_analysis\u002FTable\u002FenrichGSEA.csv --plot_output .\u002FGSEA_analysis\u002Fplot\u002Fgsea_plot.pdf --top_n 5 --plot_format pdf --seed 42 --timeout 300`\n\nSee `references\u002Fcli-guide.md` for more.\n\nMode selection:\n\n- Passing only `--input` runs analysis mode\n- Passing both `--running_file` and `--enrich_file` runs plot mode\n- If both sets of arguments are provided, plot mode takes precedence; analysis mode is skipped and a warning is logged\n\n## Arguments\n\n### Analysis-mode arguments\n\n| Short | Long              | Type      | Default         | Required | Description                                                                                                                                           |\n| ----- | ----------------- | --------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `-i`  | `--input`         | character | `NULL`          | yes      | Input CSV file                                                                                                                                        |\n| `-o`  | `--outdir`        | character | `GSEA_analysis` | no       | Output directory                                                                                                                                      |\n| `-g`  | `--gene_col`      | character | `name`          | no       | Gene column name                                                                                                                                      |\n| `-f`  | `--fc_col`        | character | `logFC`         | no       | Ranking-statistic column name                                                                                                                         |\n| `-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` |\n| `-s`  | `--species`       | character | `human`         | no       | Species: `human`, `mouse`, `rat`                                                                                                                      |\n| `-p`  | `--pvalue_cutoff` | numeric   | `0.05`          | no       | Significance threshold                                                                                                                                |\n| `-m`  | `--method`        | character | `fgsea`         | no       | GSEA backend: `fgsea` or `DOSE`                                                                                                                       |\n| `-c`  | `--chunk_size`    | numeric   | `1000`          | no       | Chunk size for large gene-set conversion                                                                                                              |\n| `-r`  | `--rds_path`      | character | `NULL`          | no       | Path to a pre-stored gene-set RDS                                                                                                                     |\n| `-v`  | `--verbose`       | logical   | `FALSE`         | no       | Verbose logging                                                                                                                                       |\n|       | `--seed`          | integer   | `42`            | no       | Random seed                                                                                                                                           |\n|       | `--timeout`       | integer   | `300`           | no       | Timeout in seconds; `\u003C=0` disables it                                                                                                                 |\n| `-h`  | `--help`          | logical   | `FALSE`         | no       | Show help                                                                                                                                             |\n\n### Plot-mode arguments\n\n| Short | Long                          | Type      | Default                                           | Required | Description                                                  |\n| ----- | ----------------------------- | --------- | ------------------------------------------------- | -------- | ------------------------------------------------------------ |\n|       | `--running_file`              | character | `NULL`                                            | yes      | Path to `gsea_running_scores.csv`                            |\n|       | `--enrich_file`               | character | `NULL`                                            | yes      | Path to `enrichGSEA.csv`                                     |\n|       | `--plot_output`               | character | `gsea_plot.pdf`                                   | no       | Output plot path                                             |\n|       | `--plot_width`                | numeric   | `8`                                               | no       | Plot width                                                   |\n|       | `--plot_height`               | numeric   | `6`                                               | no       | Plot height                                                  |\n|       | `--plot_format`               | character | `pdf`                                             | no       | Output format: `pdf` or `png`                                |\n|       | `--top_n`                     | numeric   | `1`                                               | no       | Number of top pathways to plot when `geneSetID` is not given |\n|       | `--rank_by`                   | character | `p.adjust`                                        | no       | Column used to rank pathways                                 |\n|       | `--geneSetID`                 | character | `\"\"`                                              | no       | Comma-separated pathway IDs                                  |\n|       | `--plot_title`                | character | `\"\"`                                              | no       | Plot title                                                   |\n|       | `--colors`                    | character | `#4DBBD5,#E64B35,#00A087,#F39B7F,#3C5488,#8491B4` | no       | Color list                                                   |\n|       | `--base_size`                 | numeric   | `11`                                              | no       | Base font size                                               |\n|       | `--subplots`                  | character | `1,2,3`                                           | no       | Sub-panel indices to display                                 |\n|       | `--rel_heights`               | character | `1.5,0.8,1`                                       | no       | Relative panel heights                                       |\n|       | `--NES_table`                 | logical   | `TRUE`                                            | no       | Show NES annotation                                          |\n|       | `--no_NES_table`              | logical   | `FALSE`                                           | no       | Disable NES annotation                                       |\n|       | `--NES_label_size`            | numeric   | `4`                                               | no       | NES label font size                                          |\n|       | `--NES_label_x`               | numeric   | `0.75`                                            | no       | NES label x position                                         |\n|       | `--NES_label_y`               | numeric   | `0.75`                                            | no       | NES label y position                                         |\n|       | `--NES_label_color`           | character | `black`                                           | no       | NES label color                                              |\n|       | `--NES_label_hjust`           | numeric   | `0`                                               | no       | NES label horizontal justification                           |\n|       | `--NES_label_vjust`           | numeric   | `1`                                               | no       | NES label vertical justification                             |\n|       | `--line_width`                | numeric   | `1`                                               | no       | ES line width                                                |\n|       | `--dot_size`                  | numeric   | `1.2`                                             | no       | ES dot size                                                  |\n|       | `--legend_position`           | character | `auto`                                            | no       | Legend position                                              |\n|       | `--legend_x`                  | numeric   | `0.02`                                            | no       | Inset legend x coordinate                                    |\n|       | `--legend_y`                  | numeric   | `0.02`                                            | no       | Inset legend y coordinate                                    |\n|       | `--legend_just_x`             | numeric   | `0`                                               | no       | Legend horizontal justification                              |\n|       | `--legend_just_y`             | numeric   | `0`                                               | no       | Legend vertical justification                                |\n|       | `--legend_text_size`          | numeric   | `9`                                               | no       | Legend text size                                             |\n|       | `--legend_key_size`           | numeric   | `0.6`                                             | no       | Legend key size                                              |\n|       | `--legend_bg_alpha`           | numeric   | `0`                                               | no       | Legend background alpha                                      |\n|       | `--grid_major_color`          | character | `grey92`                                          | no       | Major grid color                                             |\n|       | `--grid_minor_color`          | character | `grey92`                                          | no       | Minor grid color                                             |\n|       | `--ylab_es`                   | character | `Enrichment Score`                                | no       | ES panel y-axis title                                        |\n|       | `--ylab_rank`                 | character | `Ranked List Metric`                              | no       | Rank panel y-axis title                                      |\n|       | `--xlab_rank`                 | character | `Rank in Ordered Dataset`                         | no       | Rank panel x-axis title                                      |\n|       | `--hit_height`                | numeric   | `1`                                               | no       | Hit-bar height                                               |\n|       | `--hit_gap`                   | numeric   | `0`                                               | no       | Hit-bar gap                                                  |\n|       | `--hit_linewidth`             | numeric   | `0.5`                                             | no       | Hit-bar line width                                           |\n|       | `--rank_bar_alpha`            | numeric   | `0.9`                                             | no       | Rank-bar alpha                                               |\n|       | `--rank_bar_height_ratio`     | numeric   | `0.3`                                             | no       | Rank-bar height ratio                                        |\n|       | `--rank_metric_segment_color` | character | `grey`                                            | no       | Rank-line color                                              |\n|       | `--rank_metric_segment_width` | numeric   | `0.3`                                             | no       | Rank-line width                                              |\n|       | `--rank_metric_segment_alpha` | numeric   | `1`                                               | no       | Rank-line alpha                                              |\n|       | `--pvalue_table`              | logical   | `FALSE`                                           | no       | Show p-value table                                           |\n|       | `--ES_geom`                   | character | `line`                                            | no       | ES geometry: `line` or `dot`                                 |\n|       | `--verbose`                   | logical   | `FALSE`                                           | no       | Verbose logging                                              |\n|       | `--seed`                      | integer   | `42`                                              | no       | Random seed                                                  |\n|       | `--timeout`                   | integer   | `300`                                             | no       | Timeout in seconds; `\u003C=0` disables it                        |\n| `-h`  | `--help`                      | logical   | `FALSE`                                           | no       | Show help                                                    |\n\n## Input format\n\nAnalysis-mode input is a CSV with at least:\n\n- a gene column (default name `name`)\n- a ranking-statistic column (default name `logFC`)\n\nExample:\n\n```csv\nname,logFC,pvalue,padj\nTP53,2.5,0.001,0.01\nBRCA1,1.8,0.005,0.02\nEGFR,-1.2,0.01,0.05\n```\n\nValue constraints:\n\n- `type` accepts `KEGG`, `HALLMARKS`, `GO_BP`, `GO_MF`, `GO_CC`\n- When using a preloaded RDS, `HALLMARKS` is automatically matched to the asset key `Hallmarks`\n- `species` accepts `human`, `mouse`, `rat`\n\n## Output files\n\n| File                            | Format    | Description                                                                       |\n| ------------------------------- | --------- | --------------------------------------------------------------------------------- |\n| `data\u002FGSEA_list.rda`            | RDA       | Full GSEA result object                                                           |\n| `Table\u002FenrichGSEA.csv`          | CSV       | Enrichment result table                                                           |\n| `Table\u002Fgsea_running_scores.csv` | CSV       | Running-score table; if no enrichment passes, a header-only file is still written |\n| `plot\u002F`                         | directory | Plot output directory                                                             |\n| `session_info.txt`              | TXT       | R version and package versions                                                    |\n\n`enrichGSEA.csv` mainly contains: `ID`, `Description`, `NES`, `pvalue`, `p.adjust`, `core_enrichment`.\n\n## Error handling\n\nCommon error codes:\n\n- `SKILL_FILE_NOT_FOUND`: input file does not exist\n- `SKILL_MISSING_COLUMNS`: required columns are missing\n- `SKILL_EMPTY_DATA`: input is empty, or empty after filtering\n- `SKILL_INVALID_PARAMETER`: an argument has an invalid value\n- `SKILL_PACKAGE_NOT_FOUND`: a required package is not installed\n- `SKILL_ANALYSIS_FAILED`: GSEA still failed after retries\n\nTriage doc: `references\u002Ftroubleshooting.md`\n\nExit codes:\n\n- `0`: success\n- `1`: failure\n\n## Testing\n\nMinimal test dataset: `tests\u002Fdata\u002Fsample_deg_results.csv`\n\nMinimal command:\n`Rscript scripts\u002Fmain.R --input tests\u002Fdata\u002Fsample_deg_results.csv --outdir .\u002Ftest_output --type KEGG --species human --seed 42 --timeout 300 --verbose`\n\nExpected output:\n\n- `.\u002Ftest_output\u002Fdata\u002FGSEA_list.rda`\n- `.\u002Ftest_output\u002FTable\u002FenrichGSEA.csv`\n- `.\u002Ftest_output\u002FTable\u002Fgsea_running_scores.csv`\n- `.\u002Ftest_output\u002Fsession_info.txt`\n- If no significant enrichment is found, `gsea_running_scores.csv` is still written but contains only the header\n- Exit code `0`\n",{"name":5,"author":24,"license":15,"description":7},"AIPOCH","main","e0956dc9606356ab78468936b502e55a365282e2","specialist-src\u002Fpublished-skills\u002Fgsea",0,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists","https:\u002F\u002Fgithub.com\u002Fmrsonord2240","2026-10-12 03:19:04",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add mrsonord2240\u002Fopenscience-specialists --skill gsea",{"tool":38,"command":39},"bunx","bunx skills add mrsonord2240\u002Fopenscience-specialists --skill gsea",{"tool":41,"command":42},"pnpm","pnpm dlx skills add mrsonord2240\u002Fopenscience-specialists --skill gsea","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002FSKILL.md",true,[46,52,58,62,66,72,76,80,84,88],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"assets\u002FssGSEA.rds","ASSET","资产文件",2805030,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002Fassets\u002FssGSEA.rds",{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Falgorithm.md","REFERENCE","参考文档",1216,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002Freferences\u002Falgorithm.md",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fcli-guide.md",1432,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002Freferences\u002Fcli-guide.md",{"path":63,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Ftroubleshooting.md",1613,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002Freferences\u002Ftroubleshooting.md",{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"scripts\u002Ffunctions.R","SCRIPT","脚本",7461,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002Fscripts\u002Ffunctions.R",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"scripts\u002Fmain.R",13149,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002Fscripts\u002Fmain.R",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Fplot_functions.R",16942,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002Fscripts\u002Fplot_functions.R",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Frun_analysis.R",11877,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002Fscripts\u002Frun_analysis.R",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Futils.R",6172,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002Fscripts\u002Futils.R",{"path":89,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":90,"sourceHtmlUrl":91},"tests\u002Fdata\u002Fsample_deg_results.csv",1260,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialist-src\u002Fpublished-skills\u002Fgsea\u002Ftests\u002Fdata\u002Fsample_deg_results.csv",[93,101,108,115,122,129],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7CW36A6QAGWFE2C008M1XPG","bio-workflows-metabolomics-pipeline","Orchestrates the untargeted LC-MS metabolomics pipeline end-to-end (xcms 4.x feature extraction, QC\u002Fdrift\u002Fnormalization, confidence-stratified annotation, permutation-validated statistics, background-aware pathway mapping), naming what each stage decides and where it silently fails. Use when running a full LC-MS metabolomics study from raw mzML to enriched pathways and needing the honest handoffs between stages. Each stage defers to its component skill for parameters and traps; for stable-isotope flux (a separate branch, not this untargeted flow) see metabolomics\u002Fisotope-tracing.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-workflows-metabolomics-pipeline\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7CW2Y18623NA2S1Y30FRQW1","bio-metabolomics-xcms-preprocessing","Programmatic untargeted LC-MS feature extraction in R with the modern xcms 4.x MsExperiment\u002FXcmsExperiment API, taking raw mzML to a feature table via CentWave peak detection, retention-time alignment, peak-density correspondence, gap-filling, CAMERA redundancy collapse, and built-in QC feature filtering. Use when converting centroided LC-MS runs into a features-by-samples matrix and deciding centWave\u002Fgrouping\u002Falignment parameters. For drift correction and QC\u002FCV filtering execution see metabolomics\u002Fnormalization-qc; for metabolite identification see metabolomics\u002Fmetabolite-annotation; for the MS-DIAL GUI alternative with MS2Dec deconvolution see metabolomics\u002Fmsdial-preprocessing; for downstream statistics see metabolomics\u002Fstatistical-analysis.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-xcms-preprocessing\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7CW2M364HVWPNQEKE2WP4PP","bio-metabolomics-statistical-analysis","Decision-grade statistical analysis for metabolomics intensity tables. Covers transformation and scaling (Pareto vs unit-variance as a hidden hypothesis), unsupervised structure (PCA\u002FHCA for QC), permutation-validated PLS-DA\u002FOPLS-DA (R2 vs Q2, double CV, VIP as heuristic), univariate testing (Welch\u002FMann-Whitney\u002FANOVA\u002FLMM with covariate adjustment), and dependence-aware multiple testing. Use when testing which metabolites differ, building or validating a discriminant model, choosing a scaling, or correcting many correlated tests. For sample-wise normalization\u002Fdrift correction see metabolomics\u002Fnormalization-qc; for ML classifiers and selection-inside-CV leakage see machine-learning\u002Fbiomarker-discovery and machine-learning\u002Fmodel-validation; for pathway interpretation see metabolomics\u002Fpathway-mapping; for design\u002Fpower\u002Fmultiplicity regime see experimental-design\u002Fmultiple-testing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-statistical-analysis\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M7CW2BCBF851WYE03Z8XPEDQ","bio-metabolomics-pathway-mapping","Maps metabolomics results to biological pathways via over-representation (ORA), metabolite-set enrichment (MSEA\u002FQEA), mummichog\u002FPSEA on raw m\u002Fz peaks, and network-diffusion enrichment (FELLA), with correct background-set construction and honest interpretive ceilings. Use when interpreting differential metabolites or an untargeted LC-MS feature table in pathway context, choosing ORA vs MSEA vs mummichog vs topology, or setting the reference\u002Fbackground set. For annotation confidence levels feeding ORA see metabolomics\u002Fmetabolite-annotation; for gene-set concepts see pathway-analysis\u002Fgo-enrichment and pathway-analysis\u002Fgsea; for joint gene+metabolite pathways see multi-omics-integration\u002Fmofa-integration.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-pathway-mapping\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":19},"01M7CW21NSZMCPMF7D9CHJM718","bio-metabolomics-normalization-qc","Designs QC, corrects signal drift, removes batch effects, filters features, normalizes samples, and imputes missing values for untargeted LC-MS\u002FGC-MS metabolomics, framing each step as a measurement model that can create or erase biological signal. Use when processing a peak\u002Ffeature table before statistical analysis, choosing a drift-correction or sample-normalization method, deciding QC RSD vs D-ratio filtering, or handling left-censored missing values. The feature table is produced by metabolomics\u002Fxcms-preprocessing or metabolomics\u002Fmsdial-preprocessing; transformation\u002Fscaling for modeling defers to metabolomics\u002Fstatistical-analysis; cross-study design issues link to experimental-design\u002Fbatch-design.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-normalization-qc\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":19},"01M7CW1SWVM0NYHVE6Q7MA3G7R","bio-metabolomics-msdial-preprocessing","Runs the MS-DIAL preprocessing workflow (peak picking, MS2Dec spectral deconvolution, alignment, gap-filling) and imports the alignment-result table into R or Python with honest filtering. Use when preprocessing LC-MS DDA\u002FDIA (SWATH) or GC-MS raw data with MS-DIAL, deciding MS-DIAL vs XCMS, configuring the MSDIALCUI console run, or parsing an MS-DIAL export into a clean feature matrix. For programmatic R peak detection and the feature-table-as-artifact framing see metabolomics\u002Fxcms-preprocessing; for lipid annotation mode see metabolomics\u002Flipidomics; for MSI-level confidence honesty see metabolomics\u002Fmetabolite-annotation; for drift correction and QC see metabolomics\u002Fnormalization-qc.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-msdial-preprocessing\u002FSKILL.md",[],[]]