mzwiki Mass spectrometry
knowledge commons by UniMZ
Guides & terminologyAll Guides
Guide 32 · Computation

Cross-run alignment and feature correspondence

Separate time-coordinate correction from matching, inspect ambiguous groups, and distinguish signal-based gap filling from identification and imputation.

A shared row is a correspondence claim

After single-run feature detection, each run has its own signal list. Building a matrix requires deciding which entries correspond across runs. That decision is additional analysis: a row containing three areas is claiming that those measurements represent comparable signal entities. A tidy rectangular table can hide a mistaken match.

Separate alignment, which puts retention times on a comparable coordinate system, from correspondence, which groups candidate signals across runs. xcms documents these as separate operations. [1] [2] Here “feature group” means a cross-run correspondence group, not the grouping of isotope or adduct signals within one run.

Estimate a mapping, not a new measurement

Retention-time alignment estimates how one run's time coordinates relate to a reference. One family of methods uses well-supported shared landmarks; another compares broader chromatographic signal patterns. xcms provides examples of both. Some workflows need preliminary groups to estimate a correction, followed by regrouping; others can align before detecting peaks. [1] There is no universal command order independent of the chosen algorithm.

A reference run need not be chemically complete or error-free. Ask whether landmarks cover the time range and represent comparable signals. A mapping supported only near the middle has weak support at the edges. Keep original times and the fitted transformation so that a suspicious correction can be traced back to the acquired run.

Worked example: a constant shift is insufficient

Constructed teaching mapping: three trusted landmarks appear at [100, 300, 600] s in reference A and [110, 320, 630] s in run B. Their delays are 10, 20, and 30 s. Assume a piecewise-linear mapping between these landmark pairs, without claiming that three landmarks suffice for a real experiment.

For a B signal at 215 s, interpolation between B = 110 and 320 gives 100 + (215 − 110) × (300 − 100) / (320 − 110) = 200 s on A's axis. Subtracting a constant 10 s instead gives 205 s. The resulting 5 s discrepancy could change a later match decision.

Between the next pair, B = 475 s maps to 300 + (475 − 320) × 300 / 310 = 450 s. This coordinate correction does not change the previously measured abundance into a new concentration. If software also resamples traces or reintegrates them, document those separate operations and the time axis used for integration.

A tolerance window proposes candidates

Correspondence algorithms can use m/z and adjusted time, with additional evidence such as charge, isotope structure, mobility, or fragmentation when available. The xcms documentation illustrates density-based and proximity-based grouping, with explicit settings governing the result. [2] Being inside a window establishes compatibility under that rule; it does not establish uniqueness or chemical identity.

Hypothetical ambiguous match: run A has a signal at m/z 500.2000 and reference time 200 s. Run B has candidates at 500.2010/201 s and 500.2015/202 s. Relative to A, the m/z differences are approximately 2.00 and 3.00 ppm. Both pass invented limits of ±5 ppm and ±4 s. These limits are teaching choices, not validated recommendations.

A nearest-neighbor rule might choose the first candidate, but that ranking is not proof. Inspect whether B split one peak, whether two separate species elute nearby, and whether additional evidence discriminates them. Preserve ambiguity when it cannot be resolved. Increasing a window may reduce empty cells while introducing incorrect correspondences.

Inspect what a group actually contains

Check duplicate members from the same run, unusually broad time or m/z spreads, and groups assembled from different peak shapes. Also check signals that remain separate despite plausible correspondence. Algorithms may select one member, combine members, or leave conflicts; record the rule rather than letting an exported matrix silently decide.

Feature-presence rules influence which groups survive. Requiring detection in every sample can discard a genuine condition-specific signal. Conversely, a permissive rule can retain sporadic noise. Define the intended comparison and inspect controls before choosing a criterion. In xcms, one documented density-grouping criterion operates within at least one sample group, rather than necessarily across all samples. [2]

Revisit an empty cell using the raw signal

Gap filling can return to an expected m/z–time region in a run lacking a detected group member and extract an abundance. It differs from replacing a blank cell using only the other matrix values. xcms records filled results with a dedicated flag. [3]

Constructed example: a group has detected areas 100 and 120 in runs A and B, with no accepted detection in C. Re-extracting C's expected region yields area 12. That number comes from C's signal; substituting the mean 110 would instead use A and B. Neither operation independently establishes C's molecular identity. Background or an interfering signal can also produce a nonzero integral.

Review extraction bounds, mass consistency, trace shape, and blank behavior. Keep detected, gap-filled, unresolved, and unavailable states distinguishable. A region without usable signal need not become zero; xcms explicitly allows unfilled missing results. [3] More populated cells are not by themselves evidence of better measurement.

Evaluate the claims behind the matrix

Compare landmark residuals and representative traces before and after alignment. Where feasible, examine reliable landmarks not used to fit the mapping. Look for local failures hidden by a good average, implausible transformations, and results that change sharply under modest parameter changes. Evaluate matching separately from the appearance of the aligned plot.

Save each group's run-level membership, alternatives or conflicts, correction model, original and adjusted coordinates, and extraction flags. Keep chemical identification evidence separate from these signal associations; mzTab-M explicitly separates feature and identification-evidence records. [4] This makes a later correction auditable instead of rewriting the meaning of a row silently.

Check your understanding

Do identical adjusted retention times prove that two signals match?

No. The transformation aligns coordinates; multiple signals may remain compatible. Matching needs evidence and an explicit conflict rule.

Does filling C's empty cell with area 12 identify the compound?

No. It extracts signal from an expected region. Identification requires separate evidence, and the filled value still needs quality assessment.

Why not choose parameters that minimize missing cells?

Broad matching and extraction regions can admit wrong signals or background. Completeness must be assessed alongside correspondence and measurement quality.

References & further reading

  1. xcms. Alignment: retention time correction methods.

    Official developer documentation inspected 2026-10-07, showing version 4.11.4. Describes signal-pattern and peak-group alignment methods with different input dependencies. Teaching mappings are original arithmetic examples, not recommended landmark counts.

  2. xcms. Correspondence: group chromatographic peaks across samples.

    Official developer documentation inspected 2026-10-07, showing version 4.11.4. Separates correspondence from alignment and describes grouping criteria, including a detection fraction within at least one sample group. Used as an implementation example, not a universal feature definition.

  3. xcms. Gap filling: fillChromPeaks.

    Official developer documentation inspected 2026-10-07, showing version 4.11.4. Supports re-extraction from feature-informed m/z–time regions, is_filled flags, and remaining missing results where no signal exists. Does not establish new molecular identifications.

  4. HUPO-PSI and MSI. mzTab-M 2.0 metabolomics results specification.

    Official released format specification. Sections 5.2 and 5.4 distinguish samples/assays/runs and missing-data encoding; sections 6.3–6.5 distinguish molecule summaries, features, and identification evidence. A format declaration does not verify biological independence or determine the missing-data mechanism.

Help make this article clearer.Edit this article →Suggest a correction →