Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/bio-pathway-wikipathways/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-17 | ✗→✓ | ▲ Improved | — | — |
| case-05 | ✗→✗ | = Same ✗ | — | — |
| case-13 | ✗→✗ | = Same ✗ | — | — |
| case-20 | ✗→✗ | = Same ✗ | — | — |
| case-01 | ✗→✗ | = Same ✗ | — | — |
Reference examples tested with: ReactomePA 1.46+, clusterProfiler 4.10+, rWikiPathways 1.24+
Before using code patterns, verify installed versions match. If versions differ:
packageVersion('<pkg>') then ?function_name to verify parametersIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
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.
rlibrary(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))
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.
rde_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
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.
r# 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))
rall_genes <- de_results$entrez_id wp_result <- enrichWP( gene = entrez_ids, universe = all_genes, organism = 'Homo sapiens', pvalueCutoff = 0.05 )
r# Convert Entrez IDs to gene symbols wp_readable <- setReadable(wp_result, OrgDb = org.Hs.eg.db, keyType = 'ENTREZID')
Goal: Create summary plots of WikiPathways enrichment results.
Approach: Use enrichplot functions (dotplot, barplot, cnetplot, emapplot) on the enrichment result object.
rlibrary(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)
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.
rlibrary(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')
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.
r# 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 )
r# 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()
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.
rgene_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)
rresults_df <- as.data.frame(wp_result) write.csv(results_df, 'wikipathways_enrichment.csv', row.names = FALSE)
| Parameter | Default | Description | |-----------|---------|-------------| | gene | required | Vector of Entrez IDs | | organism | required | Full species name | | pvalueCutoff | 0.05 | P-value threshold | | pAdjustMethod | BH | Adjustment method | | universe | NULL | Background genes | | minGSSize | 10 | Min genes per pathway | | maxGSSize | 500 | Max genes per pathway |
| Common Name | Scientific Name | |-------------|-----------------| | Human | Homo sapiens | | Mouse | Mus musculus | | Rat | Rattus norvegicus | | Zebrafish | Danio rerio | | Fruit fly | Drosophila melanogaster | | C. elegans | Caenorhabditis elegans | | Arabidopsis | Arabidopsis thaliana | | Yeast | Saccharomyces cerevisiae |
| Feature | WikiPathways | KEGG | Reactome | |---------|--------------|------|----------| | Curation | Community | Expert | Peer-reviewed | | License | Open (CC0) | Commercial | Open | | Species | 30+ | 4000+ | 7 | | Focus | Disease, drug | Metabolic | Signaling | | Updates | Continuous | Ongoing | Quarterly |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-23 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +4 percentage points is the difference between those two pass rates over the 23 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.