omicverse-bulk-metabol-untargeted-lipidomics
OmicVerse Bulk Metabolomics — Untargeted LC-MS & Lipidomics
Goal
Take an LC-MS peak table (m/z + RT-coded features) or a lipidomics matrix (LIPID MAPS shorthand var-names) into an AnnData, then run the two ID-aware downstream paths — peak annotation + mummichog pathway inference for untargeted metabolomics, lipid-class parsing + class aggregation + LION enrichment for lipidomics. The output is a list of pathway / ontology hits backed by the empirical feature p-values, plus a class-aggregated lipid matrix when requested.
This skill assumes the upstream preprocessing chain (impute / normalize / log) has already run; for the chain see the omicverse-bulk-metabol-preprocessing skill. ID mapping for named metabolites (HMDB / KEGG / ChEBI ID resolution) and MSEA pathway enrichment are in the pathway-multifactor skill.
Quick Workflow
Untargeted LC-MS path (t_metabol_04)
- Load the LC-MS peak table with
ov.metabol.read_lcms(..., feature_id_sep=...)som/zandRTget parsed intovar['m_z']andvar['rt']. - Apply preprocessing (PQN + log) — don't impute zeros for LC-MS (zeros = below-detection).
- Run
differentialto get a per-peak p-value vector. - Untargeted LC-MS often has thousands of peaks vs. low n — BH-FDR is too strict to discriminate. For the volcano, pass
use_pvalue=Trueand clip thelog2fcaxis to keep below-detection extremes from blowing the figure. - Enrich pathways from m/z + p-value with
ov.metabol.mummichog_basic(...)— a permutation-based pathway test that handles the FDR burden internally. - Optionally inspect candidate compound annotations per peak with
ov.metabol.annotate_peaks(...)— adduct-resolved KEGG candidates by ppm tolerance. - For sanity checks: build a synthetic m/z set from a known KEGG pathway (e.g. via
fetch_chebi_compounds()+load_pathways()), seed it with low p-values, and confirm mummichog recovers the seeded pathway.