agentsclimarketplace

Mass spectrometry data serialization

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/mass-spectrometry-data-serialization

Use when after RAMClustR clustering and molecular weight inference via do.findmain, when you need to export deconvoluted cluster spectra for import into external annotation tools (MSFinder or Sirius).From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill mass-spectrometry-data-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.7 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

mass-spectrometry-data-serialization

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

Summary

Convert clustered mass spectrometry spectra into standardized file formats (.mat for MSFinder, .ms for Sirius) to enable downstream structural annotation and compound identification in specialized metabolomics software.

When to use

After RAMClustR clustering and molecular weight inference via do.findmain, when you need to export deconvoluted cluster spectra for import into external annotation tools (MSFinder or Sirius). Trigger: you have a RAMClustR object (RC) with inferred molecular weights and cluster assignments, and you want to perform spectral matching or structure prediction outside RAMClustR.

When NOT to use

  • Input RAMClustR object has not yet completed do.findmain molecular weight inference — serialization requires inferred m/z values.
  • You plan to perform all structural annotation within RAMClustR or R environment — external format export is unnecessary if annotation tools are already integrated.
  • Output files are intended for human-readable inspection rather than software import — MSP or text formats may be more appropriate.

Inputs

  • RAMClustR clustered object (RC) with completed do.findmain molecular weight inference
  • Inferred molecular weights and feature-to-cluster assignments
  • Spectral data (m/z, intensity pairs) for each feature or cluster

Outputs

  • .mat files (MSFinder-compatible spectra) in 'mat' subdirectory
  • .ms files (Sirius-compatible spectra) in 'ms' subdirectory
  • Metadata annotations (retention time, molecular weight) embedded in output files

How to apply

The do.findmain function automatically creates two subdirectories ('mat' and 'ms') within the existing 'spectrum' directory after inferring molecular weights. For each cluster, the function extracts m/z–intensity pairs and metadata (retention time, molecular weight, cluster assignment), then serializes spectral data into MSFinder-compatible .mat format (written to 'mat' subdirectory) and Sirius-compatible .ms format (written to 'ms' subdirectory). The conversion preserves all feature spectral information without data loss. Verify output by confirming that both subdirectories exist, contain one file per cluster, and that cluster counts match between formats.

Related tools

  • RAMClustR (Generates clustered spectra object and infers molecular weights via do.findmain; controls serialization to .mat and .ms formats) — https://github.com/cbroeckl/RAMClustR
  • MSFinder (Downstream tool that imports .mat format spectra for spectral matching and structure prediction)
  • Sirius (Downstream tool that imports .ms format spectra for CSI:FingerID structure elucidation)
  • InterpretMSSpectrum (CRAN package from which do.findmain function was adapted; provides scoring methodology for molecular weight inference)

Examples

RC <- do.findmain(RC, mode = "positive", mzabs.error = 0.02, ppm.error = 10)

Evaluation signals

  • Two subdirectories ('mat' and 'ms') are created within the 'spectrum' directory after do.findmain execution.
  • File count in 'mat' subdirectory equals file count in 'ms' subdirectory, matching the number of clusters in the RAMClustR object.
  • .mat files are readable by MSFinder and .ms files by Sirius with no import errors or format corruption.
  • Spectral data (m/z–intensity pairs, retention time, molecular weight) are preserved in both output formats with no loss of precision or metadata.
  • Cluster identifiers and metadata in serialized files match those in the parent RAMClustR object (RC$ann, RC$SpecAbund).

Limitations

  • Serialization requires prior completion of do.findmain; spectra without inferred molecular weights cannot be exported.
  • File format compatibility depends on MSFinder and Sirius version specifications — format schemas may change without warning or changelog documentation.
  • No built-in validation or quality metrics for exported spectra — users must verify that spectra conform to downstream software expectations post-export.

Evidence

  • [other] export_structure: "The do.findmain function creates two new subdirectories ('mat' and 'ms') within the existing 'spectrum' directory. The 'mat' subdirectory contains spectra formatted as .mat files for import into"
  • [other] input_requirement: "Load the RAMClustR-clustered object (RC) containing inferred molecular weights and feature groupings from a prior do.findmain call."
  • [other] serialization_process: "Extract spectral data (m/z, intensity pairs) and metadata (retention time, molecular weight, cluster assignment) for each feature or feature cluster."
  • [other] verification_step: "Verify that all clusters are represented in both output formats and no data loss occurred during conversion."
  • [readme] readme_usage: "ramclustObj <- do.findmain(ramclustObj = ramclustObj)

Investigate the deconvoluted features in the spectra folder in MSP format"

  • [intro] format_compatibility: "The 'mat' contains spectra in .mat format suitable for import into MSFinder software"

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.