agentsclimarketplace

Peak table harmonization

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/peak-table-harmonization

Use when when you have extracted peak tables from multiple independent LC/HRMS analysis batches (each with retention time and m/z values) and need to align peaks across batches to create a unified feature matrix for downstream statistical analysis.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill peak-table-harmonization

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 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 file declares

Copied from the file, not written here

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

8.6 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it

peak-table-harmonization

License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->

Summary

Align and harmonize peak tables across multiple LC/HRMS batches by applying retention time correction to resolve batch-induced shifts in chromatographic retention times while preserving peak identity across samples. This skill ensures that chemically identical compounds with the same m/z and elution profile are assigned consistent retention times across all batches in large-scale population studies.

When to use

When you have extracted peak tables from multiple independent LC/HRMS analysis batches (each with retention time and m/z values) and need to align peaks across batches to create a unified feature matrix for downstream statistical analysis. Specifically apply this skill if: (1) you observe systematic retention time drift or batch-to-batch variation in peak elution times for the same compounds, (2) your study includes n > 500 samples across multiple instrumental runs or days, or (3) you are generating a single consensus peak alignment table from individually processed peaklists in separate mzXML/mzML/netCDF files.

When NOT to use

  • Input data is already a single batch or all samples were collected in a single instrumental run (no batch effect correction needed).
  • Retention time variation is non-systematic or instrument-specific and cannot be modeled with global endogenous reference markers.
  • Peak tables have already been aligned by another tool (e.g., xcms or MZmine 2); applying a second harmonization may introduce conflicting coordinate systems.

Inputs

  • Individual batch peaklists with retention time (RT) and mass-to-charge (m/z) values in Rdata or CSV format
  • Multiple LC/HRMS data files (mzXML, mzML, or netCDF format) from separate batches or instrumental runs
  • IPA parameter spreadsheet specifying input/output directories and retention time correction settings

Outputs

  • Harmonized peak alignment table with corrected retention times and unified m/z-RT coordinates
  • Gap-filled peak height matrix aligned across all samples
  • Batch-level retention time correction metadata or transformation functions
  • Pairwise correlation lists for aligned peaks (to detect recurring adducts and fragment ions)

How to apply

Load extracted peak lists from each batch into IDSL.IPA with their raw retention time and m/z coordinates. Use endogenous reference markers (stable, consistently detected compounds across all batches) to estimate the retention time correction function for each batch relative to a reference batch or global alignment frame. Apply the retention time correction algorithm to shift all peaks in non-reference batches so that peaks with identical m/z and similar RT elution profiles align to a common retention time coordinate. Generate a corrected peak alignment table where each unique (m/z, corrected-RT) pair is assigned a single consensus row, with peak heights gap-filled across all samples. Evaluate alignment success by checking that isotopologue pairs, adducts, and fragments maintain expected mass differences and co-elution patterns across the harmonized table.

Related tools

  • IDSL.IPA (Implements the full suite of retention time correction, peak alignment, and harmonization algorithms; outputs corrected peak alignment tables and gap-filled matrices.) — https://github.com/idslme/IDSL.IPA
  • R (Execution environment for IDSL.IPA; required to run the IPA_workflow function.)
  • IDSL.UFA (Integrates with harmonized peak tables for downstream molecular formula annotation.) — https://github.com/idslme/IDSL.UFA
  • IDSL.CSA (Integrates with harmonized and annotated peak tables to cluster recurring ions and generate composite spectra.) — https://github.com/idslme/IDSL.CSA

Examples

library(IDSL.IPA)
IPA_workflow("path/to/IPA_parameters.xlsx")

Evaluation signals

  • Peak alignment success: Verify that isotopologue pairs (12C/13C) and known adducts maintain expected mass differences (e.g., ±1.003 Da for 13C, ±18.01 Da for [M+NH4]+) across all harmonized rows.
  • Retention time consistency: Check that peaks assigned the same (m/z, corrected-RT) coordinates in the alignment table have inter-batch CV in corrected RT < 5% (or per-batch SD < 1 scan width).
  • Gap-filling validation: Confirm that the gap-filled peak height matrix has no structural NaNs or inconsistent row/column dimensions; compare gap-filled vs. observed peak counts to verify imputation occurred.
  • Batch effect removal: Plot corrected RT vs. raw RT by batch; corrected RTs should cluster tightly around the reference coordinate for peaks detected in multiple batches, while raw RTs show systematic drift.
  • Annotation fidelity: Verify that pairwise correlation lists for aligned peaks show expected co-elution patterns (e.g., adducts and in-source fragments of the same compound should have Pearson r > 0.7 in peak height correlation).

Limitations

  • Retention time correction relies on identification of stable endogenous reference markers across all batches; if few markers are detected or markers are unstable, correction may be inaccurate or fail.
  • Systematic non-linear retention time drift (e.g., gradient time non-uniformity) may not be fully captured by a global correction function, leading to residual misalignment in extreme RT regions.
  • Peak harmonization assumes that the same compound has identical m/z and similar RT across batches; compounds with significant post-acquisition mass drift or unexpected RT shifts (e.g., due to column degradation) may not align correctly.
  • Large population-scale studies (n > 500) may produce alignment ambiguities if multiple peaks with similar m/z and RT exist; filtering by peak quality metrics (S/N, peak width, symmetry) is recommended upstream.

Evidence

  • [other] retention time correction algorithm across batches to align peaks with similar m/z and RT profiles: "Apply retention time correction algorithm across batches to align peaks with similar m/z and RT profiles."
  • [other] IDSL.IPA includes retention time correction as one of its algorithmic components: "IDSL.IPA includes retention time correction as one of its algorithmic components in a suite covering EIC candidate generation, peak detection, peak property evaluation, recursive mass correction, and"
  • [readme] Retention time correction using endogenous reference markers for multi-batch large scale studies: "Retention time correction using endogenous reference markers for multi-batch large scale studies"
  • [readme] peak alignment tables in the peak_alignment directory: "Peak alignment tables in the "peak_alignment" directory."
  • [readme] generates comprehensive and high-quality datasets from untargeted analysis of organic small molecules for population-size studies: "IDSL.IPA generates comprehensive and high-quality datasets from untargeted analysis of organic small molecules for population-size studies."
  • [readme] Generating pairwise correlations list for aligned peak height and its gap-filled tables: "Generating pairwise correlations list for aligned peak height and its gap-filled tables to detect potential recurring adducts, in-source products and fragment peaks"

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.