dbparser
dbparser package aims to parse different public drugs databases into a single and unified format R object called dvobject (stands for drugverse object). Also, dbparser has evolved into an integration engine, allowing you to merge mechanistic data (DrugBank) with real-world phenotypic data (OnSIDES) and drug-drug interaction risks (TWOSIDES).
Need more than the open-source package?
Explore dbparser Pro ServicesOverview
dbparser is an rOpenSci peer-reviewed R package that parses and integrates major pharmacological databases into standardized, analysis-ready R objects called dvobjects (drugverse objects).
Pharmacological databases use incompatible formats and structures, forcing researchers to write custom parsing scripts — a process that consumes 60–80% of analysis time. dbparser eliminates this bottleneck with unified parsing functions, chainable merge operations, and a consistent output structure that enables reproducible, cross-database analyses.
Supported Databases
DrugBank (The Mechanistic Hub) — A comprehensive database containing detailed drug, pharmacological, and target information. dbparser parses DrugBank XML (versions 5.1.0 through 5.1.12) into structured R data frames.
- •Parser:
parseDrugBank() - •Tested versions: 5.1.0 through 5.1.12
OnSIDES (Adverse Drug Events) — Adverse events extracted from thousands of FDA drug labels using machine learning.
- •Parser:
parseOnSIDES()
TWOSIDES (Drug-Drug Interactions) — Adverse events arising when two drugs are taken together.
- •Parser:
parseTWOSIDES()
Quick Start
library(dbparser)
# Parse DrugBank XML
dvobject <- parseDrugBank("path/to/drugbank.xml")
# Merge with adverse events
merged <- merge_drugbank_onsides(dvobject, parseOnSIDES("path/to/onsides/"))
# Merge with drug-drug interactions
full <- merge_drugbank_twosides(merged, parseTWOSIDES("path/to/twosides.csv.gz"))
### Installation
Install from CRAN
`install.packages("dbparser")`
Install the development version from GitHub
`devtools::install_github("ropensci/dbparser")`
### License
MIT