agentsclimarketplace

Spectral library msp serialization

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/spectral-library-msp-serialization

Use when after generating in-memory lipid spectra (with m/z, intensity, and metadata such as lipid class, fatty acid composition, and adduct type) when you need to export those spectra as a reusable MSP-format spectral library for downstream identification tasks in Excalibur, Skyline, or NIST MS.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill spectral-library-msp-serialization

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

6.2 KB, 987 tokens by cl100k_base, as published. Nobody here has run it

spectral-library-msp-serialization

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

Summary

Serializes in-memory generated lipid mass spectra to MSP (NIST MS Search) format for export as searchable spectral libraries. This skill bridges synthetic spectrum generation to standard MS library formats required by database search and DDA workflows.

When to use

Apply this skill after generating in-memory lipid spectra (with m/z, intensity, and metadata such as lipid class, fatty acid composition, and adduct type) when you need to export those spectra as a reusable MSP-format spectral library for downstream identification tasks in Excalibur, Skyline, or NIST MS Search tools.

When NOT to use

  • Input spectra are empirical (not computationally generated) — use direct MS instrument export instead
  • Target output format is CSV precursor lists or Skyline transition lists — select '.CSV' extension for those export modes instead
  • Spectra have not been generated with respect to lipid class, fatty acid composition, and adducts — generate or annotate those metadata first

Inputs

  • In-memory spectra data structure (generated lipid mass spectra with m/z, intensity pairs)
  • Spectrum metadata (lipid class, fatty acid composition, adduct type, precursor m/z)
  • Fragmentation pattern annotations

Outputs

  • .MSP file (NIST MS Search format spectral library)
  • Validated spectral library with NAME, PRECURSORMZ, and SPECTRUM fields per record

How to apply

Load the in-memory spectra data structure containing generated lipid mass spectra with their corresponding m/z, intensity, and metadata fields (lipid class, fatty acid composition, adduct type). For each spectrum record, serialize to MSP format by populating required fields (NAME, PRECURSORMZ, SPECTRUM with peak pairs) and optional metadata annotations following MSP standard conventions. Write the formatted spectral records sequentially to a file with '.MSP' extension, ensuring proper line breaks and field delimiters conform to MSP structural standards. Finally, validate the output file for structural integrity and completeness of all spectrum records to confirm compliance with MSP schema.

Related tools

  • LSG (Generates in-memory lipid mass spectra with respect to class, fatty acid composition, and adducts; provides MSP export functionality) — https://github.com/98104781/LSG/releases/tag/v1.3.0
  • Excalibur (Consumes exported MSP spectral libraries for DDA analysis via Orbitrap instrument control)

Evaluation signals

  • Output .MSP file parses without syntax errors and loads into NIST MS Search or Excalibur without validation warnings
  • All spectrum records contain mandatory fields: NAME, PRECURSORMZ, and SPECTRUM (peak pairs with m/z and intensity)
  • Peak pairs in SPECTRUM field are represented as space-separated 'mz intensity' pairs on a single line, with multiple pairs separated by appropriate delimiters per MSP standard
  • Metadata annotations (lipid class, fatty acid composition, adduct) are preserved in NAME or optional comment fields
  • File structure integrity: no truncated records, proper line breaks between spectrum blocks, and line count matches expected record count × lines-per-record

Limitations

  • MSP format export depends on correct in-memory spectrum generation; invalid fragmentation patterns or metadata will serialize but produce unusable library entries
  • The LSG program generates spectra based on fragmentation patterns from peer-reviewed studies; coverage may not include all lipid species or adduct combinations of interest
  • MSP format does not support all optional metadata fields; complex lipid annotations may need truncation or external supplementary documentation

Evidence

  • [other] Load the in-memory spectra data structure and serialize to MSP format: "Load the in-memory spectra data structure containing generated lipid mass spectra with their corresponding m/z, intensity, and metadata (lipid class, fatty acid composition, adduct type). 2."
  • [other] Write formatted records to .MSP extension file with validation: "Write the formatted spectral records sequentially to a file with '.MSP' extension, ensuring proper line breaks and field delimiters conform to MSP standards. 4. Validate the output file for"
  • [readme] MSP export as alternative to CSV formats: "Spectral libraries can be exported with the file extension '.MSP' selected. Otherwise, an Excalibur compatible precursor list (for DDA analysis via orbitrap) or Skylike compatible transition list may"
  • [readme] Lipids generated with respect to class, fatty acid composition, and adducts: "Lipids are generated with respect to class and fatty acid composition, spectra are then generated with respect to their adducts."

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.