metabolomics-curation

Curate untargeted LC-MS metabolomics features using QC metrics, duplicate resolution, and HTML reports.

Updated May 28, 2026
One-click install
npx skills add https://github.com/cpanse/skills --skill metabolomics-curation-cpanse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: metabolomics-curation
Source: https://github.com/cpanse/skills/tree/main/metabolomics-data-analysis/skills/metabolomics-curation
Command: npx skills add https://github.com/cpanse/skills --skill metabolomics-curation-cpanse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, matplotlib, seaborn, openpyxl, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Untargeted metabolomics experiments produce 100-300 putative features of which 60-70% are low-quality due to poor reproducibility, background noise, or duplicate annotations, requiring hours of manual curation. This Skill automates QC metric calculation, feature flagging, and duplicate resolution to reduce curation time from hours to minutes. ## Core Features & Use Cases - Automated QC Metrics: Parses feature tables from Compound Discoverer, XCMS, or MS-DIAL, auto-classifies blanks/QC/biological samples, and computes CV% and biological/blank ratios against FGCZ thresholds. - Duplicate Resolution: Ranks duplicate compound annotations using a composite score (RT consistency 45%, CV% 45%, MS2 match 10%) and recommends KEEP/ALTERNATIVE/REMOVE actions. - Interactive HTML Reports: Generates self-contained FGCZ-styled reports with tabbed navigation, sortable/filterable tables, and 300 DPI plots via Python or R Markdown. - Use Case: Given an Excel feature table with 261 features and 141 columns, run the four-step pipeline to produce a curated table of ~82 high-confidence features plus an interactive QC report. ## Quick Start Curate the metabolomics features in my attached Excel file by calculating QC metrics, resolving duplicate annotations, and generating an HTML report.

Frequently Asked Questions about metabolomics-curation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I curate untargeted metabolomics features from LC-MS data?

Run the four-step pipeline: parse the feature table to extract sample metadata, calculate QC metrics (CV% and biological/blank ratios), resolve duplicate annotations by composite quality score, then generate an interactive HTML report. Each step is a standalone Python script accepting Excel or CSV input.

What QC thresholds are used to flag metabolomics features?

Default FGCZ thresholds flag features with pooled QC CV% above 30% or biological/blank signal ratio below 5×. Both thresholds are adjustable via command-line arguments, with suggested values for targeted, exploratory, plasma, urine, tissue, and plant experiments.

How are duplicate metabolite annotations resolved?

Features sharing a compound name are ranked by a composite score weighting RT consistency (45%), low CV% (45%), and MS2 match quality (10%). The best feature is marked KEEP, near-ties are marked ALTERNATIVE for manual review, and the rest are marked REMOVE.

Can I generate the QC report without R or RStudio?

Yes, the generate_html_report.py script produces an equivalent self-contained HTML report using only pandas, matplotlib, and seaborn. It runs in about 10-20 seconds versus ~60 seconds for the R Markdown template and works in environments without R.

Why are more than 80% of my features flagged for review?

Excessive flagging usually means thresholds are too stringent for the experiment type, blanks or QC samples were misclassified in metadata.json, or overall data quality is poor. Verify sample classifications first, then relax the CV% threshold to 40% or blank ratio to 3×.

What input file formats does the metabolomics curation workflow support?

The workflow accepts Excel (.xlsx) and CSV feature tables from platforms like Compound Discoverer, XCMS, and MS-DIAL. Tables should contain Area or Norm. Area sample columns, compound identification columns, and typically 100-300 feature rows.