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 might be exposed unintentionally through food and the environment. As a result, significant drug exposures can be missed. Knowing what drugs an individual has been exposed to is important because they can have unexpected effects on biology and health.
A team of researchers from the University of California (UC), San Diego, and their colleagues has now created a publicly available online reference library of chemical “fingerprints” from thousands of drugs, their metabolites, and related compounds. The Global Natural Product Social Molecular Networking (GNPS) Drug Library integrates MS/MS references of drugs and their metabolites/analogs with data on their exposure sources, pharmacologic classes, therapeutic indications, and mechanisms of action.
Comparing unknown compounds in a patient’s blood, urine, or other biological sample to those in the GNPS Drug Library reveals a more accurate picture of their drug exposure than what is listed on a patient’s medical record, according to the researchers.
The researchers reported on their development and use of the new GNPS Drug Library resource in a paper in Nature Communications titled “A resource to empirically establish drug exposure records directly from untargeted metabolomics data.” The report’s co-first author is Nina Zhao, PhD, a postdoctoral scientist in the laboratory of co-author Pieter Dorrestein, PhD, a 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. In their report, the authors concluded, “This resource enables data science analysis to empirically—and retroactively—determine drug exposures using untargeted metabolomics, supporting research across disciplines.”
Chemical exposures, including prescription drugs, play critical roles in shaping human health, Zhao et al. wrote, citing a recent CDC survey estimating that 45.7% of the U.S. population reported using at least one prescription drug in the last 30 days. To assess drug exposure, clinicians largely rely on medical records, self-reports, or medication tracking (prescription counts, pill counts), but these methods may be inaccurate and not complete, for example, missing over-the-counter drugs, those acquired online or through diet, and undocumented drug use. “Variability in drug metabolism and clearance further complicates exposure assessment, as some drugs are rapidly eliminated while others persist for weeks to months,” the team continued. Such limitations “… highlight the need for direct data-driven approaches to screen drug exposures.”
The newly released GNPS Drug Library, created by Zhao and colleagues, “… integrates MS/MS references of drugs and their metabolites/analogs with standardized vocabularies on their exposure sources, pharmacologic classes, therapeutic indications, and mechanisms of action,” the investigators wrote. 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 untargeted metabolomics, a method that 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 Zhao.
Through their studies, the team 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. They also showed that 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, PhD, a postdoctoral researcher in the laboratory of co-author Shirley Tsunoda, PharmD, professor of clinical pharmacy 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 painkillers 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 HIV, the library detected not only the presence of antiretroviral (ARV) 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. “Although antiretroviral therapy (ART)—the combination of multiple ARVs to treat HIV—has led to high rates of viral suppression, individuals living with HIV continue to experience disproportionately high rates of depression and cardiovascular disease,” they pointed out. “This is reflected in the frequent detection of antidepressants and cardiovascular drugs in the analyzed samples.”
The researchers could also group participants based on the medications they were truly taking. They 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. And while the reported study focused on human biospecimens, the GNPS Drug Library is broadly applicable for drug screening across diverse research disciplines, such as food and environmental monitoring, they stated. “GNPS Drug Library can also be applied in the context of food monitoring. Using untargeted metabolomics files from ~3500 foods/beverages collected in the Global FoodOmics Project, we observed antibiotics (e.g., ampicillin, tetracycline) in fish, beef, and turkey, as well as antiparasitic drugs (e.g., spinosad, thiabendazole) that are also used as fungicides or insecticides in fruit and vegetables.”
The researchers expect the GNPS Drug Library could lay 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. “We anticipate that the GNPS Drug Library will play a key role in clinical research studies by providing individualized, within-study relative quantitative drug exposure profiles,” they wrote.
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,” Zhao added.
Noting limitations of their resource, the researchers concluded, “While the GNPS Drug Library is not intended for immediate clinical decision-making, this tool lays the groundwork for future integration of exposure data into precision medicine frameworks, such as studies of drug adherence, microbiome-drug interactions, and treatment heterogeneity … We envision the GNPS Drug Library as a valuable resource supporting a wide range of scientific fields, ultimately driving new insights into both the ecological and health-related impacts of drug exposures.”

