Ultrahigh-resolution mass spectrometry offers exceptional resolving power, yet formula assignment, particularly for nitrogenous disinfection byproducts (N-DBPs), remains challenged by the limited isotopic signature of 15N and elemental ambiguities. We developed HaloFormula, a software for high-confidence formula assignment of dissolved organic matter (DOM) and DBPs. The workflow integrates candidate selection from a newly constructed formula database, dynamic in situ generation of an isotope matrix database, and formula assignment based on spectral similarity indices, achieving high computational efficiency and assignment accuracy. By incorporating a dual-isotope labeling strategy using equimolar 14N/15N-labeled monochloramine, HaloFormula enhances assignment accuracy and enables differentiation of nitrogen origins. The method was validated across diverse FT-ICR-MS data sets, including DOM and model compounds treated by chlor(am)ination and UV-based processes. HaloFormula assigned 1,875 formulas for a Suwannee River Fulvic Acid data set, of which 937 exhibited 13C isotopes. For halogenated compounds, over 900 Cl-containing formulas were assigned, with more than 1,400 isotopic peaks exhibiting accurate isotopic distributions. Up to 17 isotopologues were detected for individual N-DBPs due to enhanced 15N detection from the dual-isotope labeling strategy, enabling unambiguous formula assignment and nitrogen origin tracking. This novel methodology is readily adaptable for elucidating nitrogen sources in other systems and extendable to broader elemental analyses.
Xiang et al. (2026) studied this question.