Doctors and researchers try to understand what medications a person has taken by asking patients directly or by looking at medical records. But this information is often incomplete. People may forget what they took, use over-the-counter drugs, take leftover prescription drugs, buy medicines online, or be exposed unintentionally through food and the environment. As a result, significant drug exposures can be missed. Knowing what drugs are present is important because they can have unexpected effects on biology and health.
Now, a team of researchers from University of California San Diego and their colleagues have created a publicly-available online reference library of chemical "fingerprints" from thousands of drugs, their breakdown products and related compounds. The study was published in Nature Communications on December 9, 2025.
Comparing unknown compounds in a patient's blood, urine or other biological sample to those in the Global Natural Product Social Molecular Networking (GNPS) Drug Library, as it is called, reveals a more accurate picture of their drug exposure than what is listed on a patient's medical record, according to the researchers.
To build the library, the research team used mass spectrometry, which applies an electrical charge to the molecules making up drugs to sort them by weight and then breaks them down to generate a chemical fingerprint. Each drug entry in the library is linked to descriptions of where it comes from (prescription, over‑the‑counter, etc.), what class of medicine it belongs to, what it is used for, and how it works in the body.
To test the power of the library to accurately detect actual drug exposures in biological samples from patients, the researchers used a special type of mass spectrometry called untargeted metabolomics. The method analyzes thousands of molecules at once to identify the drug breakdown products in the sample.
"Whatever sample we put into the mass spectrometer, be it urine, breast milk or even an environmental water sample, it will be able to detect all of the chemicals in the sample," said co-first author Nina Zhao, Ph.D., a post-doctoral scientist in the laboratory of co-author Pieter Dorrestein, Ph.D., professor at UC San Diego Skaggs School of Pharmacy and Pharmaceutical Sciences and professor of pharmacology and pediatrics at UC San Diego School of Medicine.
For example, the researchers found that
- Samples from people with inflammatory bowel disease, Kawasaki disease or dental cavities showed a high frequency of antibiotics, matching the typical treatment of these conditions.
- Skin swabs from people with psoriasis were often rich in antifungal agents, reflecting common antifungal therapies for skin lesions.
The research team also put the library to the test on samples from nearly 2,000 participants in the American Gut Project, which studies the diversity of gut microbes in the United States, Europe and Australia. This analysis detected 75 distinct drugs, a list reflecting the most‑prescribed drug classes and medications in these regions.
"We expected those drugs to be the most commonly found, and indeed this was what we observed, confirming that this library works as we intended." said co-first author Kine Eide Kvitne, a post-doctoral researcher in the laboratory of co-author Shirley Tsunoda, Pharm.D., professor of clinical pharmacy and and associate dean for pharmacy education at Skaggs School of Pharmacy and Pharmaceutical Sciences.
It also revealed that U.S. participants carried more detectable drugs per individual than European or Australian participants, and that pain killers were more often found in females, while erectile‑dysfunction drugs were mostly detected in males.
The library can also uncover medication use for co-existing conditions that may be clinically relevant for monitoring certain diseases. For example, samples from Alzheimer's disease patients reflected the use of cardiovascular and psychiatric medication, consistent with treatments for conditions that often occur alongside the neurodegenerative disease.
And, in samples from a clinical study of people with human immunodeficiency virus (HIV), the library detected not only the presence of antiviral medications, but cardiovascular and psychiatric drugs as well, consistent with the higher rates of heart disease and depression that are observed in people living with HIV. This allowed the researchers to group participants based on the medications they were truly taking. The researchers also discovered that certain HIV drugs were associated with specific changes in gut‑derived molecules, demonstrating how drug exposure can reshape the microbiome.
"A lot of different kinds of drugs have a huge impact on the gut microbiome, which is connected to your immune system," said Zhao.
Testing more than 3,000 food products, the team found antibiotics in meat products and a pesticide in vegetables that are also used in humans. They believe the library will also be useful for uncovering hidden environmental drug exposures, such as those in reclaimed water and snow.
The first of its kind, the GNPS Drug Library lays the groundwork for future studies linking drug exposure, microbial breakdown products and patient outcomes. The comprehensive resource will continue to expand over time, according to the researchers, who are currently exploring the use of large language models and generative artificial intelligence to curate new data.
The library's user-friendly online data analysis app will enable clinical and public health researchers without pharmacy backgrounds to understand how drugs and their metabolites influence health.
"Basically, you put in your dataset and with one click you get all the information about which drugs are in it, as well as figures and plots," said Zhao.
The library could also help facilitate precision medicine by explaining why not all patients respond to a treatment in the same way, depending on how they metabolize medications.
"By understanding that, maybe we can use this information to optimize drug treatment." she said.
Additional co-authors on the study include: Siddharth Mohan, Vincent Charron‑Lamoureux, Wout Bittremieux, Runbang Tang, Robin Schmid, Yasin El Abiead, Mohammadsobhan S. Andalibi, Helena Mannochio‑Russo, Madison Ambre, Nicole E. Avalon, MacKenzie Bryant, Andrés Mauricio Caraballo‑Rodríguez, Martin Casas Maya, Loryn Chin, Ronald J. Ellis, Donald Franklin, Lauren Hansen, Robert Heaton, Jennifer E. Iudicello, Lora Khatib, Scott Letendre, Daniel McDonald, Ipsita Mohanty, David J. Moore, Prajit Rajkumar, Harshada Sapre, Sydney P. Thomas, Caitlin Tribelhorn, Helena M. Tubb, Corinn Walker, Crystal X. Wang, Shipei Xing, Jasmine Zemlin, Simone Zuffa, Karsten Zengler and Rob Knight, all at UC San Diego; Robin Schmid, UC San Diego and Czech Academy of Sciences; Corinna Brungs and Tomáš Pluskal, Czech Academy of Sciences; Santosh Lamichhane, UC San Diego and University of Turku and Åbo Akademi University; Sagan Girod, University of Alberta; Paulo Wender P. Gomes, UC San Diego and Federal University of Pará; Alan K. Jarmusch, National Institute of Environmental Health Sciences, Sarolt Magyari, UC San Diego and Eidgenössische Technische Hochschule (ETH) Zürich; Andrés Cumsille, University of Florida; Dylan H. Ross, University of Washington and Pacific Northwest National Laboratory; Mohammad Reza Zare Shahneh and Mingxun Wang, University of California Riverside; David S. Wishart, UC San Diego and University of Alberta; Rima Kaddurah‑Daouk, Duke University; Manuela Raffatellu, UC San Diego and Chiba University; Libin Xu, University of Washington.
The study was funded, in part, by the National Institutes of Health (NIH) (grants 1U19AG063744, 3U19AG063744, P50HD106463, R01DK136117, U24DK133658, P30MH062512) and the Gordon and Betty Moore Foundation (grant GBMF12120).
Disclosures: Tsunoda receives research funding from Veloxis Pharmaceuticals. Dorrestein is an advisor and holds equity in Cybele, BileOmix and Sirenas and is a scientific co-founder and advisor of, and holds equity in, Ometa, Enveda, and Arome with prior approval by UC San Diego. Dorrestein also consulted for DSM Animal Nutrition & Health in 2023.