agentsclimarketplace

Mass spectrometry peak validation

Skill HolobiomicsLab/asb-skill-collections/packs/metabolomics/ms-imaging/skills/mass-spectrometry-peak-validation

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 mass-spectrometry-peak-validation

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 after peak alignment across all spectra in an MSImagingExperiment using peakAlign(), when you need to reduce the feature set to high-confidence peaks by removing spurious or low-frequency detections.

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

5.9 KB, 906 tokens by cl100k_base, as published. Nobody here has run it

mass-spectrometry-peak-validation

Summary

Validate and filter aligned mass spectrometry imaging peaks by applying frequency thresholds to retain only peaks present across a sufficient proportion of pixels, reducing noise and ensuring statistical robustness of the feature set for downstream analysis.

When to use

After peak alignment across all spectra in an MSImagingExperiment using peakAlign(), when you need to reduce the feature set to high-confidence peaks by removing spurious or low-frequency detections. Apply this skill when the aligned peak list contains many peaks with variable occurrence rates and you need to establish a minimum presence threshold (e.g., peaks appearing in >10% of pixels) before statistical or clustering analysis.

When NOT to use

  • Input peaks have not yet been aligned across spectra using peakAlign()
  • Peak frequency or occurrence metadata is unavailable in the MSImagingExperiment
  • You require peaks at any detection frequency, including rare/single-pixel peaks for exploratory analysis

Inputs

  • MSImagingExperiment object with peakAlign() already applied
  • featureData containing aligned peak m/z values and detection frequencies

Outputs

  • MSImagingExperiment object with filtered featureData
  • Subset of peaks meeting the frequency threshold

How to apply

Load the MSImagingExperiment object containing peaks aligned across the imaging dataset via peakAlign(). Apply the subsetFeatures() function with a frequency threshold parameter (e.g., frequency > 0.1) to retain only peaks detected in more than the specified fraction of pixels. The resulting MSImagingExperiment featureData will contain a filtered set of high-confidence peaks. Verify the output by inspecting the featureData to confirm the expected number of peaks remain—this reduces false positives and ensures downstream statistical methods operate on reproducible, robust features across the spatial domain.

Related tools

  • Cardinal (provides peakAlign(), subsetFeatures(), and MSImagingExperiment data structure for peak filtering workflow) — github.com/kuwisdelu/Cardinal
  • Cardinal 3.6 (major update with redesigned class hierarchy and updated MSImagingExperiment class supporting out-of-memory datasets) — github.com/kuwisdelu/Cardinal
  • R (execution environment for Cardinal library and subsetFeatures() function calls)

Examples

mse_filtered <- subsetFeatures(mse_aligned, features = which(rowData(mse_aligned)$frequency > 0.1)); nrow(mse_filtered)

Evaluation signals

  • The resulting MSImagingExperiment featureData contains exactly the expected number of peaks matching the frequency threshold (e.g., 37 peaks for frequency > 0.1 in the reference task)
  • All peaks in the filtered featureData have occurrence frequencies ≥ the specified threshold across the imaging pixel set
  • No peaks below the threshold remain in the output featureData
  • The structure and dimensions of the MSImagingExperiment are preserved, with only the feature subset reduced
  • Peaks can be traced back to their original aligned m/z values without data corruption or loss of spatial metadata

Limitations

  • Frequency threshold choice is arbitrary and dataset-dependent; no universal cutoff recommended in the article
  • The skill assumes peak alignment has already been performed; misaligned peaks will propagate biased frequencies
  • Very stringent frequency thresholds may remove biologically relevant but spatially rare peaks from heterogeneous tissues
  • Peak frequency alone does not account for intensity, signal-to-noise, or spatial distribution patterns

Evidence

  • [other] After filtering to peaks with frequencies > 0.1, the resulting MSImagingExperiment contains exactly 37 peaks in featureData.: "After filtering to peaks with frequencies > 0.1, the resulting MSImagingExperiment contains exactly 37 peaks in featureData."
  • [other] Subset features using subsetFeatures() with a frequency threshold of > 0.1 to retain only peaks present in >10% of pixels.: "Subset features using subsetFeatures() with a frequency threshold of > 0.1 to retain only peaks present in >10% of pixels."
  • [intro] Updated MSImagingExperiment class with a new counterpart MSImagingArrays class for better representing raw spectra: "Updated MSImagingExperiment class with a new counterpart MSImagingArrays class for better representing raw spectra"
  • [other] Apply peakAlign() to align detected peaks across all spectra in the imaging dataset.: "Apply peakAlign() to align detected peaks across all spectra in the imaging dataset."

What ships with it

Read from the repository

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

Keep looking

Skills are one crate of 327,132. 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.