hinna0818/ukbanalytica_v2/ukbsci-metabolomics
Claude Code and agent skill by hinna0818/ukbanalytica_v2
- community
Checking that the SKILL.md file is still in the repository.
Metabolomics over-representation analysis (ORA) for UK Biobank Nightingale NMR metabolite data using UKBAnalytica. Covers metabolite classification (classify_metabolites), UK Biobank–to–MetaboAnalyst name mapping (metabolite_to_metaboanalyst_name), panel loading (load_ukb_metabolite_panel), ORA with a custom pathway library or MetaboAnalystR backend (run_metabolite_ora), and ggplot2 visualization of ORA results (plot_metabolite_ora_dotplot, plot_metabolite_ora_barplot). Use this skill when the user wants to interpret a list of significant metabolites from a regression or GWAS screen, identify enriched metabolic pathways, or visualize ORA results. Triggers: metabolomics, metabolite ORA, pathway enrichment, Nightingale, MetaboAnalyst, 代谢组, 代谢物富集, /ukbsci-metabolomics. Hard rule: local agents must not read or inspect real UKB RAP participant-level data; generate scripts for RAP execution and interpret aggregate outputs only.
Install
npx vskill@latest install hinna0818/ukbanalytica_v2/ukbsci-metabolomicsSKILL.md
ukbsci-metabolomics — Metabolomics ORA for UK Biobank Nightingale data
0. RAP guardrails
Strict local-agent boundary: this skill is for script generation, workflow planning, package guidance, and interpretation of aggregate outputs. The agent must not read, inspect, summarize, or process real UK Biobank RAP participant-level data, including de-identified row-level tables, raw RAP fields, exact dates, per-row predictions, or logs containing row-level values. Generate scripts for the user to run inside RAP; only aggregate results (ORA tables, rendered figures) may be shared back with the agent. See ../references/agent-privacy-boundary.md.
Input: a character vector of metabolite names (typically the significant hits from a prior regression or association screen). Output: ORA result table (pathway / hits / fold_enrichment / pvalue / p_adjust) and ggplot2 figures, which may be shared with the local agent.
1. When to load
- Interpret a significant metabolite list from regression, GWAS, or
multi-omic analysis.
- Map UK Biobank Nightingale metabolite labels to MetaboAnalyst-compatible names.
- Classify metabolites (small molecules vs. lipoprotein-lipid measures vs.
proteins) before pathway analysis.
- Run ORA against a custom pathway library or via MetaboAnalystR.
- Visualize enriched pathways as a dot plot or bar plot.
2. When NOT to load
- Regression of metabolites as exposures or outcomes →
ukbsci-regression. - Proteomics ORA →
ukbsci-proteomics. - Forest plots or other generic visualizations →
ukbsci-plot.
3. Prerequisites
The bundled metabolite panel is accessed automatically via load_ukb_metabolite_panel(). No external files are required for the backend = "custom" workflow.
4. Pipeline
Phase 1 — Inspect and classify the hit list
Categories:
small_molecule— amino acids, organic acids, ketones, etc.; eligible for ORA.lipoprotein_lipid— cholesterol fractions, triglycerides, lipoprotein particle
counts, fatty acid composites; excluded from small-molecule ORA by default.
protein— albumin, apolipoproteins; excluded.unknown— metabolite not matched to any built-in rule.
Only small_molecule metabolites are passed to run_metabolite_ora().
Phase 2 — Map metabolite names (optional)
To supply a custom mapping for non-standard names:
Custom entries override the built-in map; mapping_source is set to "custom_table" for those rows.
Phase 3 — Run ORA
3a. Custom pathway library (recommended)
Use this when you have a curated two-column pathway–metabolite library or want full control over the background universe.
To specify a custom background universe (instead of all pathway-library metabolites):
3b. MetaboAnalystR backend (optional)
Requires MetaboAnalystR installed and internet access (downloads .qs library files).
run_subprocess = TRUE is the default and the safest option. Set FALSE only if running inside an environment where subprocess calls are not available (e.g. some HPC job submissions).
Phase 4 — Visualize
Both functions accept either a ukb_metabolite_ora object (the run_metabolite_ora() output) or a plain data.frame (the $ora_result slot).
5. Common pitfalls
- Lipoprotein measures are excluded from ORA.
run_metabolite_ora()
restricts the query to category == "small_molecule". If the user expects lipoprotein-related pathways, explain that these are not small molecules and are excluded by design.
- Unknown metabolites. Non-standard or UKB-specific names may not match
the built-in map. Use metabolite_to_metaboanalyst_name() with a custom mapping table, or check ora$unmatched and curate manually.
- `min_metabolites` too strict. The default (
3) drops pathways with fewer
than 3 matched hits. Reduce to 2 for small hit lists; note this increases the risk of spurious enrichment.
- Universe choice. The default custom-ORA universe is all metabolites in
pathway_db. If the hit list was selected from a larger panel, pass the full panel as universe for a conservative, correctly calibrated background.
- MetaboAnalystR global state.
run_subprocess = TRUE(default) avoids
side effects from MetaboAnalystR's use of global variables. Do not set FALSE unless in a constrained environment.
- Internet required for MetaboAnalystR backend. Library
.qsfiles are
downloaded from MetaboAnalyst servers at runtime. Ensure outbound HTTP is available, or use backend = "custom" in air-gapped environments.
- Name normalisation. The built-in name map normalises keys by lower-casing
and removing non-alphanumeric characters, so minor spacing or capitalisation differences are tolerated. However, completely non-standard abbreviations (e.g. "3OHB" instead of "3-Hydroxybutyrate") will not match.
6. Key functions
| Function | Returns | |
|---|---|---|
load_ukb_metabolite_panel(file = NULL, file_encoding = "UTF-16LE") | data.frame with Description, UKB_ID, meta_ID | |
classify_metabolites(metabolites) | data.frame: metabolite, category, metaboanalyst_name, mapping_source | |
metabolite_to_metaboanalyst_name(metabolites, mapping_table = NULL, drop_unmapped = FALSE) | data.frame: metabolite, metaboanalyst_name, mapping_source | |
run_metabolite_ora(metabolites, pathway_db, universe, backend, library, mapping_table, min_metabolites, p_adjust_method, run_subprocess) | ukb_metabolite_ora list: input, mapping, matched, unmatched, ora_result, backend, library | |
plot_metabolite_ora_dotplot(x, top_n, p_col, size_col, pathway_col, color_low, color_high) | ggplot2 object | |
plot_metabolite_ora_barplot(x, top_n, p_col, pathway_col, fill_color) | ggplot2 object |
`ora_result` columns (custom backend):
| Column | Description | |
|---|---|---|
pathway | Pathway name | |
hits | Number of query metabolites in pathway | |
pathway_size | Total metabolites in pathway (within universe) | |
query_size | Total query metabolites used for ORA | |
universe_size | Background universe size | |
expected | Expected hits under the null | |
fold_enrichment | hits / expected | |
pvalue | Hypergeometric p-value | |
p_adjust | BH-adjusted p-value (or chosen method) | |
neg_log10_p | −log₁₀(pvalue) for plotting | |
hit_names | Semicolon-delimited list of matching metabolite names |
7. Related skills
| Skill | When | |
|---|---|---|
ukbsci-regression | Regression of metabolites as exposures or outcomes. | |
ukbsci-proteomics | ORA for protein / omic-level data. | |
ukbsci-plot | Generic forest / volcano plots. | |
ukbsci-workflow | End-to-end orchestrator. |
8. References
- `references/functions.md` — full argument tables
- `references/examples.md` — end-to-end example
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginst/skills/UKBAnalytica_skills/ukbsci-metabolomics/SKILL.md
Popularity
- Repository stars
- 35
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 28 Aug 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hinna0818/ukbanalytica_v2/ukbsci-metabolomics)