agentsclimarketplace

Gaussian peakshape fitting evaluation

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/gaussian-peakshape-fitting-evaluation

Use when after peak detection on mass track segments using find_peaks, when you need to distinguish genuine chromatographic peaks from noise-induced false positives or irregular shapes.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill gaussian-peakshape-fitting-evaluation

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

7.3 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

Gaussian peakshape fitting and evaluation

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

Summary

Evaluates detected elution peaks against expected Gaussian shape to filter for chromatographic quality and reduce false positives. Applied after peak detection to retain only peaks with peakshape scores above a threshold (default > 0.5), ensuring detected features represent genuine metabolites rather than noise or artifacts.

When to use

After peak detection on mass track segments using find_peaks, when you need to distinguish genuine chromatographic peaks from noise-induced false positives or irregular shapes. Particularly important in high-intensity regions where prominence-based detection alone may capture non-Gaussian features or shoulders.

When NOT to use

  • Input is already a feature table or pre-filtered peak list — use this skill during initial peak detection, not post-hoc validation.
  • Data are from instruments with non-Gaussian elution profiles (e.g. gas chromatography with tailing or fronting, or highly irregular retention behavior) — Gaussian model assumptions may not hold.
  • Peak detection has not yet been performed or apex positions are not reliably identified — peakshape evaluation requires a well-localized apex.

Inputs

  • detected_peaks (list of peak objects with apex position, intensity window, m/z and retention time)
  • mass_track_segment (region of interest: intensity array subset after baseline/noise subtraction)
  • peakshape_threshold (numeric, default 0.5)
  • snr_threshold (numeric, default 2)

Outputs

  • filtered_peaks (peak objects passing peakshape and SNR criteria, with peakshape and SNR scores recorded)
  • peak_quality_metrics (table of peakshape, SNR, and apex position for each retained peak)

How to apply

For each detected peak, fit a Gaussian model to the intensity values in a window around the apex position and calculate a peakshape metric (e.g., ratio of observed peak area to fitted Gaussian area, or R² of fit). Retain peaks only if peakshape exceeds the threshold (default 0.5). This filtering is applied in conjunction with SNR thresholds (default SNR > 2) and validates that the apex position lies within the segment boundaries. The rationale is that metabolite peaks follow Gaussian elution profiles in LC; deviations suggest either co-eluting compounds, baseline artifacts, or instrumental noise rather than a single resolved feature.

Related tools

Examples

from asari.peaks import evaluate_gaussian_peak_on_intensity_list; peakshape = evaluate_gaussian_peak_on_intensity_list(intensity_window, apex_idx); retained = peak if peakshape > 0.5 and snr > 2 else None

Evaluation signals

  • Peakshape scores for retained peaks are >= 0.5 and SNR >= 2; rejected peaks are logged with their failure reason
  • Apex positions of retained peaks fall strictly within segment boundaries (no boundary violations)
  • Peakshape distribution (histogram or summary stats) is unimodal and concentrated in the 0.5–1.0 range, indicating consistent Gaussian fit quality
  • Comparison of rejected vs. retained peaks shows that rejected peaks have visibly irregular or multi-modal intensity profiles around the apex
  • Reproducibility check: same mass track and parameters re-processed yields identical peakshape scores and the same set of retained peaks

Limitations

  • Assumes Gaussian elution profile; real peaks may be slightly tailed or fronted, especially at high intensity or under non-ideal chromatographic conditions.
  • Peakshape threshold (default 0.5) is a heuristic; may require tuning for different instrument types, column chemistry, or metabolite classes.
  • Co-eluting peaks or shoulder peaks may pass Gaussian fitting if the fit window is too narrow; requires integration with retention time alignment and mass separation.
  • Very low-intensity peaks near noise floor may show artificially good peakshape due to stochastic noise that happens to fit a Gaussian; SNR threshold mitigates but does not eliminate this.
  • Computational cost scales with number of detected peaks and window size; large feature tables may benefit from vectorized evaluation.

Evidence

  • [other] Evaluate detected peaks for Gaussian peakshape, cSelectivity, and signal-to-noise ratio (SNR); retain peaks passing thresholds (default SNR >2, peakshape >0.5).: "Evaluate detected peaks for Gaussian peakshape, cSelectivity, and signal-to-noise ratio (SNR); retain peaks passing thresholds (default SNR >2, peakshape >0.5)."
  • [other] Validation: verify that detected peaks have apex positions within segment boundaries, SNR and peakshape values within reported thresholds, and prominence values consistent with local signal characteristics.: "Validation: verify that detected peaks have apex positions within segment boundaries, SNR and peakshape values within reported thresholds, and prominence values consistent with local signal"
  • [other] See peaks.evaluate_gaussian_peak_on_intensity_list: "See peaks.evaluate_gaussian_peak_on_intensity_list"

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.