henhaobio
Sign in

Abstract

Even though raw mass spectrometry data is information rich, the vast majority of the data is underutilized. The ability to interrogate these rich datasets is handicapped by the limited capability and flexibility of existing software. We introduce the Mass Spec Query Language (MassQL) that addresses these issues by enabling an expressive set of mass spectrometry patterns to be queried directly from raw data. MassQL is an open-source mass spectrometry query language for flexible and mass spectrometer manufacturer-independent mining of MS data. We envision the flexibility, scalability, and ease of use of MassQL will empower the mass spectrometry community to take fuller advantage of their mass spectrometry data and accelerate discoveries.

In-depth summary

Claude Opus 5.5 · xhigh effort · 8 Nov 2026 · from the full text of version 1 (7 Aug 2022) · CC BY 4.0

MassQL, an open-source query language, lets users search raw mass spectrometry data from any vendor for isotope, fragmentation and neutral-loss patterns, from one file to entire public repositories.

The authors say that searching mass spectrometry data for the signatures of a chemical class (isotope patterns, diagnostic fragments, neutral losses) is done by hand or with single-purpose, domain-specific tools that other people find hard to reuse. MassQL offers one vendor-neutral query vocabulary, defined with community input, that runs on anything from a single file to whole public repositories and is built into several existing MS packages.

Key results

  1. ShownMassQL turns common MS concepts into a formal grammar. It covers precursor m/z and isotope patterns at MS1, product ions and neutral losses at MS/MS, and retention time and ion-mobility drift time. Users set their own tolerances and can combine clauses with AND/OR to include or exclude matches.

    The vocabulary was built with community input. MS/MS terms cover both data-dependent and data-independent acquisition (SWATH, MS^e). Tolerances apply to ion intensity and mass accuracy. A formal grammar and a Python reference engine are released, and Fig. 1b shows an example query for a characteristic mass loss. The language can gain new terms as instruments change. · Main Text; Code Availability; Figure legends

  2. ShownMassQL is not only a standalone engine. It runs inside existing MS software and through libraries in other programming languages, so a query can be reused across tools instead of being rewritten for each one.

    Built into GNPS, the GNPS Dashboard, MZmine, MS-DIAL, pyOpenMS and UniDec (Fig. 1c). Also available: a Python package on PyPI, an R API (SpectraQL), a web API for languages without official libraries (Java, Scala, C#), a command-line tool, and NextFlow and GNPS workflows for local clusters or the GNPS cloud. Repository links are listed under Code Availability. · Main Text; Code Availability; Figure legends

  3. ClaimedThe authors say queries scale from one file to whole public repositories and can filter a molecular network down to one structural class. They credit this with finding uncharacterized analogs in environmental chemistry, bioinorganic chemistry and natural-product discovery.

    Repositories: MassIVE/GNPS, Metabolomics Workbench, MetaboLights (hundreds of thousands of files, thousands of projects). Cases cited only by SI Note: environmental organophosphates (1.1.1), fungal iron-binding molecules (3.3.1), pentabrominated natural products (3.5.1); network filtering in SI Notes 1.1.2, 1.5, 1.7, 1.9, 1.12, 3.8. No timings or hit counts in the main text. · Main Text

  4. SuggestedCommunity members have already written and shared MassQL queries of several kinds. The queries are being collected in a compendium meant as a central place to deposit and reuse them for other datasets.

    The compendium holds 35 applications of MassQL (Fig. 1d). Separately, the SI Notes describe community-written queries by type: MS/MS spectra (1.1 to 2.8), precursor isotope patterns (3.1 to 3.9), drift time (4.1 to 4.2) and other parameters (5.1 to 5.2). Examples include iron-binding compounds (3.3.1, 3.3.2) and telling glycoconjugates apart (2.8). · Main Text; Figure legends

  5. ShownAn interactive web sandbox lets users draft and test queries on demonstration data. It translates each query into 9 natural languages that can be included in manuscripts and grants, and a single click sends the query to GNPS to run on the user's own data.

    The sandbox (https://msql.ucsd.edu/) runs on demonstration data that includes public MS/MS spectral libraries. Translations cover English, Chinese, Japanese, Korean, French, German, Spanish, Portuguese and Russian (Fig. 1b). The authors intend the translated text to aid reproducibility in manuscripts and grants. · Main Text; Figure legends

Methods, data and reproducibility

The authors define a domain-specific query language whose grammar covers MS1 and MS/MS patterns (precursor m/z, isotope patterns, product ions, neutral losses), retention time, drift time, tolerances and boolean logic. They provide a Python reference engine, integrations into existing MS software, and workflows that run queries from single files up to public repositories.

  • Public MS data repositories queried at scale: MassIVE/GNPS, Metabolomics Workbench, MetaboLights · n = hundreds of thousands of files across thousands of public projects
  • Public MS/MS spectral libraries used as demonstration data in the MassQL sandbox
  • Community-written MassQL applications contributed to the community compendium (community queries are also described in SI Notes 1.1 to 5.2) · n = 35 applications in the compendium
Methods & tools
MassQL, MZmine, pyOpenMS, MS-DIAL, UniDec, GNPS, GNPS Dashboard, SpectraQL, NextFlow, molecular networking
Software & environment
Python reference engine on PyPI (massql), R API (SpectraQL), web API, command-line tool, and NextFlow and GNPS workflows. The Code Availability section also links language documentation, the pyOpenMS MassQL page and the web sandbox. No package versions, containers or requirement files are stated.
Reproducibility gaps
Links to the instructional videos and the community compendium appear only as '(Link)' placeholders with no URL. All application and discovery details are in SI Notes, which are not part of this text.
Limitations (2)
  • The main text reports no benchmark: no query run times, hit counts or false-positive rates, and no comparison with the specialized tools MassQL aims to replace. Repository-scale scalability and the claim of being 'compatible with all MS data' are therefore asserted rather than measured. · noted in this summary
  • Every application cited (organophosphates, fungal iron binders, pentabrominated natural products, glycoconjugates) is in SI Notes that are not in this text, so the discovery claims cannot be checked here. · noted in this summary

Read this if you mine mass spectrometry data for chemical-class signatures such as bromine isotope patterns, diagnostic fragments or neutral losses, and want a vendor-neutral, shareable query syntax that also runs across public metabolomics repositories.

Citations
41

Reproducibility ledger

Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.

Sign in to file a reproducibility report.