agentsclimarketplace

Mass spectrometry spectral preprocessing

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/mass-spectrometry-spectral-preprocessing

Use when you have raw mass spectrometry spectra from an unknown analyte or a synthetic compound library and need to feed them into PS2MS or similar deep learning classifiers for NPS detection.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill mass-spectrometry-spectral-preprocessing

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.3 KB, 982 tokens by cl100k_base, as published. Nobody here has run it

mass-spectrometry-spectral-preprocessing

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

Summary

Prepare raw mass spectrometry spectral data into the normalized format required by deep learning models for chemical classification and identity matching. This preprocessing step ensures spectral inputs conform to model expectations before inference or similarity scoring.

When to use

You have raw mass spectrometry spectra from an unknown analyte or a synthetic compound library and need to feed them into PS2MS or similar deep learning classifiers for NPS detection. Apply this skill when spectrum files require normalization and structural alignment to match the format specifications documented in the model repository.

When NOT to use

  • Spectra are already in the exact format and normalization expected by the PS2MS model checkpoint
  • Working only with chemical structure enumeration without needing mass spectrum prediction or matching
  • Input is a pre-computed feature embedding or fingerprint vector rather than raw or semi-raw spectral data

Inputs

  • raw mass spectrometry spectra (msp files or equivalent)
  • peak list with m/z and intensity values
  • optionally, chemical fingerprints from DeepEI or equivalent feature extraction

Outputs

  • normalized spectral matrix in model-expected format
  • preprocessed spectrum files ready for deep learning inference
  • spectrum metadata (compound ID, molecular weight, core structure reference)

How to apply

Load raw mass spectra (typically in msp or similar format) and apply the preprocessing pipeline specified by PS2MS: normalize intensity values according to model specifications, verify peak alignment, ensure the spectral matrix dimensions and data types match model input requirements, and optionally merge chemical fingerprints (e.g., from DeepEI) into the spectrum representation. The normalization and formatting must be consistent with the training data pipeline so that inference produces valid predictions. Validate that output spectra pass shape and range checks before submission to the deep learning model.

Related tools

Evaluation signals

  • Output spectral matrix dimensions and data types match the model input specification (shape, dtype, value range checks)
  • Normalized intensity values fall within expected range (e.g., [0, 1] or model-specified bounds) with no NaN or inf values
  • Spectral preprocessing produces deterministic, reproducible output when applied to the same raw input
  • Preprocessed spectra from the synthetic database and unknown analyte are in identical format, enabling valid similarity score computation in downstream matching step
  • Optional: Fingerprints successfully merge into msp files without format errors or data loss

Limitations

  • Preprocessing pipeline details are not exhaustively documented in the README; exact normalization constants and spectral matrix format must be inferred from repository code or supplementary materials
  • Requires rdkit and specific Python version (3.6.9+) and dependencies (g++-10, CMake 3.16.0+) to run full pipeline; compatibility with newer versions not guaranteed
  • If raw spectra deviate significantly from training data distribution (e.g., different ionization mode, instrument calibration), preprocessing alone may not correct for domain shift
  • No changelog documented; preprocessing logic may change between repository commits without notice

Evidence

  • [other] Prepare mass spectrometry spectral data in the format expected by the model (structure and normalization as specified in the repository): "Prepare mass spectrometry spectral data in the format expected by the model (structure and normalization as specified in the repository)."
  • [readme] The system also use the function of DeepEI to calculate the fingerprint of compounds of synthetic database. The system merges the fingerprint into the msp file.: "The system also use the function of DeepEI to calculate the fingerprint of compounds of synthetic database. The system merges the fingerprint into the msp file."
  • [readme] PS2MS calculates the integrated similarity scores(SMSF) between the unknown analyte and the derivatives from synthetic database: "PS2MS calculates the integrated similarity scores(SMSF) between the unknown analyte and the derivatives from synthetic database and yields a list of potential NPS identities for the analyte."

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.