galaxy-w4m-lcms-processing-workflow
The Workflow4Metabolomics LC-MS line as one pipeline: ten stages, each bound to
leaf skills already in this collection and to the Galaxy tool that performs it.
When to use
You are running, reviewing or reproducing a metabolomics analysis on a
Workflow4Metabolomics Galaxy instance, and you want the whole route from raw
open-format files to statistics rather than one step of it.
When not to use
- The analysis is MS/MS annotation-led — molecular networking, spectral library
matching, SIRIUS. That is
untargeted-lcmsms-annotation, a different pipeline
with different tools.
- You are working locally with xcms in R. The stage order still holds, but the
Galaxy datatypes and the three-table interchange format do not apply.
- The data are NMR, or isotope-labelling and flux data. The same repository ships
those tools, but they form separate chains that share only the three-table
format.
Why this stage order
It is not a convention. Each Galaxy wrapper declares the datatype it accepts and
the datatype it emits, and the chain below is the only order those declarations
permit. Two consequences are worth naming because they surprise people:
adjustRtime consumes a grouped object, so correspondence runs before
alignment and is then repeated against the corrected retention times; and
fillChromPeaks accepts only rdata.xcms.group, so gap filling cannot be moved
after annotation.
| stage |
W4M tools |
emits |
import_raw |
MSnbase readMSData, Mz(X)ML Shaper |
rdata.msnbase.raw |
parameter_optimisation |
IPO for xcmsSet, IPO for group and retcor |
ipo-parameters |
peak_detection |
xcms findChromPeaks, xcms refineChromPeaks, xcms findChromPeaks Merger |
rdata.xcms.findchrompeaks |
correspondence |
xcms groupChromPeaks |
rdata.xcms.group |
rt_alignment |
xcms adjustRtime, xcms groupChromPeaks |
rdata.xcms.group |
gap_filling |
xcms fillChromPeaks |
rdata.xcms.fillpeaks |
annotation |
CAMERA.annotate, CAMERA.groupFWHM, CAMERA.groupCorr, CAMERA.findIsotopes, CAMERA.findAdducts, CAMERA.combinexsAnnos |
rdata.camera, three-table |
table_conformance |
Check Format, Table Merge, W4M concatenate, xcms get a sampleMetadata file |
three-table |
normalisation |
Normalization, Parsec batch correction, Batch Dispersion, Intensity Check |
three-table |
statistics |
Biosigner, mixmodel, Metabolites Correlation Analysis, Heatmap |
statistics, pdf |
Stages
import_raw
Raw open-format files -> an MSnbase object the xcms chain accepts.
- after: —
- in → out: mzML, mzXML, netCDF → rdata.msnbase.raw
- W4M tools:
MSnbase readMSData, Mz(X)ML Shaper
- EDAM:
operation_3215
- leaf skills:
xcms-data-import-preprocessing (primary)
mzml-file-import-xcms
mass-spectrometry-data-format-import
- grounding: 2 source DOI(s)
parameter_optimisation
Design-of-experiments search for peak-picking, grouping and alignment parameters.
- after: —
- in → out: mzML → ipo-parameters
- W4M tools:
IPO for xcmsSet, IPO for group and retcor
- EDAM:
operation_3435
- leaf skills:
parameter-tuning-metabolomics (primary)
peak-picking-parameter-configuration
chromatographic-alignment-parameter-selection
- grounding: 3 source DOI(s)
peak_detection
Detect chromatographic peaks per sample and merge the per-sample objects.
- after:
import_raw, parameter_optimisation
- in → out: rdata.msnbase.raw → rdata.xcms.findchrompeaks
- W4M tools:
xcms findChromPeaks, xcms refineChromPeaks, xcms findChromPeaks Merger
- EDAM:
operation_3441
- leaf skills:
lc-ms-profile-data-segmentation (primary)
chromatographic-peak-detection-wavelet
chromatographic-profile-quality-assessment
- grounding: 3 source DOI(s)
correspondence
Group peaks across samples into features.
- after:
peak_detection
- in → out: rdata.xcms.findchrompeaks → rdata.xcms.group
- W4M tools:
xcms groupChromPeaks
- EDAM:
operation_3632
- leaf skills:
lc-ms-feature-grouping-by-retention-time (primary)
mass-chromatogram-alignment
- grounding: 1 source DOI(s)
rt_alignment
Correct retention-time drift, then repeat correspondence against the corrected times.
- after:
correspondence
- in → out: rdata.xcms.group → rdata.xcms.group
- W4M tools:
xcms adjustRtime, xcms groupChromPeaks
- EDAM:
operation_3632
- leaf skills:
retention-time-correction-and-alignment (primary)
retention-time-alignment-correction
- grounding: 2 source DOI(s)
gap_filling
Integrate the areas of peaks missing from the feature matrix.
- after:
rt_alignment
- in → out: rdata.xcms.group → rdata.xcms.fillpeaks
- W4M tools:
xcms fillChromPeaks
- EDAM:
operation_3214
- leaf skills:
missing-peak-imputation-fillpeaks (primary)
- grounding: 1 source DOI(s)
annotation
Group features into pseudospectra and annotate isotopes and adducts.
- after:
gap_filling
- in → out: rdata.xcms.fillpeaks → rdata.camera, three-table
- W4M tools:
CAMERA.annotate, CAMERA.groupFWHM, CAMERA.groupCorr, CAMERA.findIsotopes, CAMERA.findAdducts, CAMERA.combinexsAnnos
- EDAM:
operation_3432
- leaf skills:
spectral-feature-clustering-by-intensity-correlation (primary)
metabolite-mass-to-charge-ratio-matching
adduct-fragment-table-construction
- grounding: 1 source DOI(s)
table_conformance
Make the dataMatrix, sampleMetadata and variableMetadata agree before any statistics.
- after:
annotation
- in → out: three-table → three-table
- W4M tools:
Check Format, Table Merge, W4M concatenate, xcms get a sampleMetadata file
- EDAM:
operation_3891
- leaf skills:
feature-metadata-parsing-and-integration (primary)
metadata-structure-checking
cross-table-metadata-harmonization
- grounding: 3 source DOI(s)
normalisation
Normalise intensities and correct batch and drift effects using the pooled QC samples.
- after:
table_conformance
- in → out: three-table → three-table
- W4M tools:
Normalization, Parsec batch correction, Batch Dispersion, Intensity Check
- EDAM:
operation_3434
- leaf skills:
batch-effect-correction-qc-reference (primary)
batch-effect-correction-and-adjustment
compound-reliability-rsd-filtering
- grounding: 3 source DOI(s)
statistics
Univariate, multivariate and signature analysis on the corrected matrix.
- after:
normalisation
- in → out: three-table → statistics, pdf
- W4M tools:
Biosigner, mixmodel, Metabolites Correlation Analysis, Heatmap
- EDAM:
operation_3695
- leaf skills:
pls-pls-da-classification-modeling (primary)
metabolomic-biomarker-pathway-association
- grounding: 2 source DOI(s)
Grounding
Every stage carries the DOIs and KB slugs of the leaves bound to it; ground a
stage with the collection's /ground recipe against those slugs.
The pipeline structure is grounded differently from the leaves: it was read off
the tool wrappers in workflow4metabolomics/tools-metabolomics at master on
2026-08-21, not distilled from a paper. provenance.structure_source in
workflow.yaml records that.
Verification contract
- Each stage's output datatype is the one the next stage declares as its input.
A Galaxy invocation that type-checks has already verified most of this.
- The second correspondence pass ran after alignment; a workflow with one
grouping step is missing it.
- The three tables agree on identifiers and order before
normalisation. See
w4m-three-table-format-conformance.
xcms process history matches the exported workflow.
- Feature counts are reported after gap filling, not after correspondence; the
two differ and only the first describes the matrix the statistics saw.
Coverage gaps
The corpus does not cover this pipeline evenly, and the bindings say where:
- Parameter optimisation — no leaf declares IPO. The stage is bound to
generic parameter-tuning leaves, which describe the activity but not the tool.
- Statistics — no leaf declares Biosigner or the other W4M statistics
wrappers. The bound leaves cover PLS-DA and biomarker association generically.
- The platform — no leaf declares Workflow4Metabolomics or Galaxy. The
collection knows the methods this pipeline runs and not the platform that runs
them.
Of the 16 DOIs the wrappers cite, 2 are already in the collection's corpus. The
other 14 are candidates for corpus expansion, which would close the gaps above
at their source rather than by rebinding.
Provenance
Structure from the tool wrappers; leaf bindings by lexical retrieval over
skills_index.json constrained to leaves that declare the relevant tool, then
checked by hand. bound_by: index. No ASB rerun; no per-paper workflow DAG
contributed structure, so derived_from_workflows is empty and no benchmark
ablation is required.
1---2name: galaxy-w4m-lcms-processing-workflow3description: Use when running the Workflow4Metabolomics LC-MS pipeline end to end on a Galaxy instance — MSnbase import, xcms peak detection, correspondence, alignment and gap filling, CAMERA annotation, three-table conformance, batch correction, statistics — in the stage order the wrappers' datatypes enforce.4license: CC-BY-4.05---67# galaxy-w4m-lcms-processing-workflow89The Workflow4Metabolomics LC-MS line as one pipeline: ten stages, each bound to10leaf skills already in this collection and to the Galaxy tool that performs it.1112## When to use1314You are running, reviewing or reproducing a metabolomics analysis on a15Workflow4Metabolomics Galaxy instance, and you want the whole route from raw16open-format files to statistics rather than one step of it.1718## When not to use1920- The analysis is MS/MS annotation-led — molecular networking, spectral library21 matching, SIRIUS. That is `untargeted-lcmsms-annotation`, a different pipeline22 with different tools.23- You are working locally with xcms in R. The stage order still holds, but the24 Galaxy datatypes and the three-table interchange format do not apply.25- The data are NMR, or isotope-labelling and flux data. The same repository ships26 those tools, but they form separate chains that share only the three-table27 format.2829## Why this stage order3031It is not a convention. Each Galaxy wrapper declares the datatype it accepts and32the datatype it emits, and the chain below is the only order those declarations33permit. Two consequences are worth naming because they surprise people:34`adjustRtime` consumes a *grouped* object, so correspondence runs before35alignment and is then repeated against the corrected retention times; and36`fillChromPeaks` accepts only `rdata.xcms.group`, so gap filling cannot be moved37after annotation.3839| stage | W4M tools | emits |40| --- | --- | --- |41| `import_raw` | `MSnbase readMSData`, `Mz(X)ML Shaper` | rdata.msnbase.raw |42| `parameter_optimisation` | `IPO for xcmsSet`, `IPO for group and retcor` | ipo-parameters |43| `peak_detection` | `xcms findChromPeaks`, `xcms refineChromPeaks`, `xcms findChromPeaks Merger` | rdata.xcms.findchrompeaks |44| `correspondence` | `xcms groupChromPeaks` | rdata.xcms.group |45| `rt_alignment` | `xcms adjustRtime`, `xcms groupChromPeaks` | rdata.xcms.group |46| `gap_filling` | `xcms fillChromPeaks` | rdata.xcms.fillpeaks |47| `annotation` | `CAMERA.annotate`, `CAMERA.groupFWHM`, `CAMERA.groupCorr`, `CAMERA.findIsotopes`, `CAMERA.findAdducts`, `CAMERA.combinexsAnnos` | rdata.camera, three-table |48| `table_conformance` | `Check Format`, `Table Merge`, `W4M concatenate`, `xcms get a sampleMetadata file` | three-table |49| `normalisation` | `Normalization`, `Parsec batch correction`, `Batch Dispersion`, `Intensity Check` | three-table |50| `statistics` | `Biosigner`, `mixmodel`, `Metabolites Correlation Analysis`, `Heatmap` | statistics, pdf |5152## Stages5354### `import_raw`5556Raw open-format files -> an MSnbase object the xcms chain accepts.5758- **after:** —59- **in → out:** mzML, mzXML, netCDF → rdata.msnbase.raw60- **W4M tools:** `MSnbase readMSData`, `Mz(X)ML Shaper`61- **EDAM:** `operation_3215`62- **leaf skills:**63 - `xcms-data-import-preprocessing` *(primary)*64 - `mzml-file-import-xcms`65 - `mass-spectrometry-data-format-import`66- **grounding:** 2 source DOI(s)6768### `parameter_optimisation`6970Design-of-experiments search for peak-picking, grouping and alignment parameters.7172- **after:** —73- **in → out:** mzML → ipo-parameters74- **W4M tools:** `IPO for xcmsSet`, `IPO for group and retcor`75- **EDAM:** `operation_3435`76- **leaf skills:**77 - `parameter-tuning-metabolomics` *(primary)*78 - `peak-picking-parameter-configuration`79 - `chromatographic-alignment-parameter-selection`80- **grounding:** 3 source DOI(s)8182### `peak_detection`8384Detect chromatographic peaks per sample and merge the per-sample objects.8586- **after:** `import_raw`, `parameter_optimisation`87- **in → out:** rdata.msnbase.raw → rdata.xcms.findchrompeaks88- **W4M tools:** `xcms findChromPeaks`, `xcms refineChromPeaks`, `xcms findChromPeaks Merger`89- **EDAM:** `operation_3441`90- **leaf skills:**91 - `lc-ms-profile-data-segmentation` *(primary)*92 - `chromatographic-peak-detection-wavelet`93 - `chromatographic-profile-quality-assessment`94- **grounding:** 3 source DOI(s)9596### `correspondence`9798Group peaks across samples into features.99100- **after:** `peak_detection`101- **in → out:** rdata.xcms.findchrompeaks → rdata.xcms.group102- **W4M tools:** `xcms groupChromPeaks`103- **EDAM:** `operation_3632`104- **leaf skills:**105 - `lc-ms-feature-grouping-by-retention-time` *(primary)*106 - `mass-chromatogram-alignment`107- **grounding:** 1 source DOI(s)108109### `rt_alignment`110111Correct retention-time drift, then repeat correspondence against the corrected times.112113- **after:** `correspondence`114- **in → out:** rdata.xcms.group → rdata.xcms.group115- **W4M tools:** `xcms adjustRtime`, `xcms groupChromPeaks`116- **EDAM:** `operation_3632`117- **leaf skills:**118 - `retention-time-correction-and-alignment` *(primary)*119 - `retention-time-alignment-correction`120- **grounding:** 2 source DOI(s)121122### `gap_filling`123124Integrate the areas of peaks missing from the feature matrix.125126- **after:** `rt_alignment`127- **in → out:** rdata.xcms.group → rdata.xcms.fillpeaks128- **W4M tools:** `xcms fillChromPeaks`129- **EDAM:** `operation_3214`130- **leaf skills:**131 - `missing-peak-imputation-fillpeaks` *(primary)*132- **grounding:** 1 source DOI(s)133134### `annotation`135136Group features into pseudospectra and annotate isotopes and adducts.137138- **after:** `gap_filling`139- **in → out:** rdata.xcms.fillpeaks → rdata.camera, three-table140- **W4M tools:** `CAMERA.annotate`, `CAMERA.groupFWHM`, `CAMERA.groupCorr`, `CAMERA.findIsotopes`, `CAMERA.findAdducts`, `CAMERA.combinexsAnnos`141- **EDAM:** `operation_3432`142- **leaf skills:**143 - `spectral-feature-clustering-by-intensity-correlation` *(primary)*144 - `metabolite-mass-to-charge-ratio-matching`145 - `adduct-fragment-table-construction`146- **grounding:** 1 source DOI(s)147148### `table_conformance`149150Make the dataMatrix, sampleMetadata and variableMetadata agree before any statistics.151152- **after:** `annotation`153- **in → out:** three-table → three-table154- **W4M tools:** `Check Format`, `Table Merge`, `W4M concatenate`, `xcms get a sampleMetadata file`155- **EDAM:** `operation_3891`156- **leaf skills:**157 - `feature-metadata-parsing-and-integration` *(primary)*158 - `metadata-structure-checking`159 - `cross-table-metadata-harmonization`160- **grounding:** 3 source DOI(s)161162### `normalisation`163164Normalise intensities and correct batch and drift effects using the pooled QC samples.165166- **after:** `table_conformance`167- **in → out:** three-table → three-table168- **W4M tools:** `Normalization`, `Parsec batch correction`, `Batch Dispersion`, `Intensity Check`169- **EDAM:** `operation_3434`170- **leaf skills:**171 - `batch-effect-correction-qc-reference` *(primary)*172 - `batch-effect-correction-and-adjustment`173 - `compound-reliability-rsd-filtering`174- **grounding:** 3 source DOI(s)175176### `statistics`177178Univariate, multivariate and signature analysis on the corrected matrix.179180- **after:** `normalisation`181- **in → out:** three-table → statistics, pdf182- **W4M tools:** `Biosigner`, `mixmodel`, `Metabolites Correlation Analysis`, `Heatmap`183- **EDAM:** `operation_3695`184- **leaf skills:**185 - `pls-pls-da-classification-modeling` *(primary)*186 - `metabolomic-biomarker-pathway-association`187- **grounding:** 2 source DOI(s)188189## Grounding190191Every stage carries the DOIs and KB slugs of the leaves bound to it; ground a192stage with the collection's `/ground` recipe against those slugs.193194The pipeline *structure* is grounded differently from the leaves: it was read off195the tool wrappers in `workflow4metabolomics/tools-metabolomics` at `master` on1962026-08-21, not distilled from a paper. `provenance.structure_source` in197`workflow.yaml` records that.198199## Verification contract200201- Each stage's output datatype is the one the next stage declares as its input.202 A Galaxy invocation that type-checks has already verified most of this.203- The second correspondence pass ran after alignment; a workflow with one204 grouping step is missing it.205- The three tables agree on identifiers and order before `normalisation`. See206 `w4m-three-table-format-conformance`.207- `xcms process history` matches the exported workflow.208- Feature counts are reported after gap filling, not after correspondence; the209 two differ and only the first describes the matrix the statistics saw.210211## Coverage gaps212213The corpus does not cover this pipeline evenly, and the bindings say where:214215- **Parameter optimisation** — no leaf declares IPO. The stage is bound to216 generic parameter-tuning leaves, which describe the activity but not the tool.217- **Statistics** — no leaf declares Biosigner or the other W4M statistics218 wrappers. The bound leaves cover PLS-DA and biomarker association generically.219- **The platform** — no leaf declares Workflow4Metabolomics or Galaxy. The220 collection knows the methods this pipeline runs and not the platform that runs221 them.222223Of the 16 DOIs the wrappers cite, 2 are already in the collection's corpus. The224other 14 are candidates for corpus expansion, which would close the gaps above225at their source rather than by rebinding.226227## Provenance228229Structure from the tool wrappers; leaf bindings by lexical retrieval over230`skills_index.json` constrained to leaves that declare the relevant tool, then231checked by hand. `bound_by: index`. No ASB rerun; no per-paper workflow DAG232contributed structure, so `derived_from_workflows` is empty and no benchmark233ablation is required.