agentsclimarketplace

Peak detection cwt optimization

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/peak-detection-cwt-optimization

Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill peak-detection-cwt-optimization

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

  • 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 when you have a pre-aligned GCIMSDataset and need to systematically identify and annotate chromatographic peaks across multiple samples.

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, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

peak-detection-cwt-optimization

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

Summary

Optimize Continuous Wavelet Transform (CWT) parameters and peak detection settings to accurately identify peaks across Gas Chromatography–Ion Mobility Spectrometry (GCIMS) samples. This skill determines noise thresholds and algorithmic parameters that maximize peak detection sensitivity while minimizing false positives in both drift time and retention time dimensions.

When to use

When you have a pre-aligned GCIMSDataset and need to systematically identify and annotate chromatographic peaks across multiple samples. Use this skill after alignment has corrected for retention time and drift time misalignment caused by pressure/temperature fluctuations or column degradation, and before peak clustering or downstream feature extraction.

When NOT to use

  • Input data is unaligned in retention time or drift time; alignment must precede peak detection.
  • Peak detection has already been performed on the same dataset; re-running risks duplicating or contradicting previous annotations.
  • The dataset contains only raw, unsmoothed GCIMS matrices; apply Savitzky–Golay filtering and decimation before peak detection to improve signal-to-noise ratio.

Inputs

  • pre-aligned GCIMSDataset object (in-memory R object from library(GCIMS))
  • optimized noise_level parameter (numeric, determined from single-sample tuning)
  • aligned retention time and drift time dimensions (post-alignment ranges, typically 0–1100 s and 5–16 ms respectively)

Outputs

  • peak_list table (per-sample tabular output with retention time, drift time, and intensity annotations)
  • CWT parameter configuration (reproducible settings: exclude0scaleAmpThresh, extension factors, RIP exclusion flag, IOU threshold)

How to apply

Begin by loading the aligned GCIMSDataset in R using library(GCIMS). Apply findPeaks with CWT algorithm on a single representative sample to optimize the noise_level parameter empirically, observing the trade-off between detection sensitivity and noise suppression. Once noise_level is tuned, execute findPeaks across all samples using consistent CWT parameters: exclude0scaleAmpThresh=TRUE for both drift time and retention time dimensions, extension factors of 0, RIP exclusion enabled (exclude_rip=TRUE to suppress Reactant Ion Peak artifacts), and an Intersection-over-Union overlap threshold of 0.2 to avoid redundant peak assignments. The function generates a per-sample peak_list table containing retention time, drift time, and intensity annotations for each detected peak.

Related tools

  • GCIMS (R package providing findPeaks function with CWT algorithm, dataset alignment, and peak annotation infrastructure) — https://github.com/sipss/GCIMS
  • R (Host language for GCIMS library and peak detection workflow execution)

Examples

findPeaks(dataset, noise_level = 0.05, exclude0scaleAmpThresh = TRUE, extension = 0, exclude_rip = TRUE, iou_threshold = 0.2)

Evaluation signals

  • peak_list table is non-empty and contains valid retention time (0–1100 s range), drift time (5–16 ms range), and positive intensity values for all samples.
  • Reproducibility check: re-running findPeaks with identical noise_level and CWT parameters on the same sample produces identical peak_list output.
  • RIP exclusion is effective: Reactant Ion Peak artifacts (typically at characteristic drift time values near 0 ms) are absent from the peak_list when exclude_rip=TRUE; peaks reappear if flag is set to FALSE.
  • IOU overlap threshold (0.2) prevents peak redundancy: no two peaks in the same sample have Intersection-over-Union > 0.2 in the (retention time, drift time) feature space.
  • Parameter consistency across samples: noise_level, exclude0scaleAmpThresh, extension factors, and IOU threshold are uniform across all samples in the dataset.

Limitations

  • Peak detection accuracy depends critically on prior alignment quality; misalignments in retention or drift time propagate into false negatives or shifted peak annotations.
  • The noise_level parameter requires manual empirical tuning on representative samples; no automatic parameter optimization algorithm is documented in the article.
  • CWT parameters (exclude0scaleAmpThresh, extension factors, IOU threshold) are fixed in the article; their sensitivity to different sample classes, ionization conditions, or column chemistries is not explored.
  • Reactant Ion Peak exclusion (exclude_rip=TRUE) assumes RIP occurs at known drift time values; atypical RIP behavior or shifted RIP location due to instrumental drift may not be fully suppressed.

Evidence

  • [other] Peak detection in the aligned GCIMS dataset is performed using findPeaks with CWT parameters including exclude0scaleAmpThresh=TRUE for both drift time and retention time dimensions, extension factors of 0, RIP exclusion enabled, and an IOU overlap threshold of 0.2: "Peak detection in the aligned GCIMS dataset is performed using findPeaks with CWT parameters including exclude0scaleAmpThresh=TRUE for both drift time and retention time dimensions, extension factors"
  • [other] Apply the findPeaks function with CWT algorithm and documented noise_level parameter optimization on the first sample to determine optimal settings: "Apply the findPeaks function with CWT algorithm and documented noise_level parameter optimization on the first sample to determine optimal settings"
  • [other] Execute findPeaks across all samples in the aligned dataset using the optimized CWT parameters and exclude_rip = TRUE to suppress Reactant Ion Peak detection: "Execute findPeaks across all samples in the aligned dataset using the optimized CWT parameters and exclude_rip = TRUE to suppress Reactant Ion Peak detection"
  • [other] Generate the per-sample peak_list table as structured output containing detected peaks with retention time, drift time, and intensity annotations: "Generate the per-sample peak_list table as structured output containing detected peaks with retention time, drift time, and intensity annotations"
  • [intro] Pressure and temperature fluctuations as well as degradation of the chromatographic column are some of the causes of misalignments in the data, both in retention and drift time: "Pressure and temperature fluctuations as well as degradation of the chromatographic column are some of the causes of misalignments in the data, both in retention and drift time"

What ships with it

Read from the repository

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

Keep looking

Skills are one crate of 328,083. 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.