  Untargeted metabolomic profiling through liquid chromatography-mass
spectrometry (LC-MS) measures a vast array of metabolites within biospecimens,
advancing drug development, disease diagnosis, and risk prediction. However,
the low throughput of LC-MS poses a major challenge for biomarker discovery,
annotation, and experimental comparison, necessitating the merging of multiple
datasets. Current data pooling methods encounter practical limitations due to
their vulnerability to data variations and hyperparameter dependence. Here we
introduce GromovMatcher, a flexible and user-friendly algorithm that
automatically combines LC-MS datasets using optimal transport. By capitalizing
on feature intensity correlation structures, GromovMatcher delivers superior
alignment accuracy and robustness compared to existing approaches. This
algorithm scales to thousands of features requiring minimal hyperparameter
tuning. Manually curated datasets for validating alignment algorithms are
limited in the field of untargeted metabolomics, and hence we develop a dataset
split procedure to generate pairs of validation datasets to test the alignments
produced by GromovMatcher and other methods. Applying our method to
experimental patient studies of liver and pancreatic cancer, we discover shared
metabolic features related to patient alcohol intake, demonstrating how
GromovMatcher facilitates the search for biomarkers associated with lifestyle
risk factors linked to several cancer types.
