Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính51k · #3523

pathway-enrichment

Skill này làm gì

Công cụ này giúp khám phá các quá trình sinh học hoặc con đường nào đang hoạt động mạnh nhất trong danh sách gen bạn cung cấp. Nó phân tích các gen của bạn và cho biết những con đường quan trọng mà chúng cùng chia sẻ.

Khi nào nên dùng

  • ✓Khi bạn có danh sách gen quan trọng từ một thí nghiệm.
  • ✓Khi bạn muốn hiểu những gen này cùng nhau làm gì.
  • ✓Khi bạn cần giải thích sinh học đằng sau kết quả gen của mình.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/pathway-enrichment/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Những con đường sinh học nào đang hoạt động trong các gen quan tâm của tôi?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ so sánh danh sách gen của bạn với các danh sách con đường sinh học đã biết. Nó dùng phương pháp thống kê để xem con đường nào có nhiều gen trong danh sách của bạn hơn mức ngẫu nhiên mong đợi.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

…
Câu hỏi thường gặp

ORA và GSEA khác nhau thế nào?

ORA (Over-Representation Analysis) dùng một danh sách gen với ngưỡng xác định. GSEA (Gene Set Enrichment Analysis) dùng toàn bộ danh sách gen đã xếp hạng, phù hợp hơn để phát hiện các hiệu ứng nhỏ.

“Gene sets” là gì?

“Gene sets” là các tập hợp gen được biết là hoạt động cùng nhau trong một quá trình sinh học cụ thể, như các con đường KEGG hoặc thuật ngữ GO.

Tôi có thể dùng dữ liệu của mình không?

Có. Bạn có thể cung cấp danh sách gen hoặc dữ liệu đã xếp hạng của riêng mình. Công cụ cũng cho phép bạn chỉ định “nền” (tập hợp tất cả các gen đã được kiểm tra) để phân tích chính xác hơn.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
51k
Vị trí xếp hạng
#3523
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự