Hello, I have to parse data from drugbank database. So, I found, I can parse drugbank dataset using dbparser.
I have found guidelines here. So, when I am running the code given on the pages, I found very little data. For example, only 398 rows for drug interaction. I think it must be very bigger than the resultant one.
# Load dbparser package
library(dbparser)
# Create SQLite database connection
database_connection <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
# DrugBank database sample name
biotech <- "drugbank_record_biotech.xml"
# Use DrugBank sample database in the library
read_drugbank_xml_db(system.file("extdata", biotech, package = "dbparser"))
# Parse all available drug tibbles
run_all_parsers(save_table = TRUE, database_connection = database_connection)
# List saved tables
DBI::dbListTables(database_connection)
# Close SQLite connection
DBI::dbDisconnect(database_connection)
Now, I would like to know, is there anyway, I can parse my own dataset (which one is downloaded from drugbak using this package? The question might be silly, but I will grateful if you show me any path for parsing the dataset.
Thank you very much for your kind responses. Yes, the problem is solved. Now, I can extract information from my own drugbank XML dataset.
However, I think the drug_salts() parser has some bugs (I am not sure). Because, as per the documentation, this parser must return 11 variables but I am getting only 8 variables.
Hello @Akib62,
The extera 3 variables can be retrieved using the non free version of DrugBank database.
However, the good new is that SMILES, among other properties, can be retrieved using drug_calc_prop parser.
Here is the detailed documentation about these properties Drug Calculated Properties — Calculated_Properties_Drug • dbdataset
In general, I recommend you to use this documentation Function reference • rOpenSci: dbparser for parsers returned datasets details as dbdataset package is a data packaged from parsing DrugBank using dbparser.
I hope that will help.
Best Regards,