Learn R Programming

dbparser

Overview

Drugs databases vary too much in their formats and structures which making related data analysis not a very easy job and requires a lot of efforts to work on only two databases together such as DrugBank and KEGG.

Hence, dbparser package aims to parse different public drugs databases as DrugBank or KEGG into single and unified format R object called dvobject (stands for drugverse object).

That should help in:

  • working with single data object and not multiple databases in different formats,
  • using R analysis capabilities easily on drugs data,
  • ease of transferring data between researchers after performing required data analysis or dvobject and storing results in the same object in a very easy manner

dvobject Structure

dvobject introduces a unified and compressed format of drugs data. It is an R list object that contains one or more of the following sub-lists:

  • drugs: list of data.frames that contain drugs information (i.e. synonyms, classifications, …) and it is the only mandatory list
  • salts: data.frame contains drugs salts information
  • products: data.frame of commercially available drugs products in the world
  • references: data.frame of articles, links and textbooks about drugs or CETT data
  • cett: list of data.frames contain targets, enzymes, carriers and transporters information

Drug Databases

Parsers are available for the following databases (it is in progress list)

DrugBank

DrugBank database is a comprehensive, freely accessible, online database containing information on drugs and drug targets. As both a bioinformatics and a cheminformatics resource, DrugBank combines detailed drug (i.e. chemical, pharmacological and pharmaceutical) data with comprehensive drug target (i.e. sequence, structure, and pathway) information. More information about DrugBank can be found here.

In its raw form, the DrugBank database is a single XML file. Users must create an account with DrugBank and request permission to download the database. Note that this may take a couple of days.

The dbparser package parses the DrugBank XML database into R tibbles that can be explored and analyzed by the user, check this tutorial for more details.

If you are waiting for access to the DrugBank database, or do not intend to do a deep dive with the data, you may wish to use the dbdataset package, which contains the DrugBank database already parsed into dvobject. Note that this is a large package that exceeds the limit set by CRAN. It is only available on GitHub.

dbparser is tested against DrugBank versions 5.1.0 through 5.1.10 successfully. If you find errors with these versions or any other version please submit an issue here.

Installation

You can install the released version of dbparser from CRAN with:

install.packages("dbparser")

or you can install the latest updates directly from the repo

library(devtools)
devtools::install_github("ropensci/dbparser")

Code of Conduct

Please note that the ‘dbparser’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Contributing Guide

Copy Link

Version

Install

install.packages('dbparser')

Monthly Downloads

734

Version

2.0.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

February 16th, 2024

Functions in dbparser (2.0.2)

drug_categories

Drug Categories parser
drug_syn

Drug Synonyms parser
cett_poly_pfms_doc

Carriers/ Enzymes/ Targets/ Transporters Polypeptide PFAMS parsers
drug_intern_brand

Drug International Brands parser
drug_pathway_enzyme

Drug Pathway Enzymes parser
drug_patents

Drug Patents parser A property right issued by the United States Patent and Trademark Office (USPTO) to an inventor for a limited time, in exchange for public disclosure of the invention when the patent is granted. Drugs may be issued multiple patents.
cett_poly_syn_doc

Carriers/ Enzymes/ Targets/ Transporters Polypeptide Synonyms parsers
drug_affected_organisms

Drug Affected Organism parser
dbparser

dbparser: A package for reading and parsing DrugBank xml database.
drug_manufacturers

Drug Manufacturers parser
drug_snp_effects

Drug SNP Effects parser
drug_ahfs_codes

Drug ahfs-codes parser
init_dvobject

init_dvobject initialize dvobject
drug_pathway

Drug Pathway parser
drug_snp_adverse_reactions

Drug SNP Adverse Drug Reactions parser
drug_atc_codes

Drug ATC Codes element parser
drug_pathway_drugs

Drug Pathway Drugs parser
drug_interactions

Drug Interactions parser
parse_references_node

Drugs/ Carriers/ Enzymes/ Targets/ Transporters references element parser
drug_ex_identity

Drug External Identifiers parser
drug_node_options

returns drug node valid options.
drug_pharmacology

Drug Pharmacology parser
drug_exp_prop

Drug Experimental Properties parser
drug_mixtures

Drug Mixtures parser
drug_pdb_entries

Drug pdb-entries parser
drug_salts

Drug Salts parser
read_drugbank_xml_db

Reads DrugBank xml database and load it into memory.
drug_sequences

Drug Sequences parser
parse_drug_nodes

Run all drug related parsers
parse_cett_node

Run all CETT related parsers
drug_packagers

Drug Packagers parser
drug_reactions_enzymes

Drug Reactions Enzymes Parsers
drug_food_interactions

Drug Groups parser
drug_reactions

Drug Reactions Parsers
drug_external_links

Drug External Links parser
drug_prices

Drug Prices Parsers
references_node_options

returns references node valid options.
drug_products

Drug Products parser
parseDrugBank

parseDrugBank
links

Drugs/ Carriers/ Enzymes/ Targets/ Transporters links element parser
show_dvobject_metadata

init_dvobject Returns data.frame with two columns (key, value) of dvobject attributes
articles

Drugs/ Carriers/ Enzymes/ Targets/ Transporters articles element parser
cett_nodes_options

returns carriers, enzymes,targets and transporters node valid options.
drug_calc_prop

Drug Calculated Properties parser
books

Drugs/ Carriers/ Enzymes/ Targets/ Transporters books element parser
cett_actions_doc

Carriers/ Enzymes/ Targets/ Transporters Actions parsers
drug_dosages

Drug Dosages parser
cett_ex_identity_doc

Carriers/ Enzymes/ Targets/ Transporters Polypeptide External Identifiers parsers
cett_doc

Carriers/ Enzymes/ Targets/ Transporters parsers
attachments

Drugs/ Carriers/ Enzymes/ Targets/ Transporters attachments element parser
drug_classification

Drug Classification parser
add_drugbank_info

add_drugbank_info Add passed DrugBank db metadata to passed dvobject
cett_go_doc

Carriers/ Enzymes/ Targets/ Transporters Polypeptide GO Classifier parsers
cett_poly_doc

Carriers/ Enzymes/ Targets/ Transporters Polypeptide parsers
drug_general_information

Drugs General Information parser
drug_groups

Drug Groups parser