M z retention time correspondence mapping
Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder
npx -y skills add HolobiomicsLab/asb-skill-collections --skill m-z-retention-time-correspondence-mappingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when you have two peak-picked, conventionally aligned untargeted LC-MS metabolomics datasets (as metabData objects) acquired under different conditions or at different times, and you need to determine which features in dataset X correspond to which features in dataset Y so their sample.
The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.6 KB, as published. Nobody here has run it
m-z-retention-time-correspondence-mapping
Summary
Identify and validate overlapping features between two LC-MS metabolomics datasets by grouping features with similar m/z and retention time coordinates, then constructing a unified combined table with aligned feature pairs. This skill is essential for merging metabolomics measurements acquired under non-identical instrumental or temporal conditions.
When to use
You have two peak-picked, conventionally aligned untargeted LC-MS metabolomics datasets (as metabData objects) acquired under different conditions or at different times, and you need to determine which features in dataset X correspond to which features in dataset Y so their sample measurements can be concatenated into a single analysis table. This is particularly necessary when datasets were acquired with different instruments, ionization modes, or separation parameters but measure overlapping biological samples.
When NOT to use
- Input datasets are already merged or de-duplicated; use only when you have two independent, unmapped peak tables.
- Datasets were acquired from completely different sample types or biological matrices with no expectation of feature overlap.
- Raw MS data has not yet been peak-picked and aligned; this skill requires pre-processed metabData objects, not raw .mzML or .raw files.
Inputs
- metabData object (X dataset — first LC-MS run)
- metabData object (Y dataset — second LC-MS run)
- binGap parameter (numeric; m/z tolerance in Da, default ~0.0075)
Outputs
- metabCombiner object
- combinedTable (data.frame with 15 initial columns: idx, mzx, rtx, idy, mzy, rty, rtProj, score, rankx, ranky, plus sample and extra columns)
How to apply
Load both datasets as metabData objects into R. Construct a metabCombiner object using the metabCombiner() function, specifying the first dataset as the X dataset, the second as the Y dataset, and setting the binGap parameter (typically 0.0075 Da) to control the m/z tolerance window for initial feature grouping. The function performs m/z-based binning to group potential feature pairs, then accesses the combinedTable to retrieve the 15-column alignment structure containing feature indices, m/z values, retention times, and placeholder columns (rtProj, score, rankx, ranky) for downstream scoring and validation. Verify that the combined table contains the expected input columns from both datasets and that feature pair counts are reasonable given the input dataset sizes.
Related tools
- metabCombiner (R package that implements m/z grouping, feature pair alignment detection, and combined table construction via the metabCombiner() function and combinedTable accessor) — https://github.com/hhabra/metabCombiner
- mgcv (Provides generalized additive model (gam) functions used internally by metabCombiner for retention time mapping spline fitting)
Examples
comb <- metabCombiner(p30, p20, binGap = 0.0075); head(combinedTable(comb)[, 1:15])
Evaluation signals
- The combinedTable contains exactly 15 initial (non-sample, non-extra) columns with correct names: idx, mzx, rtx, idy, mzy, rty, rtProj, score, rankx, ranky, and metadata columns.
- Feature pair count in the combined table is non-zero and reasonable (e.g., typically 50–80% of smaller input dataset size for well-overlapping plasma samples).
- m/z values for paired features (mzx and mzy) fall within the binGap tolerance window; no m/z differences exceed the specified binGap threshold.
- All placeholder scoring columns (rtProj, score, rankx, ranky) are initialized but contain NA or zero values (to be filled in downstream steps).
- Sample and extra column counts match the union of sample columns from both input datasets, confirming no data loss in the grouping step.
Limitations
- The initial m/z binning is a heuristic grouping step; not all feature pairs in the combined table represent true biological matches—downstream anchor selection and similarity scoring are required to validate alignments.
- Retention time correspondence is unknown at this stage; rtProj and score columns are empty until anchor-based RT mapping and pairwise scoring are performed.
- The skill assumes both datasets have been pre-filtered for quality (e.g., missingness, duplicates, RT range) before metabCombiner object construction; it does not perform data cleaning.
- The binGap parameter is user-configurable and critical; too large a value will cause spurious feature grouping, and too small a value may miss true alignments due to instrumental m/z drift.
Evidence
- [readme] metabCombiner takes peak-picked and conventionally aligned untargeted LC-MS datasets and determines the overlapping <mass-to-charge (m/z), retention time (rt)> features: "takes peak-picked and conventionally aligned untargeted LC-MS datasets and determines the overlapping <mass-to-charge (m/z), retention time (rt)> features"
- [other] The combined table contains 15 initial columns consisting of input from the x dataset (idx, mzx, rtx, ...), input from the y dataset (idy, mzy, rty, ...), and placeholder columns (rtProj, score, rankx, ranky) for downstream computations: "The combined table contains 15 initial columns consisting of input from the x dataset (idx, mzx, rtx, ...), input from the y dataset (idy, mzy, rty, ...), and placeholder columns (rtProj, score,"
- [intro] Feature alignment between datasets acquired under non-identical conditions presents numerous opportunities in untargeted metabolomics. The key challenge is achieving a correspondence between: "Feature alignment between datasets acquired under non-identical conditions presents numerous opportunities in untargeted metabolomics"
- [other] Construct a metabCombiner object using the metabCombiner() function with p30 as the X dataset, p20 as the Y dataset, and binGap parameter set to 0.0075.: "Construct a metabCombiner object using the metabCombiner() function with p30 as the X dataset, p20 as the Y dataset, and binGap parameter set to 0.0075"
- [intro] metabCombiner determines a list possible feature pair alignments (FPAs) and determines their validity through a pairwise similarity score: "metabCombiner determines a list possible feature pair alignments (FPAs) and determines their validity through a pairwise similarity score"