本文へスキップ
Skillpedia
分析とスプレッドシート51k · #3523

pathway-enrichment

できること

このツールは、入力した遺伝子リストの中で、どの生物学的プロセスや経路が最も活発に働いているかを見つけるのに役立ちます。遺伝子を分析し、それらが共通して関わる重要な経路を示します。

使う場面

  • ✓実験で得られた重要な遺伝子のリストがあるとき。
  • ✓これらの遺伝子が一緒にどのような働きをしているかを理解したいとき。
  • ✓遺伝子解析の結果について、その背後にある生物学を説明する必要があるとき。

スキルのリンク

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/pathway-enrichment/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/pathway-enrichment/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私が注目している遺伝子では、どの生物学的経路が活発になっていますか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、入力された遺伝子リストを、既知の生物学的経路のリストと比較します。統計的手法を用いて、偶然よりも多くの遺伝子が含まれている経路を見つけ出します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Pathway Enrichment

Overview

Enrichment analysis answers "what biology is over-represented in my genes?" It is the standard last step after differential expression, a screen, or clustering. There are two core methods, and choosing correctly is the single most important decision:

  • ORA (over-representation analysis) — take a thresholded gene list (e.g., padj < 0.05) and test which gene sets it overlaps more than chance, using Fisher's exact / hypergeometric tests. Tools: Enrichr, g:Profiler.
  • GSEA (gene set enrichment analysis) — take the whole ranked list of genes (no threshold) and test whether each gene set is concentrated toward the top or bottom. Preranked GSEA uses a per-gene score (e.g., the DESeq2 stat). Better when effects are broad and subtle.

This skill orchestrates these analyses, the gene-set databases behind them, and the interpretation pitfalls that make results wrong or unpublishable.

When to Use This Skill

Use this skill when the user wants to:

  • Find enriched GO terms / KEGG / Reactome / WikiPathways / MSigDB Hallmark sets in a gene list.
  • Run GSEA / preranked GSEA on DESeq2, edgeR, limma, or Scanpy rank_genes_groups output.
  • Score gene-set expression per sample/cell (ssGSEA, GSVA).
  • Interpret, deduplicate, and visualize enrichment results, or build a publication table/figure.
  • Decide between ORA and GSEA, pick gene-set libraries, choose a background, or fix gene-ID problems.

For quick one-off Enrichr lookups the gget skill (gget enrichr) is lighter weight; for raw pathway/interaction APIs (Reactome, KEGG, STRING) see the database-lookup skill. Use this skill for full, defensible enrichment workflows.

Choosing the Right Method

Situation Method Tool / entry point
You have a discrete hit list (DE genes, screen hits, cluster markers) ORA gp.enrichr(...) or g:Profiler
You have a full ranked list (every tested gene + a score) Preranked GSEA gp.prerank(...)
You have an expression matrix + class labels GSEA gp.gsea(...)
You want a gene-set score per sample/cell ssGSEA / GSVA gp.ssgsea(...), gp.gsva(...)
You need a custom background or additional organisms ORA with custom domain g:Profiler (domain_scope='custom')
You want TF / signaling activity (PROGENy, DoRothEA) activity inference see references/databases-and-gene-sets.md (decoupler)

When in doubt: a thresholded list → ORA; a ranked table with scores → GSEA. Never threshold a list and then feed it to GSEA — that discards the ranking GSEA depends on.

Setup

uv pip install gseapy==1.3.1 gprofiler-official==1.0.0 mygene==3.2.2 lxml
# gseapy pulls pandas, numpy, scipy, matplotlib. Network access is needed for
# Enrichr, g:Profiler, and MSigDB downloads. For fully offline ORA, use a local
# GMT file with gp.enrich() (see references/gseapy.md).

The examples target GSEApy 1.3.1 (released stable); the helper runs classic permutation GSEA. Current MSigDB is 2026.1.Hs/2026.1.Mm. Local synthetic workflows and small public mapping/catalog queries were executed; Enrichr submission routes were verified from released source with mocked transport. BioMart returned service-unavailable HTML during review; validate its output schema. See verified API contracts for evidence and boundaries.

Verify and list available gene-set libraries (names change over time — never hardcode blindly):

import gseapy as gp
names = gp.get_library_name(organism="human")   # discover current Enrichr libraries
print([n for n in names if "Reactome" in n or "KEGG" in n or "Hallmark" in n])

Quick Start

ORA on a hit list (gseapy + Enrichr)

import gseapy as gp

# Match the library organism and identifier namespace; map aliases explicitly.
# Keep original spelling: capitalization is not gene-ID or orthology mapping.
genes = [g.strip() for g in open("deg_symbols.txt") if g.strip()]
tested = [g.strip() for g in open("tested_symbols.txt") if g.strip()]
assert set(genes) <= set(tested)

enr = gp.enrichr(
    gene_list=genes,
    gene_sets=["MSigDB_Hallmark_2020", "GO_Biological_Process_2026",
               "KEGG_2026", "Reactome_Pathways_2024"],
    organism="human", background=tested,
    outdir=None,            # in-memory; set a path to also write tables/plots
)
res = enr.results

…
よくある質問

ORA と GSEA の違いは何ですか?

ORA(過剰表現解析)は、あらかじめ決めた基準で選んだ遺伝子リストを使います。GSEA(遺伝子セット濃縮解析)は、順位付けされた遺伝子リスト全体を使うため、わずかな効果を捉えるのに適しています。

「遺伝子セット」とは何ですか?

「遺伝子セット」とは、特定の生物学的プロセスの中で一緒に働くことが知られている遺伝子の集まりのことです。KEGG パスウェイや GO ターム などがこれにあたります。

自分のデータを使うことはできますか?

はい、ご自身の遺伝子リストや順位付けされたデータを入力できます。また、より正確な解析のために、「バックグラウンド」(検査対象となったすべての遺伝子の集合)を指定することもできます。

詳細

作者による元の説明

Performs pathway and gene-set enrichment analysis on gene lists or ranked gene data and interprets the results. Used when the user has a set of genes (differentially expressed genes from PyDESeq2/Scanpy, CRISPR-screen hits, cluster marker genes, proteomics hits) and wants to know which biological pathways, GO terms, or gene sets are over-represented or enriched. Covers over-representation analysis

repo: K-Dense-AI/scientific-agent-skills

人気

GitHubのスター
51k
ランキング
#3523
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル