本文へ移動
cccskills
無料GitHub で公開

bio-pathway-wikipathways

WikiPathways enrichment using clusterProfiler and rWikiPathways. Use when analyzing gene lists against community-curated open-source pathways. Performs over-representation analysis and GSEA for 30+ species.

インストール方法を見る

含まれるファイル(4)

  • SKILL.md6.8 KB
  • examples/wikipathways_explore.R598 B
  • examples/wikipathways_ora.R924 B
  • usage-guide.md2.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Version Compatibility

Reference examples tested with: ReactomePA 1.46+, clusterProfiler 4.10+, rWikiPathways 1.24+

Before using code patterns, verify installed versions match. If versions differ:

  • R: packageVersion('<pkg>') then ?function_name to verify parameters

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

WikiPathways Enrichment

Core Pattern - Over-Representation Analysis

Goal: Identify WikiPathways that are over-represented in a gene list.

Approach: Test for enrichment using enrichWP against community-curated open-source pathway definitions.

"Run pathway enrichment against WikiPathways" → Test whether genes from community-curated WikiPathways are over-represented among significant genes.

library(clusterProfiler)
library(org.Hs.eg.db)

wp_result <- enrichWP(
    gene = entrez_ids,         # Character vector of Entrez IDs
    organism = 'Homo sapiens', # Full species name
    pvalueCutoff = 0.05,
    pAdjustMethod = 'BH'
)

head(as.data.frame(wp_result))

Prepare Gene List

Goal: Extract significant Entrez gene IDs from DE results for WikiPathways enrichment.

Approach: Filter by significance thresholds and convert gene symbols to Entrez IDs with bitr.

de_results <- read.csv('de_results.csv')
sig_genes <- de_results[de_results$padj < 0.05 & abs(de_results$log2FoldChange) > 1, 'gene_symbol']

gene_ids <- bitr(sig_genes, fromType = 'SYMBOL', toType = 'ENTREZID', OrgDb = org.Hs.eg.db)
entrez_ids <- gene_ids$ENTREZID

GSEA on WikiPathways

Goal: Detect coordinated expression changes in WikiPathways using a ranked gene list.

Approach: Sort genes by fold change and run gseWP for rank-based enrichment testing.

# Create ranked gene list
gene_list <- de_results$log2FoldChange
names(gene_list) <- de_results$entrez_id
gene_list <- sort(gene_list, decreasing = TRUE)

gsea_wp <- gseWP(
    geneList = gene_list,
    organism = 'Homo sapiens',
    pvalueCutoff = 0.05,
    pAdjustMethod = 'BH'
)

head(as.data.frame(gsea_wp))

With Background Universe

all_genes <- de_results$entrez_id

wp_result <- enrichWP(
    gene = entrez_ids,
    universe = all_genes,
    organism = 'Homo sapiens',
    pvalueCutoff = 0.05
)

Make Results Readable

# Convert Entrez IDs to gene symbols
wp_readable <- setReadable(wp_result, OrgDb = org.Hs.eg.db, keyType = 'ENTREZID')

Visualization

Goal: Create summary plots of WikiPathways enrichment results.

Approach: Use enrichplot functions (dotplot, barplot, cnetplot, emapplot) on the enrichment result object.

library(enrichplot)

# Dot plot
dotplot(wp_result, showCategory = 15)

# Bar plot
barplot(wp_result, showCategory = 15)

# Gene-concept network
cnetplot(wp_readable, categorySize = 'pvalue')

# Enrichment map
wp_result <- pairwise_termsim(wp_result)
emapplot(wp_result)

Using rWikiPathways Directly

Goal: Query the WikiPathways database directly for pathway metadata, gene lists, and GMT files.

Approach: Use rWikiPathways API functions to list organisms, retrieve pathway info, and download gene set definitions.

library(rWikiPathways)

# List available organisms
listOrganisms()

# Get all pathways for an organism
human_pathways <- listPathways('Homo sapiens')

# Get pathway info
pathway_info <- getPathwayInfo('WP554')  # ACE Inhibitor Pathway

# Get genes in a pathway
pathway_genes <- getXrefList('WP554', 'H')  # HGNC symbols
pathway_entrez <- getXrefList('WP554', 'L')  # Entrez IDs

# Download pathway as GMT for custom analysis
downloadPathwayArchive(organism = 'Homo sapiens', format = 'gmt')

Custom GMT-Based Analysis

Goal: Run enrichment using a downloaded WikiPathways GMT file for offline or custom analysis.

Approach: Download the GMT archive via rWikiPathways, read it with read.gmt, and run enricher.

# Download WikiPathways GMT
library(rWikiPathways)
downloadPathwayArchive(organism = 'Homo sapiens', format = 'gmt', destpath = '.')

# Read GMT and run enrichment
wp_gmt <- read.gmt('wikipathways-Homo_sapiens.gmt')

wp_custom <- enricher(
    gene = entrez_ids,
    TERM2GENE = wp_gmt,
    pvalueCutoff = 0.05
)

Different Organisms

# Mouse
wp_mouse <- enrichWP(gene = mouse_entrez, organism = 'Mus musculus')

# Rat
wp_rat <- enrichWP(gene = rat_entrez, organism = 'Rattus norvegicus')

# Zebrafish
wp_zfish <- enrichWP(gene = zfish_entrez, organism = 'Danio rerio')

# List all available organisms
library(rWikiPathways)
listOrganisms()

Compare Clusters

Goal: Compare WikiPathways enrichment across multiple gene lists (e.g., upregulated vs downregulated).

Approach: Use compareCluster with enrichWP to run enrichment per group and visualize with dotplot.

gene_clusters <- list(
    upregulated = up_genes,
    downregulated = down_genes
)

compare_wp <- compareCluster(
    geneClusters = gene_clusters,
    fun = 'enrichWP',
    organism = 'Homo sapiens',
    pvalueCutoff = 0.05
)

dotplot(compare_wp)

Export Results

results_df <- as.data.frame(wp_result)
write.csv(results_df, 'wikipathways_enrichment.csv', row.names = FALSE)

Key Parameters

ParameterDefaultDescription
generequiredVector of Entrez IDs
organismrequiredFull species name
pvalueCutoff0.05P-value threshold
pAdjustMethodBHAdjustment method
universeNULLBackground genes
minGSSize10Min genes per pathway
maxGSSize500Max genes per pathway

Common Organisms

Common NameScientific Name
HumanHomo sapiens
MouseMus musculus
RatRattus norvegicus
ZebrafishDanio rerio
Fruit flyDrosophila melanogaster
C. elegansCaenorhabditis elegans
ArabidopsisArabidopsis thaliana
YeastSaccharomyces cerevisiae

WikiPathways vs Other Databases

FeatureWikiPathwaysKEGGReactome
CurationCommunityExpertPeer-reviewed
LicenseOpen (CC0)CommercialOpen
Species30+4000+7
FocusDisease, drugMetabolicSignaling
UpdatesContinuousOngoingQuarterly

Related Skills

  • go-enrichment - Gene Ontology enrichment
  • kegg-pathways - KEGG pathway enrichment
  • reactome-pathways - Reactome pathway enrichment
  • gsea - Gene Set Enrichment Analysis
  • enrichment-visualization - Visualization functions

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

adaptyv

無料

Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein sequence optimization. Also use for submitting experiments via API, tracking experiment status, downloading results, optimizing protein sequences for better expression using computational tools (NetSolP, SoluProt, SolubleMPNN, ESM), or managing protein design workflows with wet-lab validation.

日本語の概要は準備中です。原文の説明を表示しています。

FreedomIntelligence/OpenClaw-Medical-Skills3,0632026年7月21日 更新

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

日本語の概要は準備中です。原文の説明を表示しています。

FreedomIntelligence/OpenClaw-Medical-Skills3,0632026年7月21日 更新

aeon

無料

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

日本語の概要は準備中です。原文の説明を表示しています。

FreedomIntelligence/OpenClaw-Medical-Skills3,0632026年7月21日 更新

Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.

日本語の概要は準備中です。原文の説明を表示しています。

FreedomIntelligence/OpenClaw-Medical-Skills3,0632026年7月21日 更新

AI驱动的综合健康分析系统,整合多维度健康数据、识别异常模式、预测健康风险、提供个性化建议。支持智能问答和AI健康报告生成。

日本語の概要は準備中です。原文の説明を表示しています。

FreedomIntelligence/OpenClaw-Medical-Skills3,0632026年7月21日 更新

alphafold

無料

Validate protein designs using AlphaFold2 structure prediction. Use this skill when: (1) Validating designed sequences fold correctly, (2) Predicting binder-target complex structures, (3) Calculating confidence metrics (pLDDT, pTM, ipTM), (4) Self-consistency validation of designs, (5) Multi-chain complex prediction with AlphaFold-Multimer. For faster single-chain prediction, use esm. For QC thresholds, use protein-qc.

日本語の概要は準備中です。原文の説明を表示しています。

FreedomIntelligence/OpenClaw-Medical-Skills3,0632026年7月21日 更新

FreedomIntelligence のスキルをすべて見る

このスキルの問題を報告する