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.
Best use case
bio-pathway-wikipathways is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using bio-pathway-wikipathways should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/bio-pathway-wikipathways/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How bio-pathway-wikipathways Compares
| Feature / Agent | bio-pathway-wikipathways | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
## 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.
```r
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.
```r
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.
```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))
```
## With Background Universe
```r
all_genes <- de_results$entrez_id
wp_result <- enrichWP(
gene = entrez_ids,
universe = all_genes,
organism = 'Homo sapiens',
pvalueCutoff = 0.05
)
```
## Make Results Readable
```r
# 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.
```r
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.
```r
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.
```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
)
```
## Different Organisms
```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()
```
## 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.
```r
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
```r
results_df <- as.data.frame(wp_result)
write.csv(results_df, 'wikipathways_enrichment.csv', row.names = FALSE)
```
## Key Parameters
| 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 Organisms
| 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 |
## WikiPathways vs Other Databases
| 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 |
## 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 functionsRelated Skills
bio-pathway-reactome
Reactome pathway enrichment using ReactomePA package. Use when analyzing gene lists against Reactome's curated peer-reviewed pathway database. Performs over-representation analysis and GSEA with visualization and pathway hierarchy exploration.
bio-pathway-kegg-pathways
KEGG pathway and module enrichment analysis using clusterProfiler enrichKEGG and enrichMKEGG. Use when identifying metabolic and signaling pathways over-represented in a gene list. Supports 4000+ organisms via KEGG online database.
bio-pathway-gsea
Gene Set Enrichment Analysis using clusterProfiler gseGO and gseKEGG. Use when analyzing ranked gene lists to find coordinated expression changes in gene sets without arbitrary significance cutoffs. Detects subtle but coordinated expression changes.
bio-pathway-go-enrichment
Gene Ontology over-representation analysis using clusterProfiler enrichGO. Use when identifying biological functions enriched in a gene list from differential expression or other analyses. Supports all three ontologies (BP, MF, CC), multiple ID types, and customizable statistical thresholds.
bio-pathway-enrichment-visualization
Visualize enrichment results using enrichplot package functions. Use when creating publication-quality figures from clusterProfiler results. Covers dotplot, barplot, cnetplot, emapplot, gseaplot2, ridgeplot, and treeplot.
bio-metabolomics-pathway-mapping
Map metabolites to biological pathways using KEGG, Reactome, and MetaboAnalyst. Perform pathway enrichment and topology analysis. Use when interpreting metabolomics results in the context of biochemical pathways.
zinc-database
Access ZINC (230M+ purchasable compounds). Search by ZINC ID/SMILES, similarity searches, 3D-ready structures for docking, analog discovery, for virtual screening and drug discovery.
zarr-python
Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.
xlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
wikipedia-search
Search and fetch structured content from Wikipedia using the MediaWiki API for reliable, encyclopedic information