This algorithm for mass spectrometry data can identify unknown pollutants

Environmental laboratory

This algorithm for mass spectrometry data can identify unknown pollutants

19 May, 2025

A novel data tool from UC Riverside makes it possible to utilise untargeted mass spectrometry to characterise as-yet-unclassified polluting chemicals.

Environmental monitoring professionals often face a common problem: their data is rich, but its full potential remains out of reach.  

Mass spectrometry, one of the most powerful techniques for identifying and quantifying chemicals in complex environmental samples, generates massive datasets.  

Yet, most of this data is underutilised, especially in untargeted analyses, because conventional tools lack the scalability, flexibility, or accessibility to explore it deeply.

A development out of the University of California, Riverside, is set to change that.

Researchers there have created the Mass Spectrometry Query Language (MassQL), a breakthrough programming language that lets scientists search through mass spectrometry datasets with speed and precision, without needing advanced coding skills.

Mining supermassive data without coding

Traditionally, diving into the depths of mass spectrometry data required bioinformatics expertise or custom software.  

This barrier excluded many chemists, biologists, and environmental scientists from extracting new insights from their own datasets, let alone from the vast troves of publicly available mass spectrometry data.

MassQL removes that barrier. It works like a powerful search engine for chemical data, letting users define custom molecular patterns and run targeted queries across terabytes of mass spectrometry data.  

Whether the goal is identifying pollutants in water, mapping drug metabolites in blood, or discovering unknown compounds in soil, MassQL brings the power of reanalysis into the hands of non-programmers.

Mingxun Wang, a computer scientist at UC Riverside and the lead developer of MassQL, explains: “We wanted to give chemists and biologists, who are generally not also computer scientists, the ability to mine their data exactly how they want to, without having to spend months or years learning to code.”

A rapid acceleration of pollutant discovery

For environmental scientists, MassQL is already proving its worth.  

In one case study featured in a recent Nature Methods publication, UCR postdoctoral researcher Nina Zhao used MassQL to scan all public mass spectrometry data from global water samples.  

Her goal was to identify organophosphate esters, chemicals commonly used as flame retardants and plasticisers.

Thanks to MassQL, Zhao was able to rapidly filter billions of molecular measurements and uncover not only known organophosphate esters but also previously uncharacterised derivatives and degradation products.  

Many of these compounds have the potential to disrupt endocrine function, harm cardiovascular systems, and damage ecosystems.

The end of targeted mass spectrometry?

One of MassQL’s greatest strengths is its broad applicability.  

It’s already been integrated into multiple open-source and commercial mass spectrometry platforms, significantly boosting the interoperability and reproducibility of environmental and biomedical analyses alike.

Beyond pollutant detection, MassQL has been applied in over 30 other scenarios: from detecting fatty acid markers in alcohol poisoning cases, to hunting for new antibiotics, to tracking so-called “forever chemicals” like PFAS on playground surfaces.

This level of versatility is a game-changer. Instead of building custom software for each new challenge, scientists now have a common language for exploring chemical data.

What this means for monitoring professionals

MassQL stands to become an indispensable tool for environmental monitoring professionals who rely on mass spectrometry to detect and understand pollutants. It enables:

  • Rapid identification of unknown compounds in untargeted datasets
  • Reanalysis of legacy data using new hypotheses or analytical targets
  • Pattern-based querying across diverse sample types and experimental conditions
  • More transparent, reproducible workflows in pollution monitoring and chemical surveillance

As Wang put it, “I wanted to create one language that could handle multiple kinds of queries. And now we have. I’m excited to hear about the discoveries that could come from this.”

With environmental challenges mounting and the pressure to detect emerging contaminants growing, MassQL represents a major step forward.  

It puts advanced data mining tools into the hands of those who need them most, and could open new doors in pollution tracking, risk assessment, and chemical safety.

To read the full paper, click here


Jed Thomas

Latest News

IET 36.3 May

Explore our Digital Edition

Discover the latest news and research

Digital edition

Explore Our Other Sites

Labmate Online
MIT develops tiny ingestible sensor that can measure core body temperature
Explore more Arrow
Pollution Solutions Online
Energy efficiency first: Why shipping must act now while low-GHG fuels scale
Explore more Arrow
Petro Online
Automated Trace Sulphur Calibration Across Multiple Chromatography Methods
Explore more Arrow
Chromatography Today
SLAS Technology Volume 38 highlights AI-driven laboratory automation, transcriptomics and gene therapy
Explore more Arrow