agentsclimarketplace

Mzml format generation

Skill HolobiomicsLab/asb-skill-collections/packs/metabolomics/lc-ms/skills/mzml-format-generation

Use when after completing a virtual LC-MS/MS acquisition simulation using ViMMS (e.g., after calling env.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill mzml-format-generation

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.8 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

mzml-format-generation

Summary

Convert simulated LC-MS/MS acquisition scans into mzML (mass spectrometry Markup Language) format for downstream analysis, archiving, and interoperability with metabolomics software. This skill bridges virtual mass spectrometry simulation with standard data formats used in untargeted metabolomics workflows.

When to use

After completing a virtual LC-MS/MS acquisition simulation using ViMMS (e.g., after calling env.run() on an Environment instance with a configured mass spectrometer, controller, and chemical mixture), when you need to export the raw scan data into a portable, standardized format that can be read by peak-picking tools (MZmine), spectral matching libraries (GNPS), or other downstream metabolomics software. Use this skill whenever simulation results must be archived or integrated into existing untargeted metabolomics pipelines.

When NOT to use

  • Input is already in mzML or another standard LC-MS format (NetCDF, mzXML) — convert between formats directly rather than re-simulating.
  • Simulation has not yet been executed or Environment.run() failed — no scans to serialize.
  • Analysis goal is purely in-memory statistical comparison of DDA vs. DIA strategies within ViMMS — file export is unnecessary overhead.

Inputs

  • Environment instance (ViMMS) containing completed LC-MS acquisition (MS1 and/or MS2 scans)
  • Scan data with retention time, m/z array, intensity array, MS level, and (if MS2) precursor m/z and fragmentation metadata

Outputs

  • mzML file (XML-based mass spectrometry data format)
  • Indexed mzML with scan-level metadata and data encodings (base64 or 32-bit/64-bit numeric precision)

How to apply

After the ViMMS simulation completes and populates the Environment with MS1 and/or MS2 scans, call the Environment.write_mzML() method to serialize all acquired scans, retention times, m/z values, intensities, and fragment ions into mzML XML format. The method abstracts the low-level details of retention time indexing, scan-level metadata (MS level, precursor m/z, collision energy), and mass accuracy representation. Verify that the output file is well-formed XML and that the scan count and m/z range match expectations from the input chemical mixture (e.g., if sampling from HMDB with min_mz=100, max_mz=1000, all precursor ions in mzML should fall within that range). The mzML file can then be directly ingested by MZmine peak-picking, GNPS spectral library matching, or other standard tools without further format conversion.

Related tools

  • ViMMS (Simulates LC-MS/MS acquisition and provides Environment.write_mzML() method to serialize scans into mzML format.) — https://github.com/glasgowcompbio/vimms
  • MZmine (Reads and processes mzML files for peak picking and ROI extraction using configured parameters (e.g., min_ms1_intensity threshold).)
  • GNPS (Accepts mzML files for spectral library matching and community spectral annotation.)

Examples

from vimms.Environment import Environment
env = Environment(mass_spectrometer, controller, min_rt=0, max_rt=1440)
env.run()
env.write_mzML('output_simulation.mzML')

Evaluation signals

  • Output file is well-formed XML and can be parsed by standard mzML validators (e.g., MS Data Tools).
  • Scan count in mzML matches the number of MS1 and MS2 scans generated during env.run().
  • All precursor m/z values in MS2 scans fall within the expected m/z range (e.g., 100–1000 for HMDB sampling).
  • Retention time values are monotonically increasing and match the configured rt range (e.g., min_rt=0, max_rt=1440).
  • mzML file successfully ingests into downstream tools (MZmine, GNPS) without format or encoding errors.

Limitations

  • mzML export captures only scan-level data; post-acquisition data processing (peak picking, feature alignment, annotation) must be performed downstream by external tools.
  • File size grows linearly with scan count and spectral resolution; high-resolution full-scan simulations over long retention times can produce large files.
  • mzML standard does not encode simulator-specific metadata (e.g., chemical mixture composition, controller strategy parameters); metadata must be tracked separately or stored in external documentation.
  • Simulated scans lack real instrumental noise profiles and calibration artifacts present in measured LC-MS/MS data; mzML output is idealized and suitable for method prototyping but not for method validation against real-world data.

Evidence

  • [other] Execute env.run() to simulate the LC-MS acquisition process. 7. Write the resulting scans to mzML format using Environment.write_mzML().: "Execute env.run() to simulate the LC-MS acquisition process. 7. Write the resulting scans to mzML format using Environment.write_mzML()."
  • [readme] ViMMS provides scan-level control simulation of the MS2 acquisition process in a virtual environment. You can generate new LC-MS/MS data based on empirical data or virtually replay a previous LC-MS/MS analysis using existing data, which allows for testing different fragmentation strategies. With ViMMS, you can evaluate diverse fragmentation strategies using real data, and extract the scan results as mzML files.: "With ViMMS, you can evaluate diverse fragmentation strategies using real data, and extract the scan results as mzML files."
  • [other] The evaluation helpers rely on peak picking using MZMine parameters defined in PeakPicking.py.: "The evaluation helpers rely on peak picking using MZMine parameters defined in PeakPicking.py."

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.