Matchms msp summary

From XuShuwenn/RedAct · View interactive version

Matchms msp summary is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Use matchms to parse MSP files, count spectra, find the spectrum with the most peaks, and sum all peaks with robust fallbacks and exact formatting.

How to use this skill

Skill file

Matchms MSP Summary

Summarize an MSP (mass spectrometry) file using the matchms library: count the number of spectra, identify the spectrum with the highest peak count, and compute the total number of peaks across all spectra. Includes robust handling for empty files and parse failures, and guidance for producing exact, line-based output.

When to Use

Activate this skill when you need to:

Core Workflow

  1. Load the MSP file with matchms.
  1. Iterate once to compute aggregates and track the max.
  1. Count peaks safely per spectrum.
  1. Resolve spectrum name robustly.
  1. Handle empty or unparsable inputs.
  1. Write results in the exact format required by the task.

Example aggregation logic (pseudocode):

Verification

Common Pitfalls

Success Criteria

Optional Script Usage

A helper script is provided to perform the summary with robust defaults.

Example usage:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.