omicverse-bulk-metabol-preprocessing

Installation
SKILL.md

OmicVerse Bulk Metabolomics Preprocessing

Goal

Take a metabolomics peak table (NMR or LC-MS; MetaboAnalyst CSV, generic wide CSV, or m/z/RT-coded LC-MS table) into an AnnData and run the canonical clean-up chain — load → impute → sample-normalize → feature-transform — plus optional MS-specific drift / batch / sample-outlier correction. The output is an analysis-ready AnnData with obs['group'] populated, raw intensities preserved as a layer, and the matrix in the right scale for the downstream skill (univariate stats vs. multivariate model).

Stay focused on preprocessing. Univariate differential / anova is a thin add-on shown for completeness; multivariate (PLS-DA, OPLS-DA), pathway enrichment (MSEA), biomarker selection, DGCA, and multi-omics MOFA are separate downstream skills.

Quick Workflow

  1. Pick the loader by file format and pass group_col — every downstream test reads adata.obs['group'].
  2. Impute missing values; method depends on the missingness mechanism (MAR → knn; MNAR / left-censored LC-MS → qrilc).
  3. Normalize each sample row to remove dilution effects — PQN is canonical.
  4. Transform each feature column for variance stabilization (log), and Pareto-scale on top only when a multivariate model will consume the matrix.
  5. For LC-MS with QC pools and injection order: run drift_correct (LOESS-on-QC) → serrf (RF on QC) → ov.bulk.batch_correction (ComBat on residual batch shifts), in that order.
  6. Run sample_qc on the corrected real samples to flag outliers; inspect manually before removing.
  7. Validate that adata.obs['group'] exists, no NaNs remain in adata.X, and raw matrix is preserved in a layer.

Interface Summary

Installs
1
GitHub Stars
13
First Seen
Jul 22, 2026
omicverse-bulk-metabol-preprocessing — omicverse/omicverse-skills