Gsea logo

Gsea

OrganizationPopular
aipoch
gsea

Run GSEA on a ranked gene list and produce the enrichment table, running-score table, and enrichment plots.

Overview

Publisheraipoch
Repositorymedical-research-skills
Skill namegsea
Stars
1.9K
Forks
175
Bundled files
11
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by aipoch on GitHub. Read the source before you install it.

Installation

Install the Gsea AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.

Use it in TypingMind

Enable Gsea in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Gsea on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Gsea is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

When to read external files

SituationReadPurpose
Need algorithm detailsreferences/algorithm.mdStatistical method and formulas
Need to run an analysisscripts/main.RFull command reference
Hit an errorreferences/troubleshooting.mdLook up error codes and fixes
Need CLI examplesreferences/cli-guide.mdWorked argument examples

Scope

Use this skill for:

  • Running GSEA on a gene list ranked by a statistic
  • Generating enrichment curve plots from existing enrichGSEA.csv and gsea_running_scores.csv
  • Smoke-testing the pipeline with tests/data/sample_deg_results.csv

Do not use it for:

  • Differential expression on raw expression matrices
  • Single-sample ssGSEA
  • Network analysis or multi-omics integration

Usage

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:

  • Passing only --input runs analysis mode
  • Passing both --running_file and --enrich_file runs plot mode
  • If both sets of arguments are provided, plot mode takes precedence; analysis mode is skipped and a warning is logged

Arguments

Analysis-mode arguments

ShortLongTypeDefaultRequiredDescription
-i--inputcharacterNULLyesInput CSV file
-o--outdircharacterGSEA_analysisnoOutput directory
-g--gene_colcharacternamenoGene column name
-f--fc_colcharacterlogFCnoRanking-statistic column name
-t--typecharacterKEGGnoGene-set type: KEGG, HALLMARKS, GO_BP, GO_MF, GO_CC. With a preloaded RDS, HALLMARKS is automatically mapped to the asset key Hallmarks
-s--speciescharacterhumannoSpecies: human, mouse, rat
-p--pvalue_cutoffnumeric0.05noSignificance threshold
-m--methodcharacterfgseanoGSEA backend: fgsea or DOSE
-c--chunk_sizenumeric1000noChunk size for large gene-set conversion
-r--rds_pathcharacterNULLnoPath to a pre-stored gene-set RDS
-v--verboselogicalFALSEnoVerbose logging
--seedinteger42noRandom seed
--timeoutinteger300noTimeout in seconds; <=0 disables it
-h--helplogicalFALSEnoShow help

Plot-mode arguments

ShortLongTypeDefaultRequiredDescription
--running_filecharacterNULLyesPath to gsea_running_scores.csv
--enrich_filecharacterNULLyesPath to enrichGSEA.csv
--plot_outputcharactergsea_plot.pdfnoOutput plot path
--plot_widthnumeric8noPlot width
--plot_heightnumeric6noPlot height
--plot_formatcharacterpdfnoOutput format: pdf or png
--top_nnumeric1noNumber of top pathways to plot when geneSetID is not given
--rank_bycharacterp.adjustnoColumn used to rank pathways
--geneSetIDcharacter""noComma-separated pathway IDs
--plot_titlecharacter""noPlot title
--colorscharacter#4DBBD5,#E64B35,#00A087,#F39B7F,#3C5488,#8491B4noColor list
--base_sizenumeric11noBase font size
--subplotscharacter1,2,3noSub-panel indices to display
--rel_heightscharacter1.5,0.8,1noRelative panel heights
--NES_tablelogicalTRUEnoShow NES annotation
--no_NES_tablelogicalFALSEnoDisable NES annotation
--NES_label_sizenumeric4noNES label font size
--NES_label_xnumeric0.75noNES label x position
--NES_label_ynumeric0.75noNES label y position
--NES_label_colorcharacterblacknoNES label color
--NES_label_hjustnumeric0noNES label horizontal justification
--NES_label_vjustnumeric1noNES label vertical justification
--line_widthnumeric1noES line width
--dot_sizenumeric1.2noES dot size
--legend_positioncharacterautonoLegend position
--legend_xnumeric0.02noInset legend x coordinate
--legend_ynumeric0.02noInset legend y coordinate
--legend_just_xnumeric0noLegend horizontal justification
--legend_just_ynumeric0noLegend vertical justification
--legend_text_sizenumeric9noLegend text size
--legend_key_sizenumeric0.6noLegend key size
--legend_bg_alphanumeric0noLegend background alpha
--grid_major_colorcharactergrey92noMajor grid color
--grid_minor_colorcharactergrey92noMinor grid color
--ylab_escharacterEnrichment ScorenoES panel y-axis title
--ylab_rankcharacterRanked List MetricnoRank panel y-axis title
--xlab_rankcharacterRank in Ordered DatasetnoRank panel x-axis title
--hit_heightnumeric1noHit-bar height
--hit_gapnumeric0noHit-bar gap
--hit_linewidthnumeric0.5noHit-bar line width
--rank_bar_alphanumeric0.9noRank-bar alpha
--rank_bar_height_rationumeric0.3noRank-bar height ratio
--rank_metric_segment_colorcharactergreynoRank-line color
--rank_metric_segment_widthnumeric0.3noRank-line width
--rank_metric_segment_alphanumeric1noRank-line alpha
--pvalue_tablelogicalFALSEnoShow p-value table
--ES_geomcharacterlinenoES geometry: line or dot
--verboselogicalFALSEnoVerbose logging
--seedinteger42noRandom seed
--timeoutinteger300noTimeout in seconds; <=0 disables it
-h--helplogicalFALSEnoShow help

Input format

Analysis-mode input is a CSV with at least:

  • a gene column (default name name)
  • a ranking-statistic column (default name logFC)

Example:

csv
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_CC
  • When using a preloaded RDS, HALLMARKS is automatically matched to the asset key Hallmarks
  • species accepts human, mouse, rat

Output files

FileFormatDescription
data/GSEA_list.rdaRDAFull GSEA result object
Table/enrichGSEA.csvCSVEnrichment result table
Table/gsea_running_scores.csvCSVRunning-score table; if no enrichment passes, a header-only file is still written
plot/directoryPlot output directory
session_info.txtTXTR version and package versions

enrichGSEA.csv mainly contains: ID, Description, NES, pvalue, p.adjust, core_enrichment.

Error handling

Common error codes:

  • SKILL_FILE_NOT_FOUND: input file does not exist
  • SKILL_MISSING_COLUMNS: required columns are missing
  • SKILL_EMPTY_DATA: input is empty, or empty after filtering
  • SKILL_INVALID_PARAMETER: an argument has an invalid value
  • SKILL_PACKAGE_NOT_FOUND: a required package is not installed
  • SKILL_ANALYSIS_FAILED: GSEA still failed after retries

Triage doc: references/troubleshooting.md

Exit codes:

  • 0: success
  • 1: failure

Testing

Minimal 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.txt
  • If no significant enrichment is found, gsea_running_scores.csv is still written but contains only the header
  • Exit code 0

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Gsea AI skill do?

Run GSEA on a ranked gene list and produce the enrichment table, running-score table, and enrichment plots.

Why use Gsea on TypingMind?

Because you install it once and use it with any model. Gsea is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Gsea in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/gsea. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Gsea?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Gsea?

As many as you like. As long as a model supports skills, you can use Gsea with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Gsea AI skill free?

Yes. It is published on GitHub by aipoch under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇