Gseaのロゴ

Gsea

組織人気
aipoch
gsea

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

概要

公開者aipoch
リポジトリmedical-research-skills
スキル名gsea
スター
1.9K
フォーク
175
同梱ファイル
11
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 11個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    aipochがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Gsea」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/gsea
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。

TypingMindで使用

TypingMindのチャットでGseaを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にGseaを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Gseaは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Gsea」では何ができますか?

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

TypingMindでGseaを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Gseaはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにGseaをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/gseaを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Gseaを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Gseaで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもGseaを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Gsea」は無料ですか?

はい。aipochがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇