├── .Rbuildignore ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── r.yml ├── .gitignore ├── .travis.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── DESCRIPTION ├── LICENSE ├── NAMESPACE ├── NEWS.md ├── R ├── abstract_parser.R ├── cett_actions_parsers.R ├── cett_general_information_parsers.R ├── cett_polypeptide_general_infromation_parsers.R ├── cett_polypeptide_others_parsers.R ├── dbparser-package.R ├── drug_atc_codes_node_parser.R ├── drug_classfication_node_parser.R ├── drug_common_utilities.R ├── drug_main_node_parser.R ├── drug_manufacturer_node_parser.R ├── drug_parsers.R ├── drug_pathway_node_parsers.R ├── drug_pharmacology_parser.R ├── drug_price_node_parser.R ├── drug_reaction_node_parser.R ├── drug_sequence_node_parser.R ├── drug_synonym_node_parser.R ├── drugbank_parser.R ├── dvobject_metadata.R ├── imports.R └── references_parsers.R ├── README.Rmd ├── README.md ├── _pkgdown.yml ├── appveyor.yml ├── codemeta.json ├── cran-comments.md ├── dbparser.Rproj ├── docs ├── 404.html ├── CODE_OF_CONDUCT.html ├── CONTRIBUTING.html ├── LICENSE-text.html ├── _config.yml ├── apple-touch-icon-120x120.png ├── apple-touch-icon-60x60.png ├── apple-touch-icon-76x76.png ├── apple-touch-icon.png ├── articles │ ├── Database_Saving.html │ ├── dbparser.html │ ├── dbparser_files │ │ ├── canvasXpress-46.9 │ │ │ ├── canvasXpress.css │ │ │ └── canvasXpress.min.js │ │ ├── canvasXpress-binding-1.46.9.1 │ │ │ └── canvasXpress.js │ │ ├── figure-html │ │ │ ├── unnamed-chunk-3-1.png │ │ │ ├── unnamed-chunk-4-1.png │ │ │ └── unnamed-chunk-5-1.png │ │ └── htmlwidgets-1.6.2 │ │ │ └── htmlwidgets.js │ ├── fig1.png │ ├── fig2.png │ ├── fig3.png │ ├── index.html │ ├── maria_tables.png │ ├── new_database.png │ └── sql_connection.png ├── authors.html ├── bootstrap-toc.css ├── bootstrap-toc.js ├── docsearch.css ├── docsearch.js ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.ico ├── index.html ├── link.svg ├── logo.png ├── news │ └── index.html ├── pkgdown.css ├── pkgdown.js ├── pkgdown.yml ├── reference │ ├── Drugs.csv │ ├── add_drugbank_info.html │ ├── articles.html │ ├── attachments.html │ ├── books.html │ ├── carr_poly_ex_identitys.csv │ ├── carr_poly_go.csv │ ├── carr_poly_pfams.csv │ ├── carr_poly_syn.csv │ ├── carriers.html │ ├── carriers_actions.html │ ├── carriers_articles.html │ ├── carriers_links.html │ ├── carriers_polypeptide.html │ ├── carriers_polypeptide_ext_id.html │ ├── carriers_polypeptides_go.html │ ├── carriers_polypeptides_pfams.html │ ├── carriers_polypeptides_syn.html │ ├── carriers_textbooks.html │ ├── cett.html │ ├── cett_actions_doc.html │ ├── cett_doc.html │ ├── cett_ex_identity_doc.html │ ├── cett_go_doc.html │ ├── cett_nodes_options.html │ ├── cett_poly_doc.html │ ├── cett_poly_pfms_doc.html │ ├── cett_poly_syn_doc.html │ ├── close_db.html │ ├── dbparser.html │ ├── drug.html │ ├── drug_affected_organisms.csv │ ├── drug_affected_organisms.html │ ├── drug_ahfs_codes.csv │ ├── drug_ahfs_codes.html │ ├── drug_all.html │ ├── drug_articles.csv │ ├── drug_articles.html │ ├── drug_atc_codes.csv │ ├── drug_atc_codes.html │ ├── drug_books.csv │ ├── drug_books.html │ ├── drug_calc_prop.html │ ├── drug_calculated_properties.csv │ ├── drug_carriers.csv │ ├── drug_carriers_actions.csv │ ├── drug_carriers_articles.csv │ ├── drug_carriers_links.csv │ ├── drug_carriers_polypeptide_external_identifiers.csv │ ├── drug_carriers_polypeptide_pfams.csv │ ├── drug_carriers_polypeptide_synonyms.csv │ ├── drug_carriers_polypeptides.csv │ ├── drug_carriers_polypeptides_go_classifiers.csv │ ├── drug_carriers_textbooks.csv │ ├── drug_categories.csv │ ├── drug_categories.html │ ├── drug_classification.html │ ├── drug_classifications.csv │ ├── drug_dosages.csv │ ├── drug_dosages.html │ ├── drug_drug_interactions.csv │ ├── drug_element.html │ ├── drug_element_options.html │ ├── drug_enzy_poly_ex_identity.csv │ ├── drug_enzy_poly_go.csv │ ├── drug_enzy_poly_syn.csv │ ├── drug_enzymes.csv │ ├── drug_enzymes_actions.csv │ ├── drug_enzymes_articles.csv │ ├── drug_enzymes_links.csv │ ├── drug_enzymes_polypeptide_external_identifiers.csv │ ├── drug_enzymes_polypeptide_pfams.csv │ ├── drug_enzymes_polypeptide_synonyms.csv │ ├── drug_enzymes_polypeptides.csv │ ├── drug_enzymes_polypeptides_go_classifiers.csv │ ├── drug_enzymes_textbooks.csv │ ├── drug_ex_identity.html │ ├── drug_exp_prop.html │ ├── drug_experimental_properties.csv │ ├── drug_external_identifiers.csv │ ├── drug_external_links.csv │ ├── drug_external_links.html │ ├── drug_food_interactions.csv │ ├── drug_food_interactions.html │ ├── drug_general_information.html │ ├── drug_groups.csv │ ├── drug_groups.html │ ├── drug_interactions.html │ ├── drug_intern_brand.html │ ├── drug_international_brands.csv │ ├── drug_links.csv │ ├── drug_links.html │ ├── drug_manufacturers.csv │ ├── drug_manufacturers.html │ ├── drug_mixtures.csv │ ├── drug_mixtures.html │ ├── drug_node_options.html │ ├── drug_packagers.csv │ ├── drug_packagers.html │ ├── drug_patents.csv │ ├── drug_patents.html │ ├── drug_pathway.csv │ ├── drug_pathway.html │ ├── drug_pathway_drugs.csv │ ├── drug_pathway_drugs.html │ ├── drug_pathway_enzyme.html │ ├── drug_pathway_enzymes.csv │ ├── drug_pdb_entries.csv │ ├── drug_pdb_entries.html │ ├── drug_pharmacology.html │ ├── drug_prices.csv │ ├── drug_prices.html │ ├── drug_products.csv │ ├── drug_products.html │ ├── drug_reactions.csv │ ├── drug_reactions.html │ ├── drug_reactions_enzymes.csv │ ├── drug_reactions_enzymes.html │ ├── drug_salts.csv │ ├── drug_salts.html │ ├── drug_sequences.csv │ ├── drug_sequences.html │ ├── drug_snp_adverse_drug_reactions.csv │ ├── drug_snp_adverse_reactions.html │ ├── drug_snp_effects.csv │ ├── drug_snp_effects.html │ ├── drug_syn.csv │ ├── drug_syn.html │ ├── drug_synonyms.csv │ ├── drug_targ.csv │ ├── drug_targ_actions.csv │ ├── drug_targ_articles.csv │ ├── drug_targ_links.csv │ ├── drug_targ_poly_ex_identity.csv │ ├── drug_targ_poly_pfams.csv │ ├── drug_targ_poly_syn.csv │ ├── drug_targ_polys.csv │ ├── drug_targ_polys_go.csv │ ├── drug_targ_textbooks.csv │ ├── drug_targets.csv │ ├── drug_targets_actions.csv │ ├── drug_targets_articles.csv │ ├── drug_targets_links.csv │ ├── drug_targets_polypeptide_external_identifiers.csv │ ├── drug_targets_polypeptide_pfams.csv │ ├── drug_targets_polypeptide_synonyms.csv │ ├── drug_targets_polypeptides.csv │ ├── drug_targets_polypeptides_go_classifiers.csv │ ├── drug_targets_textbooks.csv │ ├── drug_trans_actions.csv │ ├── drug_trans_articles.csv │ ├── drug_trans_links.csv │ ├── drug_trans_poly_ex_identity.csv │ ├── drug_trans_poly_syn.csv │ ├── drug_trans_polys.csv │ ├── drug_trans_polys_go.csv │ ├── drug_trans_polys_pfams.csv │ ├── drug_trans_textbooks.csv │ ├── drug_transporter_polypeptide_synonyms.csv │ ├── drug_transporters.csv │ ├── drug_transporters_actions.csv │ ├── drug_transporters_articles.csv │ ├── drug_transporters_links.csv │ ├── drug_transporters_polypeptide_external_identifiers.csv │ ├── drug_transporters_polypeptides.csv │ ├── drug_transporters_polypeptides_go_classifiers.csv │ ├── drug_transporters_polypeptides_pfams.csv │ ├── drug_transporters_textbooks.csv │ ├── drugs.html │ ├── enzymes.html │ ├── enzymes_actions.html │ ├── enzymes_articles.html │ ├── enzymes_links.html │ ├── enzymes_polypeptide.html │ ├── enzymes_polypeptide_ext_ident.html │ ├── enzymes_polypeptide_go.html │ ├── enzymes_polypeptide_pfams.html │ ├── enzymes_polypeptide_syn.html │ ├── enzymes_textbooks.html │ ├── figures │ │ ├── README-pressure-1.png │ │ ├── README-unnamed-chunk-2-1.png │ │ ├── README-unnamed-chunk-3-1.png │ │ ├── README-unnamed-chunk-4-1.png │ │ ├── fig1.png │ │ ├── fig2.png │ │ ├── fig3.png │ │ └── logo.png │ ├── get_drugbank_exported_date.html │ ├── get_drugbank_metadata.html │ ├── get_drugbank_version.html │ ├── get_xml_db_rows.html │ ├── index.html │ ├── init_dvobject.html │ ├── links.html │ ├── open_db.html │ ├── open_mdb.html │ ├── parseDrugBank.html │ ├── parse_carr_poly.html │ ├── parse_carr_poly_ext_identity.html │ ├── parse_carr_polypeptides_go.html │ ├── parse_carr_polypeptides_pfams.html │ ├── parse_carr_polypeptides_syn.html │ ├── parse_cett_node.html │ ├── parse_drug.html │ ├── parse_drug_affected_organisms.html │ ├── parse_drug_ahfs_codes.html │ ├── parse_drug_all.html │ ├── parse_drug_articles.html │ ├── parse_drug_atc_codes.html │ ├── parse_drug_books.html │ ├── parse_drug_calc_prop.html │ ├── parse_drug_calculated_properties.html │ ├── parse_drug_carriers.html │ ├── parse_drug_carriers_actions.html │ ├── parse_drug_carriers_articles.html │ ├── parse_drug_carriers_links.html │ ├── parse_drug_carriers_polypeptides.html │ ├── parse_drug_carriers_polypeptides_external_identifiers.html │ ├── parse_drug_carriers_polypeptides_go_classifiers.html │ ├── parse_drug_carriers_polypeptides_pfams.html │ ├── parse_drug_carriers_polypeptides_synonyms.html │ ├── parse_drug_carriers_textbooks.html │ ├── parse_drug_categories.html │ ├── parse_drug_classification.html │ ├── parse_drug_classifications.html │ ├── parse_drug_dosages.html │ ├── parse_drug_element.html │ ├── parse_drug_element_options.html │ ├── parse_drug_enzymes.html │ ├── parse_drug_enzymes_actions.html │ ├── parse_drug_enzymes_articles.html │ ├── parse_drug_enzymes_links.html │ ├── parse_drug_enzymes_polypeptides.html │ ├── parse_drug_enzymes_polypeptides_external_identifiers.html │ ├── parse_drug_enzymes_polypeptides_go_classifiers.html │ ├── parse_drug_enzymes_polypeptides_pfams.html │ ├── parse_drug_enzymes_polypeptides_synonyms.html │ ├── parse_drug_enzymes_textbooks.html │ ├── parse_drug_ex_identity.html │ ├── parse_drug_exp_prop.html │ ├── parse_drug_experimental_properties.html │ ├── parse_drug_external_identifiers.html │ ├── parse_drug_external_links.html │ ├── parse_drug_food_interactions.html │ ├── parse_drug_groups.html │ ├── parse_drug_interactions.html │ ├── parse_drug_intern_brand.html │ ├── parse_drug_international_brands.html │ ├── parse_drug_links.html │ ├── parse_drug_manufacturers.html │ ├── parse_drug_mixtures.html │ ├── parse_drug_nodes.html │ ├── parse_drug_packagers.html │ ├── parse_drug_patents.html │ ├── parse_drug_pathway.html │ ├── parse_drug_pathway_drugs.html │ ├── parse_drug_pathway_enzyme.html │ ├── parse_drug_pdb_entries.html │ ├── parse_drug_prices.html │ ├── parse_drug_products.html │ ├── parse_drug_reactions.html │ ├── parse_drug_reactions_enzymes.html │ ├── parse_drug_salts.html │ ├── parse_drug_sequences.html │ ├── parse_drug_snp_adverse_drug_reactions.html │ ├── parse_drug_snp_effects.html │ ├── parse_drug_syn.html │ ├── parse_drug_synonyms.html │ ├── parse_drug_targ.html │ ├── parse_drug_targ_actions.html │ ├── parse_drug_targ_articles.html │ ├── parse_drug_targ_links.html │ ├── parse_drug_targ_polys.html │ ├── parse_drug_targ_polys_pfams.html │ ├── parse_drug_targ_textbooks.html │ ├── parse_drug_targets.html │ ├── parse_drug_targets_actions.html │ ├── parse_drug_targets_articles.html │ ├── parse_drug_targets_links.html │ ├── parse_drug_targets_polypeptides.html │ ├── parse_drug_targets_polypeptides_external_identifiers.html │ ├── parse_drug_targets_polypeptides_go_classifiers.html │ ├── parse_drug_targets_polypeptides_pfams.html │ ├── parse_drug_targets_polypeptides_synonyms.html │ ├── parse_drug_targets_textbooks.html │ ├── parse_drug_trans_actions.html │ ├── parse_drug_trans_articles.html │ ├── parse_drug_trans_links.html │ ├── parse_drug_trans_polys.html │ ├── parse_drug_trans_textbooks.html │ ├── parse_drug_transporters.html │ ├── parse_drug_transporters_actions.html │ ├── parse_drug_transporters_articles.html │ ├── parse_drug_transporters_links.html │ ├── parse_drug_transporters_polypeptides.html │ ├── parse_drug_transporters_polypeptides_external_identifiers.html │ ├── parse_drug_transporters_polypeptides_go_classifiers.html │ ├── parse_drug_transporters_polypeptides_pfams.html │ ├── parse_drug_transporters_polypeptides_synonyms.html │ ├── parse_drug_transporters_textbooks.html │ ├── parse_enzy_poly.html │ ├── parse_enzy_poly_ext_identitys.html │ ├── parse_enzy_poly_go.html │ ├── parse_enzy_poly_pfams.html │ ├── parse_enzy_poly_syn.html │ ├── parse_references_node.html │ ├── parse_snp_adverse_reactions.html │ ├── parse_targ_poly_ext_identity.html │ ├── parse_targ_poly_go.html │ ├── parse_targ_poly_syn.html │ ├── parse_trans_poly_ex_identity.html │ ├── parse_trans_poly_go.html │ ├── parse_trans_poly_pfams.html │ ├── parse_trans_poly_syn.html │ ├── read_drugbank_xml_db.html │ ├── references.html │ ├── references_node_options.html │ ├── run_all_parsers.html │ ├── show_dvobject_metadata.html │ ├── snp_adverse_reactions.csv │ ├── targets.html │ ├── targets_actions.html │ ├── targets_articles.html │ ├── targets_links.html │ ├── targets_polypeptide.html │ ├── targets_polypeptide_ext_ident.html │ ├── targets_polypeptide_go.html │ ├── targets_polypeptide_pfams.html │ ├── targets_polypeptide_syn.html │ ├── targets_textbooks.html │ ├── transporters.html │ ├── transporters_actions.html │ ├── transporters_articles.html │ ├── transporters_links.html │ ├── transporters_polypep_ex_ident.html │ ├── transporters_polypeptide.html │ ├── transporters_polypeptide_go.html │ ├── transporters_polypeptide_pfams.html │ ├── transporters_polypeptide_syn.html │ └── transporters_textbooks.html └── sitemap.xml ├── inst ├── CITATION ├── drug_groups.RDS ├── drugs.RDS ├── extdata │ ├── drugbank_record.xml │ ├── drugbank_record.zip │ ├── drugbank_record_biotech.xml │ └── drugbank_record_small_molecule.xml └── targets_actions.RDS ├── man ├── add_drugbank_info.Rd ├── articles.Rd ├── attachments.Rd ├── books.Rd ├── cett_actions_doc.Rd ├── cett_doc.Rd ├── cett_ex_identity_doc.Rd ├── cett_go_doc.Rd ├── cett_nodes_options.Rd ├── cett_poly_doc.Rd ├── cett_poly_pfms_doc.Rd ├── cett_poly_syn_doc.Rd ├── dbparser.Rd ├── drug_affected_organisms.Rd ├── drug_ahfs_codes.Rd ├── drug_atc_codes.Rd ├── drug_calc_prop.Rd ├── drug_categories.Rd ├── drug_classification.Rd ├── drug_dosages.Rd ├── drug_ex_identity.Rd ├── drug_exp_prop.Rd ├── drug_external_links.Rd ├── drug_food_interactions.Rd ├── drug_general_information.Rd ├── drug_groups.Rd ├── drug_interactions.Rd ├── drug_intern_brand.Rd ├── drug_manufacturers.Rd ├── drug_mixtures.Rd ├── drug_node_options.Rd ├── drug_packagers.Rd ├── drug_patents.Rd ├── drug_pathway.Rd ├── drug_pathway_drugs.Rd ├── drug_pathway_enzyme.Rd ├── drug_pdb_entries.Rd ├── drug_pharmacology.Rd ├── drug_prices.Rd ├── drug_products.Rd ├── drug_reactions.Rd ├── drug_reactions_enzymes.Rd ├── drug_salts.Rd ├── drug_sequences.Rd ├── drug_snp_adverse_reactions.Rd ├── drug_snp_effects.Rd ├── drug_syn.Rd ├── figures │ ├── README-pressure-1.png │ ├── README-unnamed-chunk-2-1.png │ ├── README-unnamed-chunk-3-1.png │ ├── README-unnamed-chunk-4-1.png │ └── logo.png ├── init_dvobject.Rd ├── links.Rd ├── parseDrugBank.Rd ├── parse_cett_node.Rd ├── parse_drug_nodes.Rd ├── parse_references_node.Rd ├── read_drugbank_xml_db.Rd ├── references_node_options.Rd └── show_dvobject_metadata.Rd ├── pkgdown └── favicon │ ├── apple-touch-icon-120x120.png │ ├── apple-touch-icon-60x60.png │ ├── apple-touch-icon-76x76.png │ ├── apple-touch-icon.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ └── favicon.ico ├── tests ├── testthat.R └── testthat │ ├── _snaps │ └── drugbank-parser.md │ ├── test-drugbank-parser.R │ └── test_dvobject_metadata.R └── vignettes ├── .gitignore ├── dbparser.Rmd └── maria_tables.png /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^CRAN-RELEASE$ 2 | ^cran-comments\.md$ 3 | ^CODE_OF_CONDUCT\.md$ 4 | ^CONTRIBUTING\.md$ 5 | ^README\.Rmd$ 6 | ^\.travis\.yml$ 7 | ^.*\.Rproj$ 8 | ^\.Rproj\.user$ 9 | ^\.github$ 10 | ^docs$ 11 | ^codemeta\.json$ 12 | ^appveyor\.yml$ 13 | ^_pkgdown\.yml$ 14 | ^pkgdown$ 15 | ^doc$ 16 | ^Meta$ 17 | ^CRAN-SUBMISSION$ 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/r.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | # 6 | # See https://github.com/r-lib/actions/tree/master/examples#readme for 7 | # additional example workflows available for the R community. 8 | 9 | name: R 10 | 11 | on: 12 | push: 13 | branches: [ "master" ] 14 | pull_request: 15 | branches: [ "master" ] 16 | 17 | permissions: 18 | contents: read 19 | 20 | jobs: 21 | build: 22 | runs-on: macos-latest 23 | strategy: 24 | matrix: 25 | r-version: ['3.6.3', '4.1.1', '4.2.3' , '4.3.2'] 26 | 27 | steps: 28 | - uses: actions/checkout@v3 29 | - name: Set up R ${{ matrix.r-version }} 30 | uses: r-lib/actions/setup-r@f57f1301a053485946083d7a45022b278929a78a 31 | with: 32 | r-version: ${{ matrix.r-version }} 33 | - name: Install dependencies 34 | run: | 35 | install.packages(c("remotes", "rcmdcheck")) 36 | remotes::install_deps(dependencies = TRUE) 37 | shell: Rscript {0} 38 | - name: Check 39 | run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") 40 | shell: Rscript {0} 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | inst/doc 2 | .Rproj.user 3 | .Rhistory 4 | .RData 5 | .Ruserdata 6 | # History files 7 | .Rapp.history 8 | 9 | # Session Data files 10 | # Example code in package build process 11 | *-Ex.R 12 | # Output files from R CMD build 13 | /*.tar.gz 14 | # Output files from R CMD check 15 | /*.Rcheck/ 16 | # RStudio files 17 | .Rproj.user/ 18 | # produced vignettes 19 | vignettes/*.html 20 | vignettes/*.pdf 21 | # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 22 | .httr-oauth 23 | # knitr and R markdown default cache directories 24 | /*_cache/ 25 | /cache/ 26 | # Temporary files created by R markdown 27 | *.utf8.md 28 | *.knit.md 29 | # Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html 30 | rsconnect/ 31 | doc 32 | Meta 33 | /doc/ 34 | /Meta/ 35 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # R for travis: see documentation at https://docs.travis-ci.com/user/languages/r 2 | 3 | language: R 4 | sudo: false 5 | cache: packages 6 | 7 | r_packages: 8 | - covr 9 | - goodpractice 10 | 11 | after_success: 12 | - Rscript -e 'library(covr); codecov()' 13 | - Rscript -e 'Sys.setenv(NOT_CRAN = "true"); goodpractice::gp()' 14 | - Rscript -e 'library(pkgdown); build_site()' 15 | 16 | before_cache: Rscript -e 'remotes::install_cran("pkgdown")' 17 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at mohammed.ali@edu.dsti.institute. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to dbparser 2 | 3 | 4 | 5 | First of all, thanks for considering contributing to dbparser! 👍 It's people like you that make it rewarding for us - the project maintainers - to work on dbparser. 😊 6 | 7 | dbparser is an open source project, maintained by people who care. We are not directly funded to do so. 8 | 9 | [repo]: https://github.com/ropensci/dbparser 10 | [issues]: https://github.com/ropensci/dbparser/issues 11 | [new_issue]: https://github.com/ropensci/dbparser/issues/new 12 | [website]: https://docs.ropensci.org/dbparser/ 13 | [citation]: https://docs.ropensci.org/dbparser/authors.html 14 | [email]: mohammed.ali@edu.dsti.institute 15 | 16 | ## Code of conduct 17 | 18 | Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. 19 | 20 | ## How you can contribute 21 | 22 | There are several ways you can contribute to this project. If you want to know more about why and how to contribute to open source projects like this one, see this [Open Source Guide](https://opensource.guide/how-to-contribute/). 23 | 24 | ### Share the love ❤️ 25 | 26 | Think **dbparser** is useful? Let others discover it, by telling them in person, via Twitter or a blog post. 27 | 28 | Using **dbparser** for a paper you are writing? Consider [citing it][citation]. 29 | 30 | ### Ask a question ⁉️ 31 | 32 | Using our_package and got stuck? Browse the [documentation][website] to see if you can find a solution. Still stuck? Post your question as an [issue on GitHub][new_issue]. While we cannot offer user support, we'll try to do our best to address it, as questions often lead to better documentation or the discovery of bugs. 33 | 34 | Want to ask a question in private? Contact the package maintainer by [email][email]. 35 | 36 | ### Propose an idea 💡 37 | 38 | Have an idea for a new our_package feature? Take a look at the [documentation][website] and [issue list][issues] to see if it isn't included or suggested yet. If not, suggest your idea as an [issue on GitHub][new_issue]. While we can't promise to implement your idea, it helps to: 39 | 40 | * Explain in detail how it would work. 41 | * Keep the scope as narrow as possible. 42 | 43 | See below if you want to contribute code for your idea as well. 44 | 45 | ### Report a bug 🐛 46 | 47 | Using our_package and discovered a bug? That's annoying! Don't let others have the same experience and report it as an [issue on GitHub][new_issue] so we can fix it. A good bug report makes it easier for us to do so, so please include: 48 | 49 | * Your operating system name and version (e.g. Mac OS 10.13.6). 50 | * Any details about your local setup that might be helpful in troubleshooting. 51 | * Detailed steps to reproduce the bug. 52 | 53 | ### Improve the documentation 📖 54 | 55 | Noticed a typo on the website? Think a function could use a better example? Good documentation makes all the difference, so your help to improve it is very welcome! 56 | 57 | #### The website 58 | 59 | [This website][website] is generated with [`pkgdown`](http://pkgdown.r-lib.org/). That means we don't have to write any html: content is pulled together from documentation in the code, vignettes, [Markdown](https://guides.github.com/features/mastering-markdown/) files, the package `DESCRIPTION` and `_pkgdown.yml` settings. If you know your way around `pkgdown`, you can [propose a file change](https://help.github.com/articles/editing-files-in-another-user-s-repository/) to improve documentation. If not, [report an issue][new_issue] and we can point you in the right direction. 60 | 61 | #### Function documentation 62 | 63 | Functions are described as comments near their code and translated to documentation using [`roxygen2`](https://klutometis.github.io/roxygen/). If you want to improve a function description: 64 | 65 | 1. Go to `R/` directory in the [code repository][repo]. 66 | 2. Look for the file with the name of the function. 67 | 3. [Propose a file change](https://help.github.com/articles/editing-files-in-another-user-s-repository/) to update the function documentation in the roxygen comments (starting with `#'`). 68 | 69 | ### Contribute code 📝 70 | 71 | Care to fix bugs or implement new functionality for our_package? Awesome! 👏 Have a look at the [issue list][issues] and leave a comment on the things you want to work on. See also the development guidelines below. 72 | 73 | ## Development guidelines 74 | 75 | We try to follow the [GitHub flow](https://guides.github.com/introduction/flow/) for development. 76 | 77 | 1. Fork [this repo][repo] and clone it to your computer. To learn more about this process, see [this guide](https://guides.github.com/activities/forking/). 78 | 2. If you have forked and cloned the project before and it has been a while since you worked on it, [pull changes from the original repo](https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/) to your clone by using `git pull upstream master`. 79 | 3. Open the RStudio project file (`.Rproj`). 80 | 5. Make your changes: 81 | * Write your code. 82 | * Test your code (bonus points for adding unit tests). 83 | * Document your code (see function documentation above). 84 | * Check your code with `devtools::check()` and aim for 0 errors and warnings. 85 | 5. Commit and push your changes. 86 | 6. Submit a [pull request](https://guides.github.com/activities/forking/#making-a-pull-request). 87 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: dbparser 2 | Title: Drugs Databases Parser 3 | Version: 2.0.3 4 | Authors@R: 5 | c( 6 | person("Mohammed", "Ali", email = "moh_fcis@yahoo.com", role = c("aut", "cre")), 7 | person("Ali", "Ezzat", email = "ali_ezzat85@yahoo.com", role = "aut"), 8 | person("Hao", "Zhu", email = "haozhu233@gmail.com", role = "rev"), 9 | person("Emma", "Mendelsohn", email = "", role = "rev")) 10 | Description: This tool is for parsing public drug databases such as 'DrugBank' XML database . 11 | The parsed data are then returned in a proper 'R' object called 'dvobject'. 12 | License: MIT + file LICENSE 13 | Encoding: UTF-8 14 | Imports: 15 | dplyr, 16 | progress, 17 | purrr, 18 | tibble, 19 | tools, 20 | XML 21 | RoxygenNote: 7.2.3 22 | Suggests: 23 | canvasXpress, 24 | knitr, 25 | rmarkdown, 26 | testthat, 27 | tidyr 28 | VignetteBuilder: knitr 29 | URL: https://docs.ropensci.org/dbparser/, https://github.com/ropensci/dbparser 30 | BugReports: https://github.com/ropensci/dbparser/issues 31 | Depends: 32 | R (>= 3.5) 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | YEAR: 2018 2 | COPYRIGHT HOLDER: Mohammed Ali, Ali Ezzat 3 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(cett_nodes_options) 4 | export(drug_node_options) 5 | export(parseDrugBank) 6 | export(references_node_options) 7 | export(show_dvobject_metadata) 8 | import(dplyr) 9 | importFrom(XML,xmlApply) 10 | importFrom(XML,xmlChildren) 11 | importFrom(XML,xmlGetAttr) 12 | importFrom(XML,xmlParse) 13 | importFrom(XML,xmlRoot) 14 | importFrom(XML,xmlSApply) 15 | importFrom(XML,xmlSize) 16 | importFrom(XML,xmlToDataFrame) 17 | importFrom(XML,xmlToList) 18 | importFrom(XML,xmlValue) 19 | importFrom(progress,progress_bar) 20 | importFrom(purrr,'%>%') 21 | importFrom(purrr,is_empty) 22 | importFrom(purrr,is_null) 23 | importFrom(purrr,map_chr) 24 | importFrom(purrr,map_df) 25 | importFrom(tibble,as_tibble) 26 | importFrom(tibble,as_tibble_row) 27 | importFrom(tibble,tibble) 28 | importFrom(tibble,tibble_row) 29 | importFrom(utils,stack) 30 | importFrom(utils,unzip) 31 | -------------------------------------------------------------------------------- /NEWS.md: -------------------------------------------------------------------------------- 1 | # dbparser 2.0.3 2 | 3 | ## Enhancements 4 | - Updated unit tests with latest DrugBank DB info v 5.1.12 5 | 6 | ## Bugs Fixes 7 | 8 | - Fixed "Drug Targets has two `drugbank_id` columns" bug (#163) 9 | 10 | 11 | ---- 12 | 13 | # dbparser 2.0.2 14 | 15 | ## Enhancements 16 | - Replaced "-" with "_" in tibbles column names (#111) 17 | - Renamed "primary_key" to "drugbank_id" in parsed drugs "general_information" tibble (#111) 18 | - Replaced "parent_key" keywords in different tibbles column names with original parent name (#111) 19 | - Updated Vignette to use interactive [canvasXpress](https://canvasxpress.org) package plots 20 | 21 | ---- 22 | 23 | # dbparser 2.0.1 24 | 25 | ## Bugs Fixes 26 | * Fixed output references (#147) 27 | * Updated `parseDrugBanK`parameters default values (#146) 28 | * Fixed package documentation references (#144) 29 | * Fixed CRAN error on some of linux info (#145) 30 | 31 | ----------- 32 | 33 | # dbparser 2.0.0 34 | 35 | ## Breaking changes 36 | * Deprecated saving parsed data into given database (#140) 37 | * Deprecated saving parsed data into a csv file (#140) 38 | * Deprecated old structure public methods (#141) 39 | * Updated minimum R required version to 3.5 (#143) 40 | 41 | ## New features 42 | * Introduced new methods for paring DrugBank DB and returning dvobject (#141) 43 | 44 | ## Major Updates 45 | * Updated unit tests to work with new data structure (#141) 46 | 47 | ## Minor Fixes 48 | * Removed RMariaDB dependency (#129) 49 | * Fix pkgdown configuration for reference (#136) 50 | 51 | ----------- 52 | 53 | # dbparser 1.2.0 54 | 55 | ## UI Changes 56 | * Introduce progress bar in parser functions 57 | 58 | ## New Parsers 59 | ### Collective Parsers 60 | * `drugs`, `cett` and `References` Parsers 61 | 62 | ### Elements Parsers 63 | * `attachments` parsers for drugs and CETT 64 | * `drug_pharmacology` parser 65 | * Rename `drugs_books` parser to `drugs_textbooks` 66 | * Rename `drug_all` parser to `run_all_parsers` 67 | * Rename `drug` parser to `drug_general_information` 68 | 69 | ## Documentation Update: 70 | * Add returned parsed data structure 71 | * Explain the returned data functionality as a whole and for each elements 72 | * Point out to related/similar parsers 73 | 74 | ## Package design 75 | For those who thinking to contribute in `dbparser`, now parsers are implemented 76 | as R6 classes. 77 | 78 | ## Minor Fixes 79 | * Update database saver functions to accommodate new DrugBank data size. 80 | 81 | ----------- 82 | 83 | # dbparser 1.1.2 84 | 85 | ### Major Changes 86 | * Enhance many memory and performance issues for many parsers. 87 | * Change the drug classification representations to extract more useful 88 | information. 89 | ### Minor Changes 90 | * Change some drug tibbles features names 91 | ### DEFUNCT 92 | * Size columns in `drugs` main table is no longer exist, will do full 93 | statistical analysis later using dvminer package. 94 | 95 | ----------- 96 | 97 | # dbparser 1.1.1 98 | 99 | * Fix column size issue while importing into SQL Server (#91) 100 | * Fix dbparser and upcoming CRAN release of dplyr issues (#92) 101 | * Fix CRAN Notes (#93) 102 | * Fix package documentation and site references 103 | 104 | ----------- 105 | 106 | # dbparser 1.1.0 107 | ### Major Changes 108 | * Functions have been splitted into 6 categories *DrugBank Database Loading, 109 | Carriers, Targets, Transporters, Drug and common parsers*. All function names 110 | are changed to reflect the function family. The related documentation is also 111 | updated (#66, #75). 112 | * `dbparser` now can cite the package by calling `citation("dbparser")` (#71). 113 | * Adding more user friendly error messages (#76, #81). 114 | * User can now pass `DBI` database connection to parser functions as an 115 | argument beside *SQLite* and *MariaDB* (#87). 116 | 117 | ### DEFUNCT 118 | * `open_db`, `open_mdb` and `close_db` functions are no longer supported. 119 | Creating and maintaining database is completely user responsibility and the 120 | database connection can be passed to parser functions (#87). 121 | 122 | ### DOCUMENTATION FIXES 123 | * New tutorials for how to use `dbparser` have been created (#78, #79). 124 | * Contribution guide has been added. 125 | * Code of conduct has been added (#70). 126 | * Enhance function reference documentation to include section for each type (#68). 127 | 128 | ----------- 129 | 130 | # dbparser 1.0.4 131 | * Fix save drugs tibbles as csv several issues. 132 | * Update SQL database tibbles saver functions. 133 | * Update SQL database saver functions documentations. 134 | * Support MariaDB and introduce related functionalities. 135 | 136 | ----------- 137 | 138 | # dbparser 1.0.3 139 | * Fix CRAN errors and notes 140 | 141 | ----------- 142 | 143 | # dbparser 1.0.2 144 | * Fix zip file location issue 145 | * Replace Secondary and third keys columns from drug framework with *other_keys* column that contains any other keys that might exist in addition to the primary key 146 | * Add **average-mass**, **monoisotopic-mass** and **calculated-properties** parsers. 147 | * Support saving parsed drugs related parsed database as csv 148 | 149 | ----------- 150 | 151 | # dbparser 1.0.1 152 | * Fix CRAN Note 153 | * Improve documentation 154 | * Refactor unused functions 155 | * Remove *Count* features from drug data set 156 | * Fix several typos in documentation and code 157 | * Fix consistency issue of CLASS of tibbles Returned by dbparser 158 | * Check if DrugBank database exist before parsing 159 | * Add support for *international_brands* and *salts* elements 160 | * Properly rename some features to have clear names 161 | * Reduce datasets size by getting unique rows only 162 | * Support reading zip file containing DrugBank xml database 163 | 164 | ----------- 165 | 166 | # dbparser 1.0.0 167 | 168 | * Initial release that contains core functionalities 169 | -------------------------------------------------------------------------------- /R/abstract_parser.R: -------------------------------------------------------------------------------- 1 | AbstractParser <- R6::R6Class( 2 | "AbstractParser", 3 | public = list( 4 | initialize = function(tibble_name = NULL, 5 | object_node = NULL, 6 | main_node = NULL, 7 | secondary_node = NULL, 8 | id = NULL) { 9 | private$tibble_name <- tibble_name 10 | private$object_node <- object_node 11 | private$main_node <- main_node 12 | private$secondary_node <- secondary_node 13 | private$id <- id 14 | 15 | }, 16 | parse = function() { 17 | parsed_tbl <- private$parse_record() 18 | parsed_tbl <- as_tibble(parsed_tbl) 19 | names(parsed_tbl) <- gsub(pattern = "-", 20 | replacement = "_", 21 | x = names(parsed_tbl)) 22 | parsed_tbl 23 | } 24 | ), 25 | private = list( 26 | tibble_name = NULL, 27 | object_node = NULL, 28 | main_node = NULL, 29 | secondary_node = NULL, 30 | id = NULL, 31 | parse_record = function() { 32 | message("I am the abstract parser, please use proper parser") 33 | } 34 | ) 35 | ) 36 | -------------------------------------------------------------------------------- /R/cett_actions_parsers.R: -------------------------------------------------------------------------------- 1 | CETTActionsParser <- 2 | R6::R6Class( 3 | "CETTActionsParser", 4 | inherit = AbstractParser, 5 | private = list( 6 | parse_record = function() { 7 | cett_type <- strsplit(private$tibble_name, "_")[[1]][1] 8 | drugs <- xmlChildren(pkg_env$root) 9 | pb <- progress_bar$new(total = xmlSize(drugs)) 10 | actions_tbl <- 11 | map_df(drugs, ~ private$actions_rec(., cett_type, pb)) %>% unique() 12 | if (NROW(actions_tbl) > 0) { 13 | colnames(actions_tbl) <- c("action", 14 | paste0(substr(x = cett_type, 15 | start = 1, 16 | stop = nchar(cett_type)-1), 17 | "_id")) 18 | } 19 | 20 | actions_tbl 21 | }, 22 | actions_rec = function(rec, cett_type, pb) { 23 | pb$tick() 24 | map_df(xmlChildren(rec[[cett_type]]), 25 | ~ drug_sub_df(., "actions", id = "id")) 26 | } 27 | ) 28 | ) 29 | 30 | #' Carriers/ Enzymes/ Targets/ Transporters Actions parsers 31 | #' 32 | #' Collection of related actions 33 | #' 34 | #' @return a tibble with 2 variables: 35 | #' \describe{ 36 | #' \item{action}{describe related action} 37 | #' \item{\emph{parent_id}}{carrier/ target/ enzyme/ transporter id} 38 | #' } 39 | #' @keywords internal 40 | #' @name cett_actions_doc 41 | NULL 42 | 43 | #' @rdname cett_actions_doc 44 | carriers_actions <- function() { 45 | CETTActionsParser$new( 46 | "carriers_actions" 47 | )$parse() 48 | } 49 | 50 | #' @rdname cett_actions_doc 51 | enzymes_actions <- function() { 52 | CETTActionsParser$new( 53 | "enzymes_actions" 54 | )$parse() 55 | } 56 | 57 | #' @rdname cett_actions_doc 58 | targets_actions <- function() { 59 | CETTActionsParser$new( 60 | "targets_actions" 61 | )$parse() 62 | } 63 | 64 | #' @rdname cett_actions_doc 65 | transporters_actions <- function() { 66 | CETTActionsParser$new( 67 | "transporters_actions" 68 | )$parse() 69 | } 70 | -------------------------------------------------------------------------------- /R/cett_general_information_parsers.R: -------------------------------------------------------------------------------- 1 | CETTGeneralInformationParser <- 2 | R6::R6Class( 3 | "CETTGeneralInformationParser", 4 | inherit = AbstractParser, 5 | private = list( 6 | parse_record = function() { 7 | drugs <- xmlChildren(pkg_env$root) 8 | pb <- progress_bar$new(total = xmlSize(drugs)) 9 | 10 | cett_table <- map_df(drugs, ~ private$cett_rec(., private$tibble_name, pb)) %>% 11 | unique() 12 | 13 | if (NROW(cett_table) > 0) { 14 | cett_table <- rename(cett_table, !!(paste0(substr(x = private$tibble_name, 15 | start = 1, 16 | stop = nchar(private$tibble_name)-1), 17 | "_id")) := id) 18 | } 19 | }, 20 | cett_rec = function(rec, tibble_name, pb) { 21 | pb$tick() 22 | drugbank_id <- xmlValue(rec[["drugbank-id"]]) 23 | map_df(xmlChildren(rec[[tibble_name]]), 24 | ~ private$organizm_rec(., drugbank_id)) 25 | }, 26 | organizm_rec = function(r, drug_key) { 27 | org <- tibble_row( 28 | id = xmlValue(r[["id"]]), 29 | name = xmlValue(r[["name"]]), 30 | organism = xmlValue(r[["organism"]]), 31 | known_action = xmlValue(r[["known-action"]]), 32 | position = ifelse(is.null(xmlGetAttr(r, name = "position")), 33 | NA, 34 | xmlGetAttr(r, name = "position")), 35 | drugbank_id = drug_key 36 | ) 37 | 38 | if (!is.null(r[["inhibition-strength"]])) { 39 | org[["inhibition-strength"]] <- xmlValue(r[["inhibition-strength"]]) 40 | } 41 | 42 | if (!is.null(r[["induction-strength"]])) { 43 | org[["induction-strength"]] <- xmlValue(r[["induction-strength"]]) 44 | } 45 | 46 | org 47 | } 48 | ) 49 | ) 50 | 51 | #' Carriers/ Enzymes/ Targets/ Transporters parsers 52 | #' 53 | #' Protein targets of drug action, enzymes that are inhibited/induced or 54 | #' involved in metabolism, and carrier or transporter proteins involved in 55 | #' movement of the drug across biological membranes. 56 | #' 57 | #' 58 | #' @return a tibble with 6 variables (8 for enzymes): 59 | #' \describe{ 60 | #' \item{id}{Universal Protein Resource (UniProt) Identifier for the record} 61 | #' \item{name}{related name} 62 | #' \item{organism}{Organism that the protein comes from.} 63 | #' \item{known_action}{Whether the pharmacological action of the drug is due 64 | #' to this target interaction.} 65 | #' \item{inhibition-strength}{Whether the strength of enzyme inhibition is 66 | #' strong, moderate, or unknown. \strong{Only applies to enzymes}} 67 | #' \item{induction-strength}{Whether the strength of enzyme induction is 68 | #' strong or unknown. \strong{Only applies to enzymes}} 69 | #' \item{position}{related position} 70 | #' \item{parent_id}{drugbank id} 71 | #' } 72 | #' @keywords internal 73 | #' @name cett_doc 74 | NULL 75 | 76 | #' @rdname cett_doc 77 | carriers <- function() { 78 | CETTGeneralInformationParser$new("carriers")$parse() 79 | } 80 | 81 | 82 | #' @rdname cett_doc 83 | enzymes <- function() { 84 | CETTGeneralInformationParser$new("enzymes")$parse() 85 | } 86 | 87 | 88 | #' @rdname cett_doc 89 | targets <- function() { 90 | CETTGeneralInformationParser$new("targets")$parse() 91 | } 92 | 93 | 94 | #' @rdname cett_doc 95 | transporters <- function() { 96 | CETTGeneralInformationParser$new( 97 | "transporters")$parse() 98 | } 99 | -------------------------------------------------------------------------------- /R/cett_polypeptide_general_infromation_parsers.R: -------------------------------------------------------------------------------- 1 | CETTPolyGeneralInfoParser <- 2 | R6::R6Class( 3 | "CETTPolyGeneralInfoParser", 4 | inherit = AbstractParser, 5 | private = list( 6 | parse_record = function() { 7 | cett_type <- strsplit(private$tibble_name, "_")[[1]][1] 8 | drugs <- xmlChildren(pkg_env$root) 9 | pb <- progress_bar$new(total = xmlSize(drugs)) 10 | polypeptides_tbl <- 11 | map_df(drugs, 12 | ~ private$polypeptides_parser(., cett_type, pb)) %>% unique() 13 | }, 14 | polypeptides_parser = function(rec, cett_type, pb) { 15 | pb$tick() 16 | parent_name <- paste0(substr(x = cett_type, 17 | start = 1, 18 | stop = nchar(cett_type)-1), 19 | "_id") 20 | map_df(xmlChildren(rec[[cett_type]]), 21 | ~ private$polypeptide_rec(., parent_name)) 22 | }, 23 | polypeptide_rec = function(r, parent_name) { 24 | p_table <- NULL 25 | parent_id <- xmlValue(r[["id"]]) 26 | p <- r[["polypeptide"]] 27 | 28 | if (!is.null(p)) { 29 | p_table <- tibble( 30 | polypeptide_id = ifelse(is.null(xmlGetAttr(p, name = "id")), NA, 31 | xmlGetAttr(p, name = "id")), 32 | source = ifelse(is.null(xmlGetAttr(p, 33 | name = "source")), NA, 34 | xmlGetAttr(p, name = "source")), 35 | name = xmlValue(p[["name"]]), 36 | general_function = xmlValue(p[["general-function"]]), 37 | specific_function = xmlValue(p[["specific-function"]]), 38 | gene_name = xmlValue(p[["gene-name"]]), 39 | locus = xmlValue(p[["locus"]]), 40 | cellular_location = xmlValue(p[["cellular-location"]]), 41 | transmembrane_regions = xmlValue(p[["transmembrane-regions"]]), 42 | signal_regions = xmlValue(p[["signal-regions"]]), 43 | theoretical_pi = xmlValue(p[["theoretical-pi"]]), 44 | molecular_weight = xmlValue(p[["molecular-weight"]]), 45 | chromosome_location = xmlValue(p[["chromosome_location"]]), 46 | organism = xmlValue(p[["organism"]]), 47 | organism_ncbi_taxonomy_id = xmlGetAttr(p[["organism"]], 48 | name = "ncbi-taxonomy-id"), 49 | amino_acid_sequence = xmlValue(p[["amino-acid-sequence"]]), 50 | amino_acid_format = xmlGetAttr(p[["amino-acid-sequence"]], 51 | name = "format"), 52 | gene_sequence = xmlValue(p[["gene-sequence"]]), 53 | gene_format = xmlGetAttr(p[["gene-sequence"]], 54 | name = "format") 55 | ) 56 | 57 | p_table[[parent_name]] <- parent_id 58 | } 59 | 60 | p_table 61 | } 62 | ) 63 | ) 64 | 65 | #' Carriers/ Enzymes/ Targets/ Transporters Polypeptide parsers 66 | #' 67 | #' Extract descriptions of identified polypeptide targets, enzymes, carriers, 68 | #' or transporters. 69 | #' 70 | #' 71 | #' @return a tibble with 20 variables: 72 | #' \describe{ 73 | #' \item{id}{\href{https://www.uniprot.org/}{Universal Protein Resource 74 | #' (UniProt) identifier}} 75 | #' \item{source}{Specifies whether the identified polypeptide ID is 76 | #' associated with any of the following UniProt knowledge bases: 77 | #' Swiss-Prot, which is manually annotated and reviewed, or TrEMBL, 78 | #' which is automatically annotated and not reviewed.} 79 | #' \item{name}{} 80 | #' \item{general_function}{General summary of the physiological function of 81 | #' the polypeptide} 82 | #' \item{specific_function}{A more specific description of the polypeptide’s 83 | #' physiological function within the cell.} 84 | #' \item{gene_name}{The short name commonly associated with the associated 85 | #' gene. Eg. PTGS1.} 86 | #' \item{locus}{The specific chromosomal location or position of the gene’s 87 | #' sequence on a chromosome.} 88 | #' \item{cellular_location}{The cellular location of the polypeptide.} 89 | #' \item{transmembrane_regions}{Areas of the polypeptide sequence that span 90 | #' a biological membrane.} 91 | #' \item{signal_regions}{Location of any signal peptides within the 92 | #' polypeptide sequence.} 93 | #' \item{theoretical_pi}{Theoretical isoelectric point.} 94 | #' \item{molecular_weight}{The molecular weight of the polypeptide.} 95 | #' \item{chromosome_location}{The chromosomal location of the polypeptide 96 | #' gene} 97 | #' \item{organism}{The organism in which this polypeptide functions.} 98 | #' \item{organism_ncbi_taxonomy_id}{} 99 | #' \item{amino_acid_sequence}{The amino acid sequence of the polypeptide} 100 | #' \item{amino_acid_format}{} 101 | #' \item{gene_sequence}{The sequence of the associated gene.} 102 | #' \item{gene_format}{} 103 | #' \item{parent_key}{carrier/ target/ enzyme/ transporter id} 104 | #' } 105 | #' @keywords internal 106 | #' @name cett_poly_doc 107 | NULL 108 | 109 | #' @rdname cett_poly_doc 110 | carriers_polypeptides <- function() { 111 | CETTPolyGeneralInfoParser$new( 112 | "carriers_polypeptides" 113 | )$parse() 114 | } 115 | 116 | #' @rdname cett_poly_doc 117 | enzymes_polypeptides <- function() { 118 | CETTPolyGeneralInfoParser$new( 119 | "enzymes_polypeptides" 120 | )$parse() 121 | } 122 | 123 | #' @rdname cett_poly_doc 124 | targets_polypeptides <- function() { 125 | CETTPolyGeneralInfoParser$new( 126 | "targets_polypeptides" 127 | )$parse() 128 | } 129 | 130 | #' @rdname cett_poly_doc 131 | transporters_polypeptides <- function() { 132 | CETTPolyGeneralInfoParser$new( 133 | "transporters_polypeptides" 134 | )$parse() 135 | } 136 | -------------------------------------------------------------------------------- /R/dbparser-package.R: -------------------------------------------------------------------------------- 1 | #' dbparser: A package for reading and parsing \strong{DrugBank} xml database. 2 | #' 3 | #' The main purpose of the `dbparser` package is to parse 4 | #' [DrugBank](https://go.drugbank.com/) database which is downloadable in XML format 5 | #' from [this link](https://go.drugbank.com/releases/latest). 6 | #' 7 | #' The parsed data can then be explored and analyzed. 8 | #' 9 | #' 10 | #' To achieve this purpose, `dbparser`` package provides three main categories 11 | #' of functions: 12 | #' 13 | #' - xml db reader, 14 | #' 15 | #' - \strong{DrugBank} elements parsers, 16 | #' 17 | #' For more information kindly check the 18 | #' reference/index (https://docs.ropensci.org/dbparser/reference/index.html) 19 | #' 20 | #' 21 | #' @section xml db reader functions: 22 | #' Reads \strong{DrugBank} xml database and build drug elements full tree in 23 | #' memory 24 | #' 25 | #' @section parsers functions: 26 | #' Each parser function is responsible of parsing certain drug element and 27 | #' returning its tibble. 28 | #' 29 | #' Check this tutorial 30 | #' (https://docs.ropensci.org/dbparser/articles/dbparser.html) 31 | #' 32 | #' @docType package 33 | #' @keywords internal 34 | #' @name dbparser 35 | "_PACKAGE" 36 | 37 | ## usethis namespace: start 38 | ## usethis namespace: end 39 | NULL 40 | -------------------------------------------------------------------------------- /R/drug_atc_codes_node_parser.R: -------------------------------------------------------------------------------- 1 | ATCParser <- R6::R6Class( 2 | "ATCParser", 3 | inherit = AbstractParser, 4 | private = list( 5 | parse_record = function() { 6 | drugs <- xmlChildren(pkg_env$root) 7 | pb <- progress_bar$new(total = xmlSize(drugs)) 8 | return(as_tibble(do.call( 9 | rbind, 10 | xmlApply(pkg_env$root, private$atc_recs, pb) 11 | ))) 12 | }, 13 | atc_recs = function(rec, pb) { 14 | pb$tick() 15 | if (xmlSize(rec[["atc-codes"]]) < 1) { 16 | return() 17 | } 18 | atcs <- xmlApply(rec[["atc-codes"]], private$atc_rec) 19 | atcs_tibble <- 20 | as_tibble(do.call(rbind, atcs)) 21 | atcs_tibble[["drugbank-id"]] = xmlValue(rec[["drugbank-id"]]) 22 | return(atcs_tibble) 23 | }, 24 | atc_rec = function(atc) { 25 | c( 26 | atc_code = xmlGetAttr(atc, name = "code"), 27 | level_1 = xmlValue(atc[[1]]), 28 | code_1 = xmlGetAttr(atc[[1]], name = "code"), 29 | level_2 = xmlValue(atc[[2]]), 30 | code_2 = xmlGetAttr(atc[[2]], name = "code"), 31 | level_3 = xmlValue(atc[[3]]), 32 | code_3 = xmlGetAttr(atc[[3]], name = "code"), 33 | level_4 = xmlValue(atc[[4]]), 34 | code_4 = xmlGetAttr(atc[[4]], name = "code") 35 | ) 36 | } 37 | ) 38 | ) 39 | 40 | #' Drug ATC Codes element parser 41 | #' 42 | #' The Anatomical Therapeutic Classification (ATC) code for the drug assigned 43 | #' by the World Health Organization Anatomical Chemical Classification System. 44 | #' 45 | #' Each `atc-code`` row has one or more level. The atc-code and level> 46 | #' have a code the code assigned by the World Health Organization Anatomical 47 | #' Therapeutic Chemical Classification system. 48 | #' 49 | #' 50 | #' @return a tibble with 10 variables 51 | #' @keywords internal 52 | drug_atc_codes <- function() { 53 | ATCParser$new("drug_atc_codes")$parse() 54 | } 55 | -------------------------------------------------------------------------------- /R/drug_classfication_node_parser.R: -------------------------------------------------------------------------------- 1 | ClassificationParser <- R6::R6Class( 2 | "ClassificationParser", 3 | inherit = AbstractParser, 4 | private = list( 5 | parse_record = function() { 6 | drugs <- xmlChildren(pkg_env$root) 7 | pb <- progress_bar$new(total = xmlSize(drugs)) 8 | return(map_df(drugs, ~ private$drug_classifications_df(.x, pb))) 9 | }, 10 | drug_classifications_df = function(rec, pb) { 11 | pb$tick() 12 | if (is.null(rec[["classification"]])) { 13 | return() 14 | } 15 | class_elements <- names(rec[["classification"]]) 16 | c( 17 | description = xmlValue(rec[["classification"]][["description"]]), 18 | direct_parent = xmlValue(rec[["classification"]][["direct-parent"]]), 19 | kingdom = xmlValue(rec[["classification"]][["kingdom"]]), 20 | superclass = xmlValue(rec[["classification"]][["superclass"]]), 21 | class = xmlValue(rec[["classification"]][["class"]]), 22 | subclass = xmlValue(rec[["classification"]][["subclass"]]), 23 | alternative_parents = paste( 24 | map_chr( 25 | rec[["classification"]][class_elements == "alternative-parent"], 26 | xmlValue), 27 | collapse = ";"), 28 | substituents = paste( 29 | map_chr( 30 | rec[["classification"]][class_elements == "substituent"], 31 | xmlValue), collapse = ";"), 32 | drugbank_id = xmlValue(rec[["drugbank-id"]]) 33 | 34 | ) 35 | } 36 | ) 37 | ) 38 | 39 | #' Drug Classification parser 40 | #' 41 | #' A description of the hierarchical chemical classification of the drug; 42 | #' imported from ClassyFire. 43 | #' 44 | #' @return a tibble with 9 variables: 45 | #' \describe{ 46 | #' \item{description}{} 47 | #' \item{direct-parent}{} 48 | #' \item{kingdom}{} 49 | #' \item{superclass}{} 50 | #' \item{class}{} 51 | #' \item{subclass}{} 52 | #' \item{alternative-parent}{One or more alternative parents} 53 | #' \item{substituent}{One or more substituents} 54 | #' \item{\emph{drugbank_id}}{drugbank id} 55 | #' } 56 | #'@keywords internal 57 | drug_classification <- function() { 58 | ClassificationParser$new("drug_classifications")$parse() 59 | } 60 | -------------------------------------------------------------------------------- /R/drug_common_utilities.R: -------------------------------------------------------------------------------- 1 | pkg_env <- new.env(parent = emptyenv()) 2 | pkg_env$root <- NULL 3 | 4 | 5 | drug_sub_df <- 6 | function(rec, 7 | main_node, 8 | seconadary_node = NULL, 9 | id = "drugbank-id", 10 | # remove assinging to NULL after it being applied everywhere 11 | progress = NULL ) { 12 | if (is.null(rec[[main_node]])) { 13 | if (!is.null(progress)) { 14 | progress$tick() 15 | } 16 | return() 17 | } 18 | parent_key <- NULL 19 | if (!is.null(id)) { 20 | parent_key <- xmlValue(rec[id][[1]]) 21 | } 22 | 23 | if (is.null(seconadary_node) && 24 | !is.null(rec[[main_node]])) { 25 | df <- xmlToDataFrame(rec[[main_node]], stringsAsFactors = FALSE) 26 | } else if (!is.null(rec[[main_node]][[seconadary_node]])) { 27 | df <- 28 | xmlToDataFrame(rec[[main_node]][[seconadary_node]], 29 | stringsAsFactors = FALSE 30 | ) 31 | } else { 32 | if (!is.null(progress)) { 33 | progress$tick() 34 | } 35 | return() 36 | } 37 | 38 | if (NROW(df) > 0 && !is.null(parent_key)) { 39 | df$parent_key <- parent_key 40 | } 41 | if (!is.null(progress)) { 42 | progress$tick() 43 | } 44 | 45 | df 46 | } 47 | 48 | 49 | #' Reads \strong{DrugBank} xml database and load it into memory. 50 | #' 51 | #' \code{read_drugbank_xml_db} loads \strong{DrugBank} xml database full tree 52 | #' into memory. 53 | #' 54 | #' This functions reads \strong{DrugBank} xml database and load it into memory 55 | #' for later processing. Hence; this method \strong{must} be called before any 56 | #' other function in the package and it needs to be called one time only. 57 | #' 58 | #' It takes one single mandatory argument which is the location of DrugBank db. 59 | #' 60 | #' @param db_path \strong{string}, full path for the 61 | #' \strong{DrugBank} xml or zip file. 62 | #' 63 | #' @keywords internal 64 | #' @return loaded DB or NULL 65 | read_drugbank_xml_db <- function(db_path) { 66 | message(paste("Loading DrugBank DB from path:", db_path)) 67 | 68 | ext <- tools::file_ext(db_path) 69 | dir_name <- dirname(db_path) 70 | loaded_db <- NULL 71 | 72 | if (!ext %in% c("zip", "xml")) { 73 | message("Unsupported file format, Kindly use an XML or zip file.") 74 | } else { 75 | if (ext == "zip") { 76 | tryCatch({ 77 | unzip(db_path, exdir = dir_name) 78 | db <- unzip(db_path, list = TRUE) 79 | db_path <- paste0(dir_name, "/", db[[1]]) 80 | message(paste("DrugBank DB zip file extraxted at path:", db_path)) 81 | }, 82 | error = function(e) { 83 | message(paste("Loading DrugBank DB failed due to error:", e$message)) 84 | }) 85 | } 86 | 87 | tryCatch({ 88 | if (file.exists(db_path) && 89 | (tolower(tools::file_ext(db_path)) == "xml") && 90 | !is.na(file.info(db_path)$size) && 91 | (file.info(db_path)$size > 0)){ 92 | loaded_db <- xmlParse(db_path) 93 | } else { 94 | message(paste("Could not find the file:", db_path, ".Please ensure", 95 | "that the file name is entered correctly", 96 | "and that it exists at the specified location.") 97 | ) 98 | } 99 | }, 100 | error = function(e) { 101 | message(paste("Parsing db file failed due to error:", e$message)) 102 | }) 103 | } 104 | 105 | loaded_db 106 | } 107 | -------------------------------------------------------------------------------- /R/drug_main_node_parser.R: -------------------------------------------------------------------------------- 1 | DrugParser <- R6::R6Class( 2 | "DrugParser", 3 | inherit = AbstractParser, 4 | private = list( 5 | parse_record = function() { 6 | pb <- progress_bar$new(total = xmlSize(pkg_env$root)) 7 | drugs <- 8 | xmlSApply(xmlRoot(pkg_env$root), private$drug_row, pb) 9 | as_tibble(t(drugs)) 10 | }, 11 | drug_row = function(drug, pb) { 12 | pb$tick() 13 | d_elements <- names(drug) 14 | ids <- drug[d_elements == "drugbank-id"] 15 | ids_length <- length(ids) 16 | ids <- map_chr(ids, xmlValue) 17 | c( 18 | drugbank_id = ids[[1]], 19 | other_keys = ifelse(ids_length > 1, 20 | paste(unlist(ids[2:ids_length]), collapse = ";"), 21 | NA), 22 | type = xmlGetAttr(node = drug, name = "type"), 23 | created = xmlGetAttr(node = drug, name = "created"), 24 | updated = xmlGetAttr(node = drug, name = "updated"), 25 | name = xmlValue(drug[["name"]]), 26 | description = xmlValue(drug[["description"]]), 27 | cas_number = xmlValue(drug[["cas-number"]]), 28 | unii = xmlValue(drug[["unii"]]), 29 | average_mass = xmlValue(drug[["average-mass"]]), 30 | monoisotopic_mass = xmlValue(drug[["monoisotopic-mass"]]), 31 | state = xmlValue(drug[["state"]]), 32 | synthesis_reference = xmlValue(drug[["synthesis-reference"]]), 33 | fda_label = xmlValue(drug[["fda-label"]]), 34 | msds = xmlValue(drug[["msds"]]) 35 | ) 36 | } 37 | ) 38 | ) 39 | 40 | #' Drugs General Information parser 41 | #' 42 | #' A description of the hierarchical chemical classification of the drug; 43 | #' imported from ClassyFire. 44 | #' 45 | #' 46 | #' @return a tibble with 15 variables: 47 | #' \describe{ 48 | #' \item{primary_key}{DrugBank id} 49 | #' \item{other_keys}{Other identifiers that may be associated with the drug} 50 | #' \item{type}{ Either small molecule, or biotech. Biotech is used for any 51 | #' drug that is derived from living systems or organisms, usually composed of 52 | #' high molecular weight mixtures of protein, while small molecule describes 53 | #' a low molecular weight organic compound.} 54 | #' \item{name}{} 55 | #' \item{created}{Date that this drug was first added to DrugBank.} 56 | #' \item{updated}{Denotes when this drug was last updated in DrugBank.} 57 | #' \item{description}{Descriptions of drug chemical properties, 58 | #' history and regulatory status.} 59 | #' \item{cas_number}{The Chemical Abstracts Service (CAS) registry number 60 | #' assigned to the drug.} 61 | #' \item{\emph{unii}}{Unique Ingredient Identifier (UNII) of this drug.} 62 | #' \item{average_mass}{The weighted average of the isotopic masses of the 63 | #' drug} 64 | #' \item{state}{One of solid, liquid, or gas} 65 | #' \item{monoisotopic_mass}{The mass of the most abundant isotope of the drug} 66 | #' \item{synthesis_reference}{Citation for synthesis of the drug molecule.} 67 | #' \item{fda_label}{Contains a URL for accessing the uploaded United States Food 68 | #' and Drug Administration (FDA) Monograph for this drug.} 69 | #' \item{msds}{Contains a URL for accessing the Material Safety Data Sheet 70 | #' (MSDS) for this drug.} 71 | #' } 72 | #' @keywords internal 73 | drug_general_information <- function() { 74 | DrugParser$new("drug")$parse() 75 | } 76 | -------------------------------------------------------------------------------- /R/drug_manufacturer_node_parser.R: -------------------------------------------------------------------------------- 1 | ManufacturersParser <- R6::R6Class( 2 | "ManufacturersParser", 3 | inherit = AbstractParser, 4 | private = list( 5 | parse_record = function() { 6 | drugs <- xmlChildren(pkg_env$root) 7 | pb <- progress_bar$new(total = xmlSize(drugs)) 8 | return(map_df(drugs, ~ private$get_manufacturer_df(., pb)) %>% 9 | unique()) 10 | }, 11 | get_manufacturer_df = function(rec, pb) { 12 | pb$tick() 13 | if (xmlSize(rec[["manufacturers"]]) < 1) 14 | return() 15 | manufacturers <- as_tibble(t(xmlSApply(rec[["manufacturers"]], 16 | private$manufacturer_rec))) 17 | manufacturers[["drugbank-id"]] <- xmlValue(rec[["drugbank-id"]]) 18 | return(manufacturers) 19 | }, 20 | manufacturer_rec = function(rec) { 21 | c( 22 | manufacturer = xmlValue(rec), 23 | generic = xmlGetAttr(node = rec, name = "generic"), 24 | url = xmlGetAttr(node = rec, name = "url") 25 | ) 26 | } 27 | ) 28 | ) 29 | 30 | #' Drug Manufacturers parser 31 | #' 32 | #' A list of companies that are manufacturing the commercially available forms 33 | #' of this drug that are available in Canada and the Unites States. 34 | #' 35 | #' 36 | #' 37 | #' @return a tibble with the following variables: 38 | #' \describe{ 39 | #' \item{generic}{A list of companies that are manufacturing the generic 40 | #' form of the drug.} 41 | #' \item{url}{A link to the companies that are manufacturing the drug.} 42 | #' \item{\emph{drugbank_id}}{drugbank id} 43 | #' } 44 | #' @keywords internal 45 | drug_manufacturers <- function() { 46 | ManufacturersParser$new( 47 | "drug_manufacturers" 48 | )$parse() 49 | } 50 | -------------------------------------------------------------------------------- /R/drug_pathway_node_parsers.R: -------------------------------------------------------------------------------- 1 | PathwayParser <- R6::R6Class( 2 | "PathwayParser", 3 | inherit = AbstractParser, 4 | private = list( 5 | parse_record = function() { 6 | drugs <- xmlChildren(pkg_env$root) 7 | pb <- progress_bar$new(total = xmlSize(drugs)) 8 | map_df(drugs, ~ private$get_pathways_df(.x, pb)) %>% 9 | unique() 10 | }, 11 | get_pathways_df = function(rec, pb) { 12 | pb$tick() 13 | map_df( 14 | xmlChildren(rec[["pathways"]]), 15 | ~ private$get_pathway_rec(.x, xmlValue(rec["drugbank-id"][[1]]))) 16 | }, 17 | get_pathway_rec = function(r, drug_key) { 18 | tibble( 19 | smpdb_id = xmlValue(r[["smpdb-id"]]), 20 | name = xmlValue(r[["name"]]), 21 | category = xmlValue(r[["category"]]), 22 | drugbank_id = drug_key 23 | ) 24 | } 25 | ) 26 | ) 27 | 28 | PathwaySubNodesParser <- R6::R6Class( 29 | "PathwaySubNodesParser", 30 | inherit = AbstractParser, 31 | private = list( 32 | parse_record = function() { 33 | drugs <- xmlChildren(pkg_env$root) 34 | pb <- progress_bar$new(total = xmlSize(drugs)) 35 | parsed_tbl <- 36 | map_df(drugs, ~ private$get_pathways_sub(., pb)) %>% 37 | unique() 38 | if (NROW(parsed_tbl) > 0) { 39 | switch( 40 | private$main_node, 41 | "enzymes" = names(parsed_tbl) <- 42 | c("enzyme", "smpdb_id") 43 | ) 44 | } 45 | 46 | parsed_tbl 47 | }, 48 | get_pathways_sub = function(rec, pb) { 49 | pb$tick() 50 | map_df( 51 | xmlChildren(rec[[private$object_node]]), 52 | ~ drug_sub_df(., private$main_node, id = private$id) 53 | ) 54 | } 55 | ) 56 | ) 57 | 58 | #' Drug Pathway Enzymes parser 59 | #' 60 | #' Enzymes involved in this pathway. 61 | #' 62 | #' @return a tibble with pathway properties 63 | #' @keywords internal 64 | drug_pathway_enzyme <- function() { 65 | PathwaySubNodesParser$new( 66 | tibble_name = "drug_pathway_enzymes", 67 | object_node = "pathways", 68 | main_node = "enzymes", 69 | id = "smpdb-id" 70 | )$parse() 71 | } 72 | 73 | #' Drug Pathway Drugs parser 74 | #' 75 | #' Drugs involved in this pathway. 76 | #' 77 | #' @return a tibble with pathway drugs properties 78 | #' @keywords internal 79 | drug_pathway_drugs <- function() { 80 | enzyme <- PathwaySubNodesParser$new( 81 | tibble_name = "drug_pathway_drugs", 82 | object_node = "pathways", 83 | main_node = "drugs", 84 | id = "smpdb-id" 85 | )$parse() 86 | 87 | if (NROW(enzyme) > 0) { 88 | enzyme <- enzyme %>% 89 | rename("smpdb_id" = "parent_key") 90 | } 91 | 92 | enzyme 93 | } 94 | 95 | #' Drug Pathway parser 96 | #' 97 | #' Metabolic, disease, and biological pathways that the drug is involved in, as 98 | #' identified by the Small Molecule Protein Database (SMPDB). 99 | #' 100 | #' @return a tibble with the following variables: 101 | #' \describe{ 102 | #' \item{smpdb-id}{Small Molecule Pathway Database identifier for this 103 | #' pathway.} 104 | #' \item{name}{Pathway name} 105 | #' \item{category}{Pathway category} 106 | #' \item{\emph{drugbank_id}}{drugbank id} 107 | #' } 108 | #' @keywords internal 109 | drug_pathway <- function() { 110 | PathwayParser$new("drug_pathway")$parse() 111 | } 112 | -------------------------------------------------------------------------------- /R/drug_pharmacology_parser.R: -------------------------------------------------------------------------------- 1 | PharmacologyParser <- R6::R6Class( 2 | "PharmacologyParser", 3 | inherit = AbstractParser, 4 | private = list( 5 | parse_record = function() { 6 | pb <- progress_bar$new(total = xmlSize(pkg_env$root)) 7 | drugs_pharmacology <- xmlSApply(xmlRoot(pkg_env$root), 8 | private$drug_pharmacology_rec, pb) 9 | return(as_tibble(t(drugs_pharmacology))) 10 | }, 11 | drug_pharmacology_rec = function(drug, pb) { 12 | pb$tick() 13 | c( 14 | drugbank_id = xmlValue(drug[["drugbank-id"]]), 15 | indication = xmlValue(drug[["indication"]]), 16 | pharmacodynamics = xmlValue(drug[["pharmacodynamics"]]), 17 | mechanism_of_action = xmlValue(drug[["mechanism-of-action"]]), 18 | toxicity = xmlValue(drug[["toxicity"]]), 19 | metabolism = xmlValue(drug[["metabolism"]]), 20 | absorption = xmlValue(drug[["absorption"]]), 21 | half_life = xmlValue(drug[["half-life"]]), 22 | protein_binding = xmlValue(drug[["protein-binding"]]), 23 | route_of_elimination = xmlValue(drug[["route-of-elimination"]]), 24 | volume_of_distribution = xmlValue(drug[["volume-of-distribution"]]), 25 | clearance = xmlValue(drug[["clearance"]]) 26 | ) 27 | } 28 | ) 29 | ) 30 | 31 | #' Drug Pharmacology parser 32 | #' 33 | #' Describes the use, mechanism of action, pharmacokinetics, pharmacodynamics, 34 | #' and physiological or biochemical effects in the body. 35 | #' 36 | #' @return a tibble with the following variables: 37 | #' \describe{ 38 | #' \item{indication}{The approved conditions, diseases, or states for which a 39 | #' drug can safely and effectively be used. An indication is considered to be 40 | #' FDA-approved when it has any of the following designations: NDA, ANDA, BLA, 41 | #' or OTC. May also include indications in other countries, such as Canada 42 | #' (through Health Canada) or in Europe 43 | #' (through the European Medicines Agency).} 44 | #' \item{pharmacodynamics}{A description of how the drug modifies or affects 45 | #' the organism it is being used in. May include effects in the body that are 46 | #' desired (enzyme or protein targets for example) and undesired 47 | #' (also known as “side effects”). This is in contrast to pharmacokinetics, 48 | #' which describes how the body modifies the drug being used.} 49 | #' \item{mechanism_of_action}{A component of pharmacodynamics that describes 50 | #' the biochemical interaction through which a drug produces its intended 51 | #' effect. May include the exact molecular protein or enzyme targets and/or 52 | #' a description of the physiological effects produced.} 53 | #' \item{toxicity}{Any adverse reaction, or side effect, that may or may not 54 | #' occur with use of the drug. May be attributed to a number of effects 55 | #' including: an enhanced therapeutic effect, rare anaphylactic reactions, 56 | #' interactions with other medications, or unanticipated binding of the 57 | #' molecule at different sites within the body.} 58 | #' \item{metabolism}{A description of the chemical degradation of the drug 59 | #' molecule within the body; most commonly by enzymes from the 60 | #' Cytochrome P450 (CYP) system in the liver.} 61 | #' \item{absorption}{A description of the movement of the drug from the site 62 | #' of administration into the bloodstream or target tissue. Common 63 | #' pharmacokinetic metrics used to evaluate absorption include Area Under 64 | #' the Curve (AUC), bioavailability (F), maximum concentration (Cmax), and 65 | #' time to maximum concentration (Tmax).} 66 | #' \item{half-life}{The period of time it takes for the amount of drug in the 67 | #' body to be reduced by one half. Provides a description of how quickly the 68 | #' drug is being eliminated and how much is available in the bloodstream.} 69 | #' \item{protein-binding }{A description of the drug’s affinity for plama 70 | #' proteins and the proportion of the drug that is bound to them when in 71 | #' circulation within the body.} 72 | #' \item{route_of_elimination}{A description of the pathway that is used to 73 | #' excrete the drug from the body. Common pharmacokinetic parameters used to 74 | #' evaluate excretion include elimination half life, renal clearance, and 75 | #' tracking of radiolabelled compounds through the renal and GI system.} 76 | #' \item{volume_of_distribution}{The Vd of a drug represents the degree to 77 | #' which it is distributed into body tissue compared to the plasma.} 78 | #' \item{clearance}{A pharmacokinetic measurement of the rate of removal of the 79 | #' drug from plasma, expressed as mL/min; reflects the rate of elimination of 80 | #' the drug.} 81 | #' \item{\emph{drugbank_id}}{drugbank id} 82 | #' } 83 | #' @keywords internal 84 | drug_pharmacology <- function() { 85 | PharmacologyParser$new("drugs_pharmacology")$parse() 86 | } 87 | -------------------------------------------------------------------------------- /R/drug_price_node_parser.R: -------------------------------------------------------------------------------- 1 | PricesParser <- R6::R6Class( 2 | "PricesParser", 3 | inherit = AbstractParser, 4 | private = list( 5 | parse_record = function() { 6 | drugs <- xmlChildren(pkg_env$root) 7 | pb <- progress_bar$new(total = xmlSize(drugs)) 8 | map_df(drugs, ~ private$get_prices_df(., pb)) %>% 9 | unique() 10 | }, 11 | get_prices_df = function(rec, pb) { 12 | pb$tick() 13 | map_df( 14 | xmlChildren(rec[["prices"]]), 15 | ~ private$get_price_rec(., xmlValue(rec[["drugbank-id"]])) 16 | ) 17 | }, 18 | get_price_rec = function(r, drug_key) { 19 | tibble_row( 20 | description = xmlValue(r[["description"]]), 21 | currency = xmlGetAttr(r[["cost"]], name = "currency"), 22 | cost = xmlValue(r[["cost"]]), 23 | unit = xmlValue(r[["unit"]]), 24 | drugbank_id = drug_key 25 | ) 26 | } 27 | ) 28 | ) 29 | 30 | 31 | #' Drug Prices Parsers 32 | #' 33 | #' Unit drug prices 34 | #' 35 | #' @return a tibble with 5 variables: 36 | #' \describe{ 37 | #' \item{description}{} 38 | #' \item{cost}{Drug price per unit} 39 | #' \item{currency}{Currency of price, example: US.} 40 | #' \item{unit}{} 41 | #' \item{parent_id}{drugbank id} 42 | #' } 43 | #' @keywords internal 44 | drug_prices <- function() { 45 | PricesParser$new("drug_prices")$parse() 46 | } 47 | -------------------------------------------------------------------------------- /R/drug_reaction_node_parser.R: -------------------------------------------------------------------------------- 1 | ReactionsParser <- R6::R6Class( 2 | "ReactionsParser", 3 | inherit = AbstractParser, 4 | private = list( 5 | parse_record = function() { 6 | drugs <- xmlChildren(pkg_env$root) 7 | pb <- progress_bar$new(total = xmlSize(drugs)) 8 | map_df(drugs, ~ private$get_reactions_df(., pb)) 9 | }, 10 | get_reactions_df = function(rec, pb) { 11 | pb$tick() 12 | map_df( 13 | xmlChildren(rec[["reactions"]]), 14 | ~ private$get_reactions_rec(., xmlValue(rec[["drugbank-id"]])) 15 | ) 16 | }, 17 | get_reactions_rec = function(r, drug_key) { 18 | tibble( 19 | sequence = xmlValue(r[["sequence"]]), 20 | left_drugbank_id = xmlValue(r[["left-element"]][["drugbank-id"]]), 21 | left_drugbank_name = xmlValue(r[["left-element"]][["name"]]), 22 | right_drugbank_id = xmlValue(r[["right-element"]][["drugbank-id"]]), 23 | right_drugbank_name = xmlValue(r[["right-element"]][["name"]]), 24 | drugbank_id = drug_key 25 | ) 26 | } 27 | ) 28 | ) 29 | 30 | ReactionsEnzymesParser <- R6::R6Class( 31 | "ReactionsEnzymesParser", 32 | inherit = AbstractParser, 33 | private = list( 34 | parse_record = function() { 35 | drugs <- xmlChildren(pkg_env$root) 36 | pb <- progress_bar$new(total = xmlSize(drugs)) 37 | map_df(drugs, ~ private$get_reactions_enzymes_df(., pb)) 38 | }, 39 | get_reactions_enzymes_df = function(rec, pb) { 40 | pb$tick() 41 | map_df( 42 | xmlChildren(rec[["reactions"]]), 43 | ~ drug_sub_df(., "enzymes", id = NULL) 44 | ) 45 | } 46 | ) 47 | ) 48 | 49 | #' Drug Reactions Parsers 50 | #' 51 | #' Extract the sequential representation of the metabolic reactions that this 52 | #' drug molecule is involved in. Depending on available information, this may 53 | #' include metabolizing enzymes, reaction type, substrates, products, 54 | #' pharmacological activity of metabolites, and a structural representation of 55 | #' the biochemical reactions. 56 | #' 57 | #' @return a tibble with 5 variables: 58 | #' \describe{ 59 | #' \item{sequence}{ Reactions are displayed within a numerical sequence} 60 | #' \item{left_drugbank_name}{The substrate of the reaction. Maybe a drug or a 61 | #' metabolite.} 62 | #' \item{rightt_drugbank_name}{ The product of the reaction. Maybe a drug or a 63 | #' metabolite.} 64 | #' \item{left_drugbank_id}{} 65 | #' \item{right_drugbank_id}{} 66 | #' \item{parent_id}{drugbank id} 67 | #' } 68 | #' @keywords internal 69 | drug_reactions <- function() { 70 | ReactionsParser$new("drug_reactions")$parse() 71 | } 72 | 73 | #' Drug Reactions Enzymes Parsers 74 | #' 75 | #' Enzymes involved in metabolizing this drug 76 | #' 77 | #' @return a tibble with 3 variables: 78 | #' \describe{ 79 | #' \item{name}{} 80 | #' \item{uniprot-id}{} 81 | #' \item{parent_id}{drugbank id} 82 | #' } 83 | #' @keywords internal 84 | drug_reactions_enzymes <- function() { 85 | enzyme <- ReactionsEnzymesParser$new("drug_reactions_enzymes")$parse() 86 | 87 | if ("drugbank_id" %in% names(enzyme)) { 88 | enzyme <- rename(enzyme, enzyme_id = "drugbank_id") 89 | } 90 | 91 | enzyme 92 | } 93 | -------------------------------------------------------------------------------- /R/drug_sequence_node_parser.R: -------------------------------------------------------------------------------- 1 | SequencesParser <- R6::R6Class( 2 | "SequencesParser", 3 | inherit = AbstractParser, 4 | private = list( 5 | parse_record = function() { 6 | drugs <- xmlChildren(pkg_env$root) 7 | pb <- progress_bar$new(total = xmlSize(drugs)) 8 | return(map_df(drugs, ~ private$get_sequences_df(., pb))) 9 | }, 10 | get_sequences_df = function(rec, pb) { 11 | pb$tick() 12 | if (is.null(rec[["sequences"]])) { 13 | return() 14 | } 15 | return(map_df( 16 | xmlChildren(rec[["sequences"]]), 17 | ~ private$get_sequence_rec(.x, xmlValue(rec["drugbank-id"][[1]])) 18 | )) 19 | }, 20 | get_sequence_rec = function(r, drug_key) { 21 | tibble( 22 | sequence = xmlValue(r), 23 | format = ifelse(is.null(xmlGetAttr(r, name = "format")), 24 | NA, 25 | xmlGetAttr(r, name = "format") 26 | ), 27 | drugbank_id = drug_key 28 | ) 29 | } 30 | ) 31 | ) 32 | 33 | #' Drug Sequences parser 34 | #' 35 | #' The amino acid sequence; provided if the drug is a peptide. 36 | #' 37 | #' Describes peptide sequences of biotech drugs 38 | #' 39 | #' @return a tibble with the following variables: 40 | #' \describe{ 41 | #' \item{sequence}{a textual representation of the sequence} 42 | #' \item{format}{Currently, only the FASTA format is used} 43 | #' \item{\emph{drugbank_id}}{drugbank id} 44 | #' } 45 | #' @keywords internal 46 | drug_sequences <- function() { 47 | SequencesParser$new("drug_sequences")$parse() 48 | } 49 | -------------------------------------------------------------------------------- /R/drug_synonym_node_parser.R: -------------------------------------------------------------------------------- 1 | DrugSynonymsParser <- R6::R6Class( 2 | "DrugSynonymsParser", 3 | inherit = AbstractParser, 4 | private = list( 5 | parse_record = function() { 6 | drugs <- xmlChildren(pkg_env$root) 7 | pb <- progress_bar$new(total = xmlSize(drugs)) 8 | map_df(drugs, ~ private$get_syn_df(.x, pb)) %>% unique() 9 | }, 10 | get_syn_df = function(rec, pb) { 11 | pb$tick() 12 | if (xmlSize(rec[["synonyms"]]) < 1) return() 13 | syn <- as_tibble(t(xmlSApply(rec[["synonyms"]], private$syn_rec))) 14 | syn[["drugbank-id"]] <- xmlValue(rec[["drugbank-id"]]) 15 | return(syn) 16 | 17 | }, 18 | syn_rec = function(rec) { 19 | c( 20 | synonym = xmlValue(rec), 21 | language = xmlGetAttr(rec, name = "language"), 22 | coder = xmlGetAttr(rec, 23 | name = "coder") 24 | ) 25 | } 26 | ) 27 | ) 28 | 29 | #' Drug Synonyms parser 30 | #' 31 | #' Other names or identifiers that are associated with this drug. 32 | #' 33 | #' @return a tibble with 3 variables: 34 | #' \describe{ 35 | #' \item{language}{Names of the drug in languages other than English.} 36 | #' \item{coder}{Organization or source providing the synonym. For example, 37 | #' INN indicates the synonym is an International Nonproprietary Name, 38 | #' while IUPAC indicates the synonym is the nomenclature designated by the 39 | #' International Union of Pure and Applied Chemistry.} 40 | #' \item{\emph{drugbank_id}}{drugbank id} 41 | #' } 42 | #' @keywords internal 43 | drug_syn <- function() { 44 | DrugSynonymsParser$new("drug_syn")$parse() 45 | } 46 | -------------------------------------------------------------------------------- /R/dvobject_metadata.R: -------------------------------------------------------------------------------- 1 | #' init_dvobject 2 | #' initialize dvobject 3 | #' 4 | #' @keywords internal 5 | #' @return dvobject 6 | init_dvobject <- function() { 7 | dvobject <- list() 8 | class(dvobject) <- "dvobject" 9 | 10 | attr(dvobject, "original_db_info") <- list() 11 | dvobject 12 | } 13 | 14 | 15 | #' add_drugbank_info 16 | #' Add passed DrugBank db metadata to passed dvobject 17 | #' 18 | #' @keywords internal 19 | #' @return dvobject 20 | add_drugbank_info <- function(dvobject) { 21 | db_info <- attr(dvobject, "original_db_info") 22 | 23 | db_info[["db_type"]] <- "DrugBank" 24 | db_info[["db_version"]] <- XML::xmlGetAttr(node = pkg_env$root, 25 | name = "version") 26 | db_info[["db_exported_date"]] <- XML::xmlGetAttr(node = pkg_env$root, 27 | name = "exported-on") 28 | 29 | attr(dvobject, "original_db_info") <- db_info 30 | dvobject 31 | } 32 | 33 | 34 | #' init_dvobject 35 | #' Returns data.frame with two columns (key, value) of dvobject attributes 36 | #' 37 | #' @param dvobject - dvobject list to show related metadata 38 | #' 39 | #' @return data.frame 40 | #' @family utility 41 | #' @export 42 | show_dvobject_metadata <- function(dvobject) { 43 | dvobject_attributes <- attr(dvobject, "original_db_info") 44 | dvobject_attributes[["class"]] <- class(dvobject) 45 | data.frame(Atrribute = names(dvobject_attributes), Value = stack(dvobject_attributes)[[1]]) 46 | } 47 | -------------------------------------------------------------------------------- /R/imports.R: -------------------------------------------------------------------------------- 1 | #' @import dplyr 2 | #' @importFrom progress progress_bar 3 | #' @importFrom purrr '%>%' map_df map_chr is_empty is_null 4 | #' @importFrom tibble tibble as_tibble as_tibble_row tibble_row 5 | #' @importFrom utils unzip stack 6 | #' @importFrom XML xmlChildren xmlGetAttr xmlValue xmlToList xmlToDataFrame 7 | #' xmlParse xmlRoot xmlSize xmlApply xmlSApply 8 | NULL 9 | -------------------------------------------------------------------------------- /README.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: github_document 3 | --- 4 | 5 | 6 | 7 | ```{r setup, include = FALSE} 8 | knitr::opts_chunk$set( 9 | collapse = TRUE, 10 | comment = "#>", 11 | fig.path = "man/figures/README-", 12 | out.width = "100%" 13 | ) 14 | library(dplyr) 15 | library(ggplot2) 16 | ``` 17 | # dbparser 18 | 19 | [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/dbparser)](https://cran.r-project.org/package=dbparser) 20 | [![codecov](https://codecov.io/gh/ropensci/dbparser/branch/master/graph/badge.svg)](https://app.codecov.io/gh/ropensci/dbparser) 21 | [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) 22 | [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) 23 | [![metacran downloads](https://cranlogs.r-pkg.org/badges/grand-total/dbparser)](https://cran.r-project.org/package=dbparser) 24 | [![](https://img.shields.io/badge/Doc-Rdoc-blue.svg)](https://www.rdocumentation.org/packages/dbparser) 25 | [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3311/badge)](https://bestpractices.coreinfrastructure.org/projects/3311) 26 | [![](https://badges.ropensci.org/347_status.svg)](https://github.com/ropensci/software-review/issues/347) 27 | 28 | ## Overview 29 | Drugs databases vary too much in their formats and structures which making related 30 | data analysis not a very easy job and requires a lot of efforts to work on only 31 | two databases together such as [DrugBank](https://go.drugbank.com/) and [KEGG](https://www.genome.jp/kegg/). 32 | 33 | Hence, `dbparser` package aims to parse different public drugs databases as [DrugBank](https://go.drugbank.com/) or [KEGG](https://www.genome.jp/kegg/) into 34 | single and unified format R object called `dvobject` (stands for drugverse object). 35 | 36 | That should help in: 37 | 38 | - working with single data object and not multiple databases in different formats, 39 | - using R analysis capabilities easily on drugs data, 40 | - ease of transferring data between researchers after performing required data 41 | analysis or `dvobject` and storing results in the same object in a very easy manner 42 | 43 | ### dvobject Structure 44 | `dvobject` introduces a unified and compressed format of drugs data. 45 | It is an R list object that contains one or more of the following sub-lists: 46 | 47 | - **drugs**: list of data.frames that contain drugs information (i.e. synonyms, classifications, ...) and it is the only mandatory list 48 | - **salts**: data.frame contains drugs salts information 49 | - **products**: data.frame of commercially available drugs products in the world 50 | - **references**: data.frame of articles, links and textbooks about drugs or CETT data 51 | - **cett**: list of data.frames contain targets, enzymes, carriers and transporters information 52 | 53 | ## Drug Databases 54 | Parsers are available for the following databases (it is in progress list) 55 | 56 | ### DrugBank 57 | 58 | [DrugBank](https://go.drugbank.com/) database is a comprehensive, freely 59 | accessible, online database containing information on drugs and drug 60 | targets. As both a bioinformatics and a cheminformatics resource, 61 | DrugBank combines detailed drug (i.e. chemical, pharmacological and 62 | pharmaceutical) data with comprehensive drug target (i.e. sequence, 63 | structure, and pathway) information. More information about DrugBank can 64 | be found [here](https://go.drugbank.com/about). 65 | 66 | In its raw form, the DrugBank database is a single 67 | XML file. Users must create an [account](https://go.drugbank.com/public_users/sign_up) 68 | with DrugBank and request permission to [download](https://go.drugbank.com/releases/latest) 69 | the database. Note that this may take a couple of days. 70 | 71 | The `dbparser` package parses the DrugBank XML database into `R` tibbles that can be explored and analyzed by the user, check [this tutorial](https://docs.ropensci.org/dbparser/articles/dbparser.html) for more details. 72 | 73 | If you are waiting for access to the DrugBank database, or do not intend to do a deep dive with 74 | the data, you may wish to use the `dbdataset` 75 | [package](https://interstellar-consultation-services.github.io/dbdataset/), which contains 76 | the DrugBank database already parsed into `dvobject`. Note that this is a large package that 77 | exceeds the limit set by CRAN. It is only available on GitHub. 78 | 79 | `dbparser` is tested against DrugBank versions *5.1.0* through *5.1.12* 80 | successfully. If you find errors with these versions or any other 81 | version please submit an issue 82 | [here](https://github.com/ropensci/dbparser/issues). 83 | 84 | ## Installation 85 | 86 | You can install the released version of dbparser from 87 | [CRAN](https://CRAN.R-project.org) with: 88 | 89 | ``` r 90 | install.packages("dbparser") 91 | ``` 92 | or you can install the latest updates directly from the repo 93 | 94 | ``` r 95 | library(devtools) 96 | devtools::install_github("ropensci/dbparser") 97 | ``` 98 | 99 | ## Code of Conduct 100 | Please note that the 'dbparser' project is released with a 101 | [Contributor Code of Conduct](https://docs.ropensci.org/dbparser/CODE_OF_CONDUCT.html). 102 | By contributing to this project, you agree to abide by its terms. 103 | 104 | ## Contributing Guide 105 | 👍🎉 First off, thanks for taking the time to contribute! 🎉👍 106 | Please review our [Contributing Guide](https://docs.ropensci.org/dbparser/CONTRIBUTING.html). 107 | 108 | ## Share the love ❤️ 109 | 110 | Think **dbparser** is useful? Let others discover it, by telling them in person, via Twitter or a blog post. 111 | 112 | Using **dbparser** for a paper you are writing? Consider citing it 113 | ```{r} 114 | citation("dbparser") 115 | ``` 116 | -------------------------------------------------------------------------------- /_pkgdown.yml: -------------------------------------------------------------------------------- 1 | navbar: 2 | structure: 3 | left: 4 | - home 5 | - intro 6 | - reference 7 | - articles 8 | - tutorials 9 | - news 10 | right: [search, github, lightswitch] 11 | 12 | 13 | reference: 14 | - title: "Drugs Databases Parser" 15 | desc: "Parse public drug databases and converted them into dvobject" 16 | contents: 17 | - has_concept("parsers") 18 | - title: "Utility functions" 19 | desc: "Different functions to handle dvobject" 20 | contents: 21 | - has_concept("utility") 22 | 23 | authors: 24 | Mohammed Ali: 25 | href: "http://mohammedfcis.github.io" 26 | 27 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # DO NOT CHANGE the "init" and "install" sections below 2 | 3 | # Download script file from GitHub 4 | init: 5 | ps: | 6 | $ErrorActionPreference = "Stop" 7 | Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" 8 | Import-Module '..\appveyor-tool.ps1' 9 | 10 | install: 11 | ps: Bootstrap 12 | 13 | cache: 14 | - C:\RLibrary 15 | 16 | environment: 17 | NOT_CRAN: true 18 | # env vars that may need to be set, at least temporarily, from time to time 19 | # see https://github.com/krlmlr/r-appveyor#readme for details 20 | # USE_RTOOLS: true 21 | # R_REMOTES_STANDALONE: true 22 | 23 | # Adapt as necessary starting from here 24 | 25 | build_script: 26 | - travis-tool.sh install_deps 27 | 28 | test_script: 29 | - travis-tool.sh run_tests 30 | 31 | on_failure: 32 | - 7z a failure.zip *.Rcheck\* 33 | - appveyor PushArtifact failure.zip 34 | 35 | artifacts: 36 | - path: '*.Rcheck\**\*.log' 37 | name: Logs 38 | 39 | - path: '*.Rcheck\**\*.out' 40 | name: Logs 41 | 42 | - path: '*.Rcheck\**\*.fail' 43 | name: Logs 44 | 45 | - path: '*.Rcheck\**\*.Rout' 46 | name: Logs 47 | 48 | - path: '\*_*.tar.gz' 49 | name: Bits 50 | 51 | - path: '\*_*.zip' 52 | name: Bits 53 | -------------------------------------------------------------------------------- /cran-comments.md: -------------------------------------------------------------------------------- 1 | ## Test environments 2 | 3 | ### local Windows 10(x86_64-w64-mingw32), 4.3.2 4 | 0 errors | 0 warnings | 0 note 5 | 6 | ### Windows Server 2022, R-devel, 64 bit 7 | 0 errors | 0 warnings | 1 note 8 | 9 | ``` Found the following files/directories: 10 | 'lastMiKTeXException'``` 11 | 12 | ### Ubuntu Linux 20.04.1 LTS, R-release, GCC 13 | 0 errors | 0 warnings | 0 not 14 | 15 | ### Fedora Linux, R-devel, clang, gfortran 16 | 0 errors | 0 warnings | 1 note 17 | 18 | ```* checking HTML version of manual ... NOTE 19 | Skipping checking HTML validation: no command 'tidy' found``` 20 | 21 | ### win-builder (R version 4.4.0 RC (2024-04-16 r86451 ucrt)) 22 | 0 errors | 0 warnings | 0 note 23 | 24 | ### revdepcheck results 25 | 26 | We checked 0 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. 27 | 28 | * We saw 0 new problems 29 | * We failed to check 0 packages 30 | -------------------------------------------------------------------------------- /dbparser.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | 18 | BuildType: Package 19 | PackageUseDevtools: Yes 20 | PackageInstallArgs: --no-multiarch --with-keep.source 21 | -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Page not found (404) • dbparser 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 |
31 |
77 | 78 | 79 | 80 | 81 |
82 |
83 | 86 | 87 | Content not found. Please use links in the navbar. 88 | 89 |
90 | 91 | 95 | 96 |
97 | 98 | 99 | 100 |
104 | 105 |
106 |

107 |

Site built with pkgdown 2.0.7.

108 |
109 | 110 |
111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /docs/LICENSE-text.html: -------------------------------------------------------------------------------- 1 | 2 | License • dbparser 6 | 7 | 8 |
9 |
49 | 50 | 51 | 52 |
53 |
54 | 57 | 58 |
YEAR: 2018
59 | COPYRIGHT HOLDER: Mohammed Ali, Ali Ezzat
60 | 
61 | 62 |
63 | 64 | 67 | 68 |
69 | 70 | 71 | 72 |
75 | 76 |
77 |

Site built with pkgdown 2.0.7.

78 |
79 | 80 |
81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-merlot -------------------------------------------------------------------------------- /docs/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /docs/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/articles/dbparser_files/canvasXpress-binding-1.46.9.1/canvasXpress.js: -------------------------------------------------------------------------------- 1 | HTMLWidgets.widget({ 2 | name: "canvasXpress", 3 | type: "output", 4 | 5 | factory: function (el, width, height) { 6 | 7 | if (el && el.classList && el.classList.contains('noCanvas')) { 8 | return; 9 | } 10 | 11 | var c = document.createElement('canvas'); 12 | c.id = el.id + '-cx'; 13 | c.className = 'CanvasXpress'; 14 | c.width = 600; // default 15 | c.height = 400; // default 16 | 17 | if (width && height && (width !== 0) && (height !== 0)) { 18 | // set canvas size 19 | c.width = width; 20 | c.height = height; 21 | 22 | // Check if we are running in the viewer; override the width and height 23 | if (/\bviewer_pane=1\b/.test(window.location)) { 24 | c.width = document.childNodes[1].clientWidth - 36; 25 | c.height = document.childNodes[1].clientHeight - 36; 26 | } 27 | } 28 | 29 | el.appendChild(c); 30 | 31 | // hold onto these values, will be tracked when resizing happens 32 | var chart_width = c.width; 33 | var chart_height = c.height; 34 | 35 | return { 36 | id: c.id, 37 | 38 | // reminder: called multiple times, any time the R binding function is called 39 | renderValue: function (x) { 40 | 41 | // destroy old charts but keep track of the parent container 42 | var n = CanvasXpress && CanvasXpress.instances && CanvasXpress.instances.length; 43 | var p = n ? document.getElementById(c.id).parentNode.parentNode.parentNode.parentNode : document.getElementById(c.id).parentNode; 44 | 45 | try { 46 | for (var i = 0; i < CanvasXpress.instances.length; i++) { 47 | if (CanvasXpress.instances[i].target.match(c.id)) { 48 | CanvasXpress.destroy(CanvasXpress.instances[i].target); 49 | } 50 | } 51 | } 52 | catch (err) { 53 | console.log(err); 54 | } 55 | 56 | // create the new chart 57 | if (!(x instanceof Array)) { 58 | x.renderTo = c.id; 59 | var e = document.getElementById(c.id); 60 | if (e == null && p != null) { 61 | p.appendChild(document.createElement('canvas')).setAttribute('id', c.id); 62 | } 63 | var cx = new CanvasXpress(x); 64 | this.resize(chart_width, chart_height); 65 | return cx; 66 | } 67 | }, 68 | 69 | resize: function (width, height) { 70 | // Check if we are running in the viewer; override the width and height 71 | if (/\bviewer_pane=1\b/.test(window.location)) { 72 | width = document.childNodes[1].clientWidth - 36; 73 | height = document.childNodes[1].clientHeight - 36; 74 | } 75 | 76 | // track the new values 77 | chart_width = width; 78 | chart_height = height; 79 | 80 | var cx = CanvasXpress.getObject(c.id); 81 | if (cx) { 82 | cx.setDimensions(chart_width, chart_height); 83 | } else { 84 | cx = CanvasXpress.getObject(c.id + '-1'); 85 | if (cx) { 86 | cx.setDimensions(chart_width, chart_height); 87 | } 88 | } 89 | return cx; 90 | }, 91 | 92 | getImage: function () { 93 | var cx = CanvasXpress.getObject(c.id); 94 | if (cx && cx.meta && cx.meta.base64) { 95 | return cx.meta.base64; 96 | } else { 97 | return false; 98 | } 99 | } 100 | }; 101 | } 102 | }); 103 | -------------------------------------------------------------------------------- /docs/articles/dbparser_files/figure-html/unnamed-chunk-3-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/articles/dbparser_files/figure-html/unnamed-chunk-3-1.png -------------------------------------------------------------------------------- /docs/articles/dbparser_files/figure-html/unnamed-chunk-4-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/articles/dbparser_files/figure-html/unnamed-chunk-4-1.png -------------------------------------------------------------------------------- /docs/articles/dbparser_files/figure-html/unnamed-chunk-5-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/articles/dbparser_files/figure-html/unnamed-chunk-5-1.png -------------------------------------------------------------------------------- /docs/articles/fig1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/articles/fig1.png -------------------------------------------------------------------------------- /docs/articles/fig2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/articles/fig2.png -------------------------------------------------------------------------------- /docs/articles/fig3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/articles/fig3.png -------------------------------------------------------------------------------- /docs/articles/index.html: -------------------------------------------------------------------------------- 1 | 2 | Articles • dbparser 6 | 7 | 8 |
9 |
49 | 50 | 51 | 52 |
53 |
54 | 57 | 58 |
59 |

All vignettes

60 |

61 | 62 |
DrugBank Database XML Parser
63 |
64 |
65 |
66 |
67 | 68 | 69 |
72 | 73 |
74 |

Site built with pkgdown 2.0.7.

75 |
76 | 77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /docs/articles/maria_tables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/articles/maria_tables.png -------------------------------------------------------------------------------- /docs/articles/new_database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/articles/new_database.png -------------------------------------------------------------------------------- /docs/articles/sql_connection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/articles/sql_connection.png -------------------------------------------------------------------------------- /docs/bootstrap-toc.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | 6 | /* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ 7 | 8 | /* All levels of nav */ 9 | nav[data-toggle='toc'] .nav > li > a { 10 | display: block; 11 | padding: 4px 20px; 12 | font-size: 13px; 13 | font-weight: 500; 14 | color: #767676; 15 | } 16 | nav[data-toggle='toc'] .nav > li > a:hover, 17 | nav[data-toggle='toc'] .nav > li > a:focus { 18 | padding-left: 19px; 19 | color: #563d7c; 20 | text-decoration: none; 21 | background-color: transparent; 22 | border-left: 1px solid #563d7c; 23 | } 24 | nav[data-toggle='toc'] .nav > .active > a, 25 | nav[data-toggle='toc'] .nav > .active:hover > a, 26 | nav[data-toggle='toc'] .nav > .active:focus > a { 27 | padding-left: 18px; 28 | font-weight: bold; 29 | color: #563d7c; 30 | background-color: transparent; 31 | border-left: 2px solid #563d7c; 32 | } 33 | 34 | /* Nav: second level (shown on .active) */ 35 | nav[data-toggle='toc'] .nav .nav { 36 | display: none; /* Hide by default, but at >768px, show it */ 37 | padding-bottom: 10px; 38 | } 39 | nav[data-toggle='toc'] .nav .nav > li > a { 40 | padding-top: 1px; 41 | padding-bottom: 1px; 42 | padding-left: 30px; 43 | font-size: 12px; 44 | font-weight: normal; 45 | } 46 | nav[data-toggle='toc'] .nav .nav > li > a:hover, 47 | nav[data-toggle='toc'] .nav .nav > li > a:focus { 48 | padding-left: 29px; 49 | } 50 | nav[data-toggle='toc'] .nav .nav > .active > a, 51 | nav[data-toggle='toc'] .nav .nav > .active:hover > a, 52 | nav[data-toggle='toc'] .nav .nav > .active:focus > a { 53 | padding-left: 28px; 54 | font-weight: 500; 55 | } 56 | 57 | /* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ 58 | nav[data-toggle='toc'] .nav > .active > ul { 59 | display: block; 60 | } 61 | -------------------------------------------------------------------------------- /docs/bootstrap-toc.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | (function() { 6 | 'use strict'; 7 | 8 | window.Toc = { 9 | helpers: { 10 | // return all matching elements in the set, or their descendants 11 | findOrFilter: function($el, selector) { 12 | // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ 13 | // http://stackoverflow.com/a/12731439/358804 14 | var $descendants = $el.find(selector); 15 | return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); 16 | }, 17 | 18 | generateUniqueIdBase: function(el) { 19 | var text = $(el).text(); 20 | var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); 21 | return anchor || el.tagName.toLowerCase(); 22 | }, 23 | 24 | generateUniqueId: function(el) { 25 | var anchorBase = this.generateUniqueIdBase(el); 26 | for (var i = 0; ; i++) { 27 | var anchor = anchorBase; 28 | if (i > 0) { 29 | // add suffix 30 | anchor += '-' + i; 31 | } 32 | // check if ID already exists 33 | if (!document.getElementById(anchor)) { 34 | return anchor; 35 | } 36 | } 37 | }, 38 | 39 | generateAnchor: function(el) { 40 | if (el.id) { 41 | return el.id; 42 | } else { 43 | var anchor = this.generateUniqueId(el); 44 | el.id = anchor; 45 | return anchor; 46 | } 47 | }, 48 | 49 | createNavList: function() { 50 | return $(''); 51 | }, 52 | 53 | createChildNavList: function($parent) { 54 | var $childList = this.createNavList(); 55 | $parent.append($childList); 56 | return $childList; 57 | }, 58 | 59 | generateNavEl: function(anchor, text) { 60 | var $a = $(''); 61 | $a.attr('href', '#' + anchor); 62 | $a.text(text); 63 | var $li = $('
  • '); 64 | $li.append($a); 65 | return $li; 66 | }, 67 | 68 | generateNavItem: function(headingEl) { 69 | var anchor = this.generateAnchor(headingEl); 70 | var $heading = $(headingEl); 71 | var text = $heading.data('toc-text') || $heading.text(); 72 | return this.generateNavEl(anchor, text); 73 | }, 74 | 75 | // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). 76 | getTopLevel: function($scope) { 77 | for (var i = 1; i <= 6; i++) { 78 | var $headings = this.findOrFilter($scope, 'h' + i); 79 | if ($headings.length > 1) { 80 | return i; 81 | } 82 | } 83 | 84 | return 1; 85 | }, 86 | 87 | // returns the elements for the top level, and the next below it 88 | getHeadings: function($scope, topLevel) { 89 | var topSelector = 'h' + topLevel; 90 | 91 | var secondaryLevel = topLevel + 1; 92 | var secondarySelector = 'h' + secondaryLevel; 93 | 94 | return this.findOrFilter($scope, topSelector + ',' + secondarySelector); 95 | }, 96 | 97 | getNavLevel: function(el) { 98 | return parseInt(el.tagName.charAt(1), 10); 99 | }, 100 | 101 | populateNav: function($topContext, topLevel, $headings) { 102 | var $context = $topContext; 103 | var $prevNav; 104 | 105 | var helpers = this; 106 | $headings.each(function(i, el) { 107 | var $newNav = helpers.generateNavItem(el); 108 | var navLevel = helpers.getNavLevel(el); 109 | 110 | // determine the proper $context 111 | if (navLevel === topLevel) { 112 | // use top level 113 | $context = $topContext; 114 | } else if ($prevNav && $context === $topContext) { 115 | // create a new level of the tree and switch to it 116 | $context = helpers.createChildNavList($prevNav); 117 | } // else use the current $context 118 | 119 | $context.append($newNav); 120 | 121 | $prevNav = $newNav; 122 | }); 123 | }, 124 | 125 | parseOps: function(arg) { 126 | var opts; 127 | if (arg.jquery) { 128 | opts = { 129 | $nav: arg 130 | }; 131 | } else { 132 | opts = arg; 133 | } 134 | opts.$scope = opts.$scope || $(document.body); 135 | return opts; 136 | } 137 | }, 138 | 139 | // accepts a jQuery object, or an options object 140 | init: function(opts) { 141 | opts = this.helpers.parseOps(opts); 142 | 143 | // ensure that the data attribute is in place for styling 144 | opts.$nav.attr('data-toggle', 'toc'); 145 | 146 | var $topContext = this.helpers.createChildNavList(opts.$nav); 147 | var topLevel = this.helpers.getTopLevel(opts.$scope); 148 | var $headings = this.helpers.getHeadings(opts.$scope, topLevel); 149 | this.helpers.populateNav($topContext, topLevel, $headings); 150 | } 151 | }; 152 | 153 | $(function() { 154 | $('nav[data-toggle="toc"]').each(function(i, el) { 155 | var $nav = $(el); 156 | Toc.init($nav); 157 | }); 158 | }); 159 | })(); 160 | -------------------------------------------------------------------------------- /docs/docsearch.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // register a handler to move the focus to the search bar 4 | // upon pressing shift + "/" (i.e. "?") 5 | $(document).on('keydown', function(e) { 6 | if (e.shiftKey && e.keyCode == 191) { 7 | e.preventDefault(); 8 | $("#search-input").focus(); 9 | } 10 | }); 11 | 12 | $(document).ready(function() { 13 | // do keyword highlighting 14 | /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ 15 | var mark = function() { 16 | 17 | var referrer = document.URL ; 18 | var paramKey = "q" ; 19 | 20 | if (referrer.indexOf("?") !== -1) { 21 | var qs = referrer.substr(referrer.indexOf('?') + 1); 22 | var qs_noanchor = qs.split('#')[0]; 23 | var qsa = qs_noanchor.split('&'); 24 | var keyword = ""; 25 | 26 | for (var i = 0; i < qsa.length; i++) { 27 | var currentParam = qsa[i].split('='); 28 | 29 | if (currentParam.length !== 2) { 30 | continue; 31 | } 32 | 33 | if (currentParam[0] == paramKey) { 34 | keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); 35 | } 36 | } 37 | 38 | if (keyword !== "") { 39 | $(".contents").unmark({ 40 | done: function() { 41 | $(".contents").mark(keyword); 42 | } 43 | }); 44 | } 45 | } 46 | }; 47 | 48 | mark(); 49 | }); 50 | }); 51 | 52 | /* Search term highlighting ------------------------------*/ 53 | 54 | function matchedWords(hit) { 55 | var words = []; 56 | 57 | var hierarchy = hit._highlightResult.hierarchy; 58 | // loop to fetch from lvl0, lvl1, etc. 59 | for (var idx in hierarchy) { 60 | words = words.concat(hierarchy[idx].matchedWords); 61 | } 62 | 63 | var content = hit._highlightResult.content; 64 | if (content) { 65 | words = words.concat(content.matchedWords); 66 | } 67 | 68 | // return unique words 69 | var words_uniq = [...new Set(words)]; 70 | return words_uniq; 71 | } 72 | 73 | function updateHitURL(hit) { 74 | 75 | var words = matchedWords(hit); 76 | var url = ""; 77 | 78 | if (hit.anchor) { 79 | url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; 80 | } else { 81 | url = hit.url + '?q=' + escape(words.join(" ")); 82 | } 83 | 84 | return url; 85 | } 86 | -------------------------------------------------------------------------------- /docs/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/favicon-16x16.png -------------------------------------------------------------------------------- /docs/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/favicon-32x32.png -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/favicon.ico -------------------------------------------------------------------------------- /docs/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/logo.png -------------------------------------------------------------------------------- /docs/pkgdown.js: -------------------------------------------------------------------------------- 1 | /* http://gregfranko.com/blog/jquery-best-practices/ */ 2 | (function($) { 3 | $(function() { 4 | 5 | $('.navbar-fixed-top').headroom(); 6 | 7 | $('body').css('padding-top', $('.navbar').height() + 10); 8 | $(window).resize(function(){ 9 | $('body').css('padding-top', $('.navbar').height() + 10); 10 | }); 11 | 12 | $('[data-toggle="tooltip"]').tooltip(); 13 | 14 | var cur_path = paths(location.pathname); 15 | var links = $("#navbar ul li a"); 16 | var max_length = -1; 17 | var pos = -1; 18 | for (var i = 0; i < links.length; i++) { 19 | if (links[i].getAttribute("href") === "#") 20 | continue; 21 | // Ignore external links 22 | if (links[i].host !== location.host) 23 | continue; 24 | 25 | var nav_path = paths(links[i].pathname); 26 | 27 | var length = prefix_length(nav_path, cur_path); 28 | if (length > max_length) { 29 | max_length = length; 30 | pos = i; 31 | } 32 | } 33 | 34 | // Add class to parent
  • , and enclosing
  • if in dropdown 35 | if (pos >= 0) { 36 | var menu_anchor = $(links[pos]); 37 | menu_anchor.parent().addClass("active"); 38 | menu_anchor.closest("li.dropdown").addClass("active"); 39 | } 40 | }); 41 | 42 | function paths(pathname) { 43 | var pieces = pathname.split("/"); 44 | pieces.shift(); // always starts with / 45 | 46 | var end = pieces[pieces.length - 1]; 47 | if (end === "index.html" || end === "") 48 | pieces.pop(); 49 | return(pieces); 50 | } 51 | 52 | // Returns -1 if not found 53 | function prefix_length(needle, haystack) { 54 | if (needle.length > haystack.length) 55 | return(-1); 56 | 57 | // Special case for length-0 haystack, since for loop won't run 58 | if (haystack.length === 0) { 59 | return(needle.length === 0 ? 0 : -1); 60 | } 61 | 62 | for (var i = 0; i < haystack.length; i++) { 63 | if (needle[i] != haystack[i]) 64 | return(i); 65 | } 66 | 67 | return(haystack.length); 68 | } 69 | 70 | /* Clipboard --------------------------*/ 71 | 72 | function changeTooltipMessage(element, msg) { 73 | var tooltipOriginalTitle=element.getAttribute('data-original-title'); 74 | element.setAttribute('data-original-title', msg); 75 | $(element).tooltip('show'); 76 | element.setAttribute('data-original-title', tooltipOriginalTitle); 77 | } 78 | 79 | if(ClipboardJS.isSupported()) { 80 | $(document).ready(function() { 81 | var copyButton = ""; 82 | 83 | $("div.sourceCode").addClass("hasCopyButton"); 84 | 85 | // Insert copy buttons: 86 | $(copyButton).prependTo(".hasCopyButton"); 87 | 88 | // Initialize tooltips: 89 | $('.btn-copy-ex').tooltip({container: 'body'}); 90 | 91 | // Initialize clipboard: 92 | var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { 93 | text: function(trigger) { 94 | return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); 95 | } 96 | }); 97 | 98 | clipboardBtnCopies.on('success', function(e) { 99 | changeTooltipMessage(e.trigger, 'Copied!'); 100 | e.clearSelection(); 101 | }); 102 | 103 | clipboardBtnCopies.on('error', function() { 104 | changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); 105 | }); 106 | }); 107 | } 108 | })(window.jQuery || window.$) 109 | -------------------------------------------------------------------------------- /docs/pkgdown.yml: -------------------------------------------------------------------------------- 1 | pandoc: 3.1.1 2 | pkgdown: 2.0.7 3 | pkgdown_sha: ~ 4 | articles: 5 | dbparser: dbparser.html 6 | last_built: 2024-04-20T04:20Z 7 | 8 | -------------------------------------------------------------------------------- /docs/reference/Drugs.csv: -------------------------------------------------------------------------------- 1 | "" 2 | -------------------------------------------------------------------------------- /docs/reference/carr_poly_ex_identitys.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/carr_poly_ex_identitys.csv -------------------------------------------------------------------------------- /docs/reference/carr_poly_go.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/carr_poly_go.csv -------------------------------------------------------------------------------- /docs/reference/carr_poly_pfams.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/carr_poly_pfams.csv -------------------------------------------------------------------------------- /docs/reference/carr_poly_syn.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/carr_poly_syn.csv -------------------------------------------------------------------------------- /docs/reference/drug_affected_organisms.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_affected_organisms.csv -------------------------------------------------------------------------------- /docs/reference/drug_ahfs_codes.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_ahfs_codes.csv -------------------------------------------------------------------------------- /docs/reference/drug_articles.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_articles.csv -------------------------------------------------------------------------------- /docs/reference/drug_atc_codes.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_atc_codes.csv -------------------------------------------------------------------------------- /docs/reference/drug_books.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_books.csv -------------------------------------------------------------------------------- /docs/reference/drug_calculated_properties.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_calculated_properties.csv -------------------------------------------------------------------------------- /docs/reference/drug_carriers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_carriers.csv -------------------------------------------------------------------------------- /docs/reference/drug_carriers_actions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_carriers_actions.csv -------------------------------------------------------------------------------- /docs/reference/drug_carriers_articles.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_carriers_articles.csv -------------------------------------------------------------------------------- /docs/reference/drug_carriers_links.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_carriers_links.csv -------------------------------------------------------------------------------- /docs/reference/drug_carriers_polypeptide_external_identifiers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_carriers_polypeptide_external_identifiers.csv -------------------------------------------------------------------------------- /docs/reference/drug_carriers_polypeptide_pfams.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_carriers_polypeptide_pfams.csv -------------------------------------------------------------------------------- /docs/reference/drug_carriers_polypeptide_synonyms.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_carriers_polypeptide_synonyms.csv -------------------------------------------------------------------------------- /docs/reference/drug_carriers_polypeptides.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_carriers_polypeptides.csv -------------------------------------------------------------------------------- /docs/reference/drug_carriers_polypeptides_go_classifiers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_carriers_polypeptides_go_classifiers.csv -------------------------------------------------------------------------------- /docs/reference/drug_carriers_textbooks.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_carriers_textbooks.csv -------------------------------------------------------------------------------- /docs/reference/drug_categories.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_categories.csv -------------------------------------------------------------------------------- /docs/reference/drug_classifications.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_classifications.csv -------------------------------------------------------------------------------- /docs/reference/drug_dosages.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_dosages.csv -------------------------------------------------------------------------------- /docs/reference/drug_drug_interactions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_drug_interactions.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzy_poly_ex_identity.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzy_poly_ex_identity.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzy_poly_go.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzy_poly_go.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzy_poly_syn.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzy_poly_syn.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzymes.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzymes.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzymes_actions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzymes_actions.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzymes_articles.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzymes_articles.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzymes_links.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzymes_links.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzymes_polypeptide_external_identifiers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzymes_polypeptide_external_identifiers.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzymes_polypeptide_pfams.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzymes_polypeptide_pfams.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzymes_polypeptide_synonyms.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzymes_polypeptide_synonyms.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzymes_polypeptides.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzymes_polypeptides.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzymes_polypeptides_go_classifiers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzymes_polypeptides_go_classifiers.csv -------------------------------------------------------------------------------- /docs/reference/drug_enzymes_textbooks.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_enzymes_textbooks.csv -------------------------------------------------------------------------------- /docs/reference/drug_experimental_properties.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_experimental_properties.csv -------------------------------------------------------------------------------- /docs/reference/drug_external_identifiers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_external_identifiers.csv -------------------------------------------------------------------------------- /docs/reference/drug_external_links.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_external_links.csv -------------------------------------------------------------------------------- /docs/reference/drug_food_interactions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_food_interactions.csv -------------------------------------------------------------------------------- /docs/reference/drug_groups.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_groups.csv -------------------------------------------------------------------------------- /docs/reference/drug_international_brands.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_international_brands.csv -------------------------------------------------------------------------------- /docs/reference/drug_links.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_links.csv -------------------------------------------------------------------------------- /docs/reference/drug_manufacturers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_manufacturers.csv -------------------------------------------------------------------------------- /docs/reference/drug_mixtures.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_mixtures.csv -------------------------------------------------------------------------------- /docs/reference/drug_packagers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_packagers.csv -------------------------------------------------------------------------------- /docs/reference/drug_patents.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_patents.csv -------------------------------------------------------------------------------- /docs/reference/drug_pathway.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_pathway.csv -------------------------------------------------------------------------------- /docs/reference/drug_pathway_drugs.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_pathway_drugs.csv -------------------------------------------------------------------------------- /docs/reference/drug_pathway_enzymes.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_pathway_enzymes.csv -------------------------------------------------------------------------------- /docs/reference/drug_pdb_entries.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_pdb_entries.csv -------------------------------------------------------------------------------- /docs/reference/drug_prices.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_prices.csv -------------------------------------------------------------------------------- /docs/reference/drug_products.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_products.csv -------------------------------------------------------------------------------- /docs/reference/drug_reactions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_reactions.csv -------------------------------------------------------------------------------- /docs/reference/drug_reactions_enzymes.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_reactions_enzymes.csv -------------------------------------------------------------------------------- /docs/reference/drug_salts.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_salts.csv -------------------------------------------------------------------------------- /docs/reference/drug_sequences.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_sequences.csv -------------------------------------------------------------------------------- /docs/reference/drug_snp_adverse_drug_reactions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_snp_adverse_drug_reactions.csv -------------------------------------------------------------------------------- /docs/reference/drug_snp_effects.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_snp_effects.csv -------------------------------------------------------------------------------- /docs/reference/drug_syn.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_syn.csv -------------------------------------------------------------------------------- /docs/reference/drug_synonyms.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_synonyms.csv -------------------------------------------------------------------------------- /docs/reference/drug_targ.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targ.csv -------------------------------------------------------------------------------- /docs/reference/drug_targ_actions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targ_actions.csv -------------------------------------------------------------------------------- /docs/reference/drug_targ_articles.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targ_articles.csv -------------------------------------------------------------------------------- /docs/reference/drug_targ_links.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targ_links.csv -------------------------------------------------------------------------------- /docs/reference/drug_targ_poly_ex_identity.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targ_poly_ex_identity.csv -------------------------------------------------------------------------------- /docs/reference/drug_targ_poly_pfams.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targ_poly_pfams.csv -------------------------------------------------------------------------------- /docs/reference/drug_targ_poly_syn.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targ_poly_syn.csv -------------------------------------------------------------------------------- /docs/reference/drug_targ_polys.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targ_polys.csv -------------------------------------------------------------------------------- /docs/reference/drug_targ_polys_go.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targ_polys_go.csv -------------------------------------------------------------------------------- /docs/reference/drug_targ_textbooks.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targ_textbooks.csv -------------------------------------------------------------------------------- /docs/reference/drug_targets.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targets.csv -------------------------------------------------------------------------------- /docs/reference/drug_targets_actions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targets_actions.csv -------------------------------------------------------------------------------- /docs/reference/drug_targets_articles.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targets_articles.csv -------------------------------------------------------------------------------- /docs/reference/drug_targets_links.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targets_links.csv -------------------------------------------------------------------------------- /docs/reference/drug_targets_polypeptide_external_identifiers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targets_polypeptide_external_identifiers.csv -------------------------------------------------------------------------------- /docs/reference/drug_targets_polypeptide_pfams.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targets_polypeptide_pfams.csv -------------------------------------------------------------------------------- /docs/reference/drug_targets_polypeptide_synonyms.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targets_polypeptide_synonyms.csv -------------------------------------------------------------------------------- /docs/reference/drug_targets_polypeptides.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targets_polypeptides.csv -------------------------------------------------------------------------------- /docs/reference/drug_targets_polypeptides_go_classifiers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targets_polypeptides_go_classifiers.csv -------------------------------------------------------------------------------- /docs/reference/drug_targets_textbooks.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_targets_textbooks.csv -------------------------------------------------------------------------------- /docs/reference/drug_trans_actions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_trans_actions.csv -------------------------------------------------------------------------------- /docs/reference/drug_trans_articles.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_trans_articles.csv -------------------------------------------------------------------------------- /docs/reference/drug_trans_links.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_trans_links.csv -------------------------------------------------------------------------------- /docs/reference/drug_trans_poly_ex_identity.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_trans_poly_ex_identity.csv -------------------------------------------------------------------------------- /docs/reference/drug_trans_poly_syn.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_trans_poly_syn.csv -------------------------------------------------------------------------------- /docs/reference/drug_trans_polys.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_trans_polys.csv -------------------------------------------------------------------------------- /docs/reference/drug_trans_polys_go.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_trans_polys_go.csv -------------------------------------------------------------------------------- /docs/reference/drug_trans_polys_pfams.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_trans_polys_pfams.csv -------------------------------------------------------------------------------- /docs/reference/drug_trans_textbooks.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_trans_textbooks.csv -------------------------------------------------------------------------------- /docs/reference/drug_transporter_polypeptide_synonyms.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_transporter_polypeptide_synonyms.csv -------------------------------------------------------------------------------- /docs/reference/drug_transporters.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_transporters.csv -------------------------------------------------------------------------------- /docs/reference/drug_transporters_actions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_transporters_actions.csv -------------------------------------------------------------------------------- /docs/reference/drug_transporters_articles.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_transporters_articles.csv -------------------------------------------------------------------------------- /docs/reference/drug_transporters_links.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_transporters_links.csv -------------------------------------------------------------------------------- /docs/reference/drug_transporters_polypeptide_external_identifiers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_transporters_polypeptide_external_identifiers.csv -------------------------------------------------------------------------------- /docs/reference/drug_transporters_polypeptides.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_transporters_polypeptides.csv -------------------------------------------------------------------------------- /docs/reference/drug_transporters_polypeptides_go_classifiers.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_transporters_polypeptides_go_classifiers.csv -------------------------------------------------------------------------------- /docs/reference/drug_transporters_polypeptides_pfams.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_transporters_polypeptides_pfams.csv -------------------------------------------------------------------------------- /docs/reference/drug_transporters_textbooks.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/drug_transporters_textbooks.csv -------------------------------------------------------------------------------- /docs/reference/figures/README-pressure-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/figures/README-pressure-1.png -------------------------------------------------------------------------------- /docs/reference/figures/README-unnamed-chunk-2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/figures/README-unnamed-chunk-2-1.png -------------------------------------------------------------------------------- /docs/reference/figures/README-unnamed-chunk-3-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/figures/README-unnamed-chunk-3-1.png -------------------------------------------------------------------------------- /docs/reference/figures/README-unnamed-chunk-4-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/figures/README-unnamed-chunk-4-1.png -------------------------------------------------------------------------------- /docs/reference/figures/fig1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/figures/fig1.png -------------------------------------------------------------------------------- /docs/reference/figures/fig2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/figures/fig2.png -------------------------------------------------------------------------------- /docs/reference/figures/fig3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/figures/fig3.png -------------------------------------------------------------------------------- /docs/reference/figures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/figures/logo.png -------------------------------------------------------------------------------- /docs/reference/snp_adverse_reactions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/docs/reference/snp_adverse_reactions.csv -------------------------------------------------------------------------------- /inst/CITATION: -------------------------------------------------------------------------------- 1 | citHeader("To cite dbparser in publications use:") 2 | 3 | year <- sub("-.*", "", meta$Date) 4 | note <- sprintf("R package version %s", meta$Version) 5 | 6 | bibentry( 7 | bibtype = "manual", 8 | title = "DrugBank Database XML Parser", 9 | author = c(person("Mohammed", "Ali"), 10 | person("Ali", "Ezzat")), 11 | organization = "Interstellar for Consultinc inc.", 12 | year = year, 13 | note = note, 14 | url = "https://CRAN.R-project.org/package=dbparser", 15 | textVersion = paste0("Mohammed Ali, Ali Ezzat (", year,"). 16 | dbparser: DrugBank Database XML Parser. ", note, ".") 17 | ) 18 | -------------------------------------------------------------------------------- /inst/drug_groups.RDS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/inst/drug_groups.RDS -------------------------------------------------------------------------------- /inst/drugs.RDS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/inst/drugs.RDS -------------------------------------------------------------------------------- /inst/extdata/drugbank_record.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/inst/extdata/drugbank_record.zip -------------------------------------------------------------------------------- /inst/targets_actions.RDS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/inst/targets_actions.RDS -------------------------------------------------------------------------------- /man/add_drugbank_info.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/dvobject_metadata.R 3 | \name{add_drugbank_info} 4 | \alias{add_drugbank_info} 5 | \title{add_drugbank_info 6 | Add passed DrugBank db metadata to passed dvobject} 7 | \usage{ 8 | add_drugbank_info(dvobject) 9 | } 10 | \value{ 11 | dvobject 12 | } 13 | \description{ 14 | add_drugbank_info 15 | Add passed DrugBank db metadata to passed dvobject 16 | } 17 | \keyword{internal} 18 | -------------------------------------------------------------------------------- /man/articles.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/references_parsers.R 3 | \name{articles} 4 | \alias{articles} 5 | \alias{drugs_articles} 6 | \alias{carriers_articles} 7 | \alias{enzymes_articles} 8 | \alias{targets_articles} 9 | \alias{transporters_articles} 10 | \title{Drugs/ Carriers/ Enzymes/ Targets/ Transporters articles element parser} 11 | \usage{ 12 | drugs_articles() 13 | 14 | carriers_articles() 15 | 16 | enzymes_articles() 17 | 18 | targets_articles() 19 | 20 | transporters_articles() 21 | } 22 | \value{ 23 | a tibble with 4 variables: 24 | \describe{ 25 | \item{ref-id}{Identifier for the article being referenced. 26 | This is unique across all reference types (books, links, article, 27 | attachments).} 28 | \item{pubmed-id}{The PubMed identifier for the article.} 29 | \item{citation}{Article citation in a standard format.} 30 | \item{\emph{parent_id}}{drug/carrier/target/enzyme/transporter id} 31 | } 32 | } 33 | \description{ 34 | Return a list of articles that were used as references for drugs carriers 35 | } 36 | \keyword{internal} 37 | -------------------------------------------------------------------------------- /man/attachments.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/references_parsers.R 3 | \name{attachments} 4 | \alias{attachments} 5 | \alias{drugs_attachments} 6 | \alias{carriers_attachments} 7 | \alias{enzymes_attachments} 8 | \alias{targets_attachments} 9 | \alias{transporters_attachments} 10 | \title{Drugs/ Carriers/ Enzymes/ Targets/ Transporters attachments element parser} 11 | \usage{ 12 | drugs_attachments() 13 | 14 | carriers_attachments() 15 | 16 | enzymes_attachments() 17 | 18 | targets_attachments() 19 | 20 | transporters_attachments() 21 | } 22 | \value{ 23 | a tibble with 4 variables: 24 | \describe{ 25 | \item{ref-id}{Identifier for the article being referenced. 26 | This is unique across all reference types (books, links, article, 27 | attachments).} 28 | \item{title}{The title of the attachment.} 29 | \item{url}{The url to download the attachment from.} 30 | \item{\emph{parent_id}}{drug/carrier/target/enzyme/transporter id} 31 | } 32 | } 33 | \description{ 34 | Return a list of attachment that were used as references for drugs carriers 35 | } 36 | \keyword{internal} 37 | -------------------------------------------------------------------------------- /man/books.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/references_parsers.R 3 | \name{books} 4 | \alias{books} 5 | \alias{drugs_textbooks} 6 | \alias{carriers_textbooks} 7 | \alias{enzymes_textbooks} 8 | \alias{targets_textbooks} 9 | \alias{transporters_textbooks} 10 | \title{Drugs/ Carriers/ Enzymes/ Targets/ Transporters books element parser} 11 | \usage{ 12 | drugs_textbooks() 13 | 14 | carriers_textbooks() 15 | 16 | enzymes_textbooks() 17 | 18 | targets_textbooks() 19 | 20 | transporters_textbooks() 21 | } 22 | \value{ 23 | a tibble with 4 variables: 24 | \describe{ 25 | \item{ref-id}{Identifier for the article being referenced. 26 | This is unique across all reference types (books, links, article, 27 | attachments).} 28 | \item{isbn}{ISBN identifying the textbook.} 29 | \item{citation}{A Textbook citation in a standard format.} 30 | \item{\emph{parent_id}}{drug/ carrier/ target/ enzyme/ transporter id} 31 | } 32 | } 33 | \description{ 34 | Return a list of text books that were used as references for drugs, carriers, 35 | enzymes, targets or transporters 36 | } 37 | \keyword{internal} 38 | -------------------------------------------------------------------------------- /man/cett_actions_doc.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cett_actions_parsers.R 3 | \name{cett_actions_doc} 4 | \alias{cett_actions_doc} 5 | \alias{carriers_actions} 6 | \alias{enzymes_actions} 7 | \alias{targets_actions} 8 | \alias{transporters_actions} 9 | \title{Carriers/ Enzymes/ Targets/ Transporters Actions parsers} 10 | \usage{ 11 | carriers_actions() 12 | 13 | enzymes_actions() 14 | 15 | targets_actions() 16 | 17 | transporters_actions() 18 | } 19 | \value{ 20 | a tibble with 2 variables: 21 | \describe{ 22 | \item{action}{describe related action} 23 | \item{\emph{parent_id}}{carrier/ target/ enzyme/ transporter id} 24 | } 25 | } 26 | \description{ 27 | Collection of related actions 28 | } 29 | \keyword{internal} 30 | -------------------------------------------------------------------------------- /man/cett_doc.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cett_general_information_parsers.R 3 | \name{cett_doc} 4 | \alias{cett_doc} 5 | \alias{carriers} 6 | \alias{enzymes} 7 | \alias{targets} 8 | \alias{transporters} 9 | \title{Carriers/ Enzymes/ Targets/ Transporters parsers} 10 | \usage{ 11 | carriers() 12 | 13 | enzymes() 14 | 15 | targets() 16 | 17 | transporters() 18 | } 19 | \value{ 20 | a tibble with 6 variables (8 for enzymes): 21 | \describe{ 22 | \item{id}{Universal Protein Resource (UniProt) Identifier for the record} 23 | \item{name}{related name} 24 | \item{organism}{Organism that the protein comes from.} 25 | \item{known_action}{Whether the pharmacological action of the drug is due 26 | to this target interaction.} 27 | \item{inhibition-strength}{Whether the strength of enzyme inhibition is 28 | strong, moderate, or unknown. \strong{Only applies to enzymes}} 29 | \item{induction-strength}{Whether the strength of enzyme induction is 30 | strong or unknown. \strong{Only applies to enzymes}} 31 | \item{position}{related position} 32 | \item{parent_id}{drugbank id} 33 | } 34 | } 35 | \description{ 36 | Protein targets of drug action, enzymes that are inhibited/induced or 37 | involved in metabolism, and carrier or transporter proteins involved in 38 | movement of the drug across biological membranes. 39 | } 40 | \keyword{internal} 41 | -------------------------------------------------------------------------------- /man/cett_ex_identity_doc.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cett_polypeptide_others_parsers.R 3 | \name{cett_ex_identity_doc} 4 | \alias{cett_ex_identity_doc} 5 | \alias{carriers_polypep_ex_ident} 6 | \alias{enzymes_polypep_ex_ident} 7 | \alias{targets_polypep_ex_ident} 8 | \alias{transporters_polypep_ex_ident} 9 | \title{Carriers/ Enzymes/ Targets/ Transporters Polypeptide External Identifiers 10 | parsers} 11 | \usage{ 12 | carriers_polypep_ex_ident() 13 | 14 | enzymes_polypep_ex_ident() 15 | 16 | targets_polypep_ex_ident() 17 | 18 | transporters_polypep_ex_ident() 19 | } 20 | \value{ 21 | a tibble with 3 variables: 22 | \describe{ 23 | \item{resource}{Name of the source database.} 24 | \item{identifier}{Identifier for this drug in the given resource.} 25 | \item{parent_key}{polypeptide id} 26 | } 27 | } 28 | \description{ 29 | Extract descriptions of identified polypeptide external identifiers for 30 | targets, enzymes, carriers, or transporters. 31 | } 32 | \keyword{internal} 33 | -------------------------------------------------------------------------------- /man/cett_go_doc.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cett_polypeptide_others_parsers.R 3 | \name{cett_go_doc} 4 | \alias{cett_go_doc} 5 | \alias{carriers_polypeptides_go} 6 | \alias{enzymes_polypeptides_go} 7 | \alias{targets_polypeptides_go} 8 | \alias{transporters_polypeptides_go} 9 | \title{Carriers/ Enzymes/ Targets/ Transporters Polypeptide GO Classifier 10 | parsers} 11 | \usage{ 12 | carriers_polypeptides_go() 13 | 14 | enzymes_polypeptides_go() 15 | 16 | targets_polypeptides_go() 17 | 18 | transporters_polypeptides_go() 19 | } 20 | \value{ 21 | a tibble with 3 variables: 22 | \describe{ 23 | \item{category}{} 24 | \item{description}{} 25 | \item{parent_key}{polypeptide id} 26 | } 27 | } 28 | \description{ 29 | Extract descriptions of identified polypeptide go classifier for targets, 30 | enzymes, carriers, or transporters. 31 | } 32 | \keyword{internal} 33 | -------------------------------------------------------------------------------- /man/cett_nodes_options.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drugbank_parser.R 3 | \name{cett_nodes_options} 4 | \alias{cett_nodes_options} 5 | \title{returns carriers, enzymes,targets and transporters node valid options.} 6 | \usage{ 7 | cett_nodes_options() 8 | } 9 | \value{ 10 | list of CETT valid options 11 | } 12 | \description{ 13 | returns carriers, enzymes,targets and transporters node valid options. 14 | } 15 | \seealso{ 16 | Other parsers: 17 | \code{\link{drug_node_options}()}, 18 | \code{\link{parseDrugBank}()}, 19 | \code{\link{references_node_options}()} 20 | } 21 | \concept{parsers} 22 | -------------------------------------------------------------------------------- /man/cett_poly_doc.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cett_polypeptide_general_infromation_parsers.R 3 | \name{cett_poly_doc} 4 | \alias{cett_poly_doc} 5 | \alias{carriers_polypeptides} 6 | \alias{enzymes_polypeptides} 7 | \alias{targets_polypeptides} 8 | \alias{transporters_polypeptides} 9 | \title{Carriers/ Enzymes/ Targets/ Transporters Polypeptide parsers} 10 | \usage{ 11 | carriers_polypeptides() 12 | 13 | enzymes_polypeptides() 14 | 15 | targets_polypeptides() 16 | 17 | transporters_polypeptides() 18 | } 19 | \value{ 20 | a tibble with 20 variables: 21 | \describe{ 22 | \item{id}{\href{https://www.uniprot.org/}{Universal Protein Resource 23 | (UniProt) identifier}} 24 | \item{source}{Specifies whether the identified polypeptide ID is 25 | associated with any of the following UniProt knowledge bases: 26 | Swiss-Prot, which is manually annotated and reviewed, or TrEMBL, 27 | which is automatically annotated and not reviewed.} 28 | \item{name}{} 29 | \item{general_function}{General summary of the physiological function of 30 | the polypeptide} 31 | \item{specific_function}{A more specific description of the polypeptide’s 32 | physiological function within the cell.} 33 | \item{gene_name}{The short name commonly associated with the associated 34 | gene. Eg. PTGS1.} 35 | \item{locus}{The specific chromosomal location or position of the gene’s 36 | sequence on a chromosome.} 37 | \item{cellular_location}{The cellular location of the polypeptide.} 38 | \item{transmembrane_regions}{Areas of the polypeptide sequence that span 39 | a biological membrane.} 40 | \item{signal_regions}{Location of any signal peptides within the 41 | polypeptide sequence.} 42 | \item{theoretical_pi}{Theoretical isoelectric point.} 43 | \item{molecular_weight}{The molecular weight of the polypeptide.} 44 | \item{chromosome_location}{The chromosomal location of the polypeptide 45 | gene} 46 | \item{organism}{The organism in which this polypeptide functions.} 47 | \item{organism_ncbi_taxonomy_id}{} 48 | \item{amino_acid_sequence}{The amino acid sequence of the polypeptide} 49 | \item{amino_acid_format}{} 50 | \item{gene_sequence}{The sequence of the associated gene.} 51 | \item{gene_format}{} 52 | \item{parent_key}{carrier/ target/ enzyme/ transporter id} 53 | } 54 | } 55 | \description{ 56 | Extract descriptions of identified polypeptide targets, enzymes, carriers, 57 | or transporters. 58 | } 59 | \keyword{internal} 60 | -------------------------------------------------------------------------------- /man/cett_poly_pfms_doc.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cett_polypeptide_others_parsers.R 3 | \name{cett_poly_pfms_doc} 4 | \alias{cett_poly_pfms_doc} 5 | \alias{carriers_polypeptides_pfams} 6 | \alias{enzymes_polypeptides_pfams} 7 | \alias{targets_polypeptides_pfams} 8 | \alias{transporters_polypeptides_pfams} 9 | \title{Carriers/ Enzymes/ Targets/ Transporters Polypeptide PFAMS parsers} 10 | \usage{ 11 | carriers_polypeptides_pfams() 12 | 13 | enzymes_polypeptides_pfams() 14 | 15 | targets_polypeptides_pfams() 16 | 17 | transporters_polypeptides_pfams() 18 | } 19 | \value{ 20 | a tibble with 3 variables: 21 | \describe{ 22 | \item{name}{The sequence of the associated gene.} 23 | \item{identifier}{} 24 | \item{parent_key}{polypeptide id} 25 | } 26 | } 27 | \description{ 28 | Extract descriptions of identified polypeptide PFAMS targets, enzymes, 29 | carriers, or transporters. 30 | } 31 | \keyword{internal} 32 | -------------------------------------------------------------------------------- /man/cett_poly_syn_doc.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/cett_polypeptide_others_parsers.R 3 | \name{cett_poly_syn_doc} 4 | \alias{cett_poly_syn_doc} 5 | \alias{carriers_polypeptides_syn} 6 | \alias{enzymes_polypeptides_syn} 7 | \alias{targets_polypeptides_syn} 8 | \alias{transporters_polypeptides_syn} 9 | \title{Carriers/ Enzymes/ Targets/ Transporters Polypeptide Synonyms parsers} 10 | \usage{ 11 | carriers_polypeptides_syn() 12 | 13 | enzymes_polypeptides_syn() 14 | 15 | targets_polypeptides_syn() 16 | 17 | transporters_polypeptides_syn() 18 | } 19 | \value{ 20 | a tibble with 2 variables: 21 | \describe{ 22 | \item{synonym}{} 23 | \item{parent_key}{polypeptide id} 24 | } 25 | } 26 | \description{ 27 | Extract descriptions of identified polypeptide synonyms for targets, 28 | enzymes, carriers, or transporters. 29 | } 30 | \keyword{internal} 31 | -------------------------------------------------------------------------------- /man/dbparser.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/dbparser-package.R 3 | \docType{package} 4 | \name{dbparser} 5 | \alias{dbparser} 6 | \alias{dbparser-package} 7 | \title{dbparser: A package for reading and parsing \strong{DrugBank} xml database.} 8 | \description{ 9 | The main purpose of the `dbparser` package is to parse 10 | [DrugBank](https://go.drugbank.com/) database which is downloadable in XML format 11 | from [this link](https://go.drugbank.com/releases/latest). 12 | } 13 | \details{ 14 | The parsed data can then be explored and analyzed. 15 | 16 | 17 | To achieve this purpose, `dbparser`` package provides three main categories 18 | of functions: 19 | 20 | - xml db reader, 21 | 22 | - \strong{DrugBank} elements parsers, 23 | 24 | For more information kindly check the 25 | reference/index (https://docs.ropensci.org/dbparser/reference/index.html) 26 | } 27 | \section{xml db reader functions}{ 28 | 29 | Reads \strong{DrugBank} xml database and build drug elements full tree in 30 | memory 31 | } 32 | 33 | \section{parsers functions}{ 34 | 35 | Each parser function is responsible of parsing certain drug element and 36 | returning its tibble. 37 | 38 | Check this tutorial 39 | (https://docs.ropensci.org/dbparser/articles/dbparser.html) 40 | } 41 | 42 | \seealso{ 43 | Useful links: 44 | \itemize{ 45 | \item \url{https://docs.ropensci.org/dbparser/} 46 | \item \url{https://github.com/ropensci/dbparser} 47 | \item Report bugs at \url{https://github.com/ropensci/dbparser/issues} 48 | } 49 | 50 | } 51 | \author{ 52 | \strong{Maintainer}: Mohammed Ali \email{moh_fcis@yahoo.com} 53 | 54 | Authors: 55 | \itemize{ 56 | \item Ali Ezzat \email{ali_ezzat85@yahoo.com} 57 | } 58 | 59 | Other contributors: 60 | \itemize{ 61 | \item Hao Zhu \email{haozhu233@gmail.com} [reviewer] 62 | \item Emma Mendelsohn [reviewer] 63 | } 64 | 65 | } 66 | \keyword{internal} 67 | -------------------------------------------------------------------------------- /man/drug_affected_organisms.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_affected_organisms} 4 | \alias{drug_affected_organisms} 5 | \title{Drug Affected Organism parser} 6 | \usage{ 7 | drug_affected_organisms() 8 | } 9 | \value{ 10 | a tibble with 2 variables: 11 | \describe{ 12 | \item{affected-organism}{affected-organism name} 13 | \item{\emph{drugbank_id}}{drugbank id} 14 | } 15 | } 16 | \description{ 17 | Organisms in which the drug may display activity; activity may depend on 18 | local susceptibility patterns and resistance. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/drug_ahfs_codes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_ahfs_codes} 4 | \alias{drug_ahfs_codes} 5 | \title{Drug ahfs-codes parser} 6 | \usage{ 7 | drug_ahfs_codes() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{ahfs-code}{} 13 | \item{\emph{drugbank_id}}{drugbank id} 14 | } 15 | } 16 | \description{ 17 | The American Hospital Formulary Service (AHFS) identifier for this drug. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /man/drug_atc_codes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_atc_codes_node_parser.R 3 | \name{drug_atc_codes} 4 | \alias{drug_atc_codes} 5 | \title{Drug ATC Codes element parser} 6 | \usage{ 7 | drug_atc_codes() 8 | } 9 | \value{ 10 | a tibble with 10 variables 11 | } 12 | \description{ 13 | The Anatomical Therapeutic Classification (ATC) code for the drug assigned 14 | by the World Health Organization Anatomical Chemical Classification System. 15 | } 16 | \details{ 17 | Each `atc-code`` row has one or more level. The atc-code and level> 18 | have a code the code assigned by the World Health Organization Anatomical 19 | Therapeutic Chemical Classification system. 20 | } 21 | \keyword{internal} 22 | -------------------------------------------------------------------------------- /man/drug_calc_prop.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_calc_prop} 4 | \alias{drug_calc_prop} 5 | \title{Drug Calculated Properties parser} 6 | \usage{ 7 | drug_calc_prop() 8 | } 9 | \value{ 10 | a tibble with 4 variables: 11 | \describe{ 12 | \item{kind}{Name of the property.} 13 | \item{value}{Predicted physicochemical properties; obtained by the use of 14 | prediction software such as ALGOPS and ChemAxon.} 15 | \item{source}{Name of the software used to calculate this property, 16 | either ChemAxon or ALOGPS.} 17 | \item{\emph{drugbank_id}}{drugbank id} 18 | } 19 | } 20 | \description{ 21 | Drug properties that have been predicted by ChemAxon or ALOGPS based on the 22 | imputed chemical structure. Associated links below will redirect to 23 | descriptions of the specific term. 24 | } 25 | \keyword{internal} 26 | -------------------------------------------------------------------------------- /man/drug_categories.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_categories} 4 | \alias{drug_categories} 5 | \title{Drug Categories parser} 6 | \usage{ 7 | drug_categories() 8 | } 9 | \value{ 10 | a tibble with 2 variables: 11 | \describe{ 12 | \item{category}{category name} 13 | \item{mesh-id}{The Medical Subjects Headings (MeSH) identifier for the 14 | category.} 15 | \item{\emph{drugbank_id}}{drugbank id} 16 | } 17 | } 18 | \description{ 19 | General categorizations of the drug. 20 | } 21 | \keyword{internal} 22 | -------------------------------------------------------------------------------- /man/drug_classification.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_classfication_node_parser.R 3 | \name{drug_classification} 4 | \alias{drug_classification} 5 | \title{Drug Classification parser} 6 | \usage{ 7 | drug_classification() 8 | } 9 | \value{ 10 | a tibble with 9 variables: 11 | \describe{ 12 | \item{description}{} 13 | \item{direct-parent}{} 14 | \item{kingdom}{} 15 | \item{superclass}{} 16 | \item{class}{} 17 | \item{subclass}{} 18 | \item{alternative-parent}{One or more alternative parents} 19 | \item{substituent}{One or more substituents} 20 | \item{\emph{drugbank_id}}{drugbank id} 21 | } 22 | } 23 | \description{ 24 | A description of the hierarchical chemical classification of the drug; 25 | imported from ClassyFire. 26 | } 27 | \keyword{internal} 28 | -------------------------------------------------------------------------------- /man/drug_dosages.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_dosages} 4 | \alias{drug_dosages} 5 | \title{Drug Dosages parser} 6 | \usage{ 7 | drug_dosages() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{form}{The pharmaceutical formulation by which the drug is introduced 13 | into the body} 14 | \item{route}{The path by which the drug or product is taken into the body.} 15 | \item{strength}{The amount of active drug ingredient provided in the dosage} 16 | \item{\emph{drugbank_id}}{drugbank id} 17 | } 18 | } 19 | \description{ 20 | A list of the commercially available dosages of the drug. 21 | } 22 | \keyword{internal} 23 | -------------------------------------------------------------------------------- /man/drug_ex_identity.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_ex_identity} 4 | \alias{drug_ex_identity} 5 | \title{Drug External Identifiers parser} 6 | \usage{ 7 | drug_ex_identity() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{resource}{Name of the source database.} 13 | \item{identifier}{Identifier for this drug in the given resource.} 14 | \item{\emph{drugbank_id}}{drugbank id} 15 | } 16 | } 17 | \description{ 18 | Identifiers used in other websites or databases providing information about 19 | this drug. 20 | } 21 | \keyword{internal} 22 | -------------------------------------------------------------------------------- /man/drug_exp_prop.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_exp_prop} 4 | \alias{drug_exp_prop} 5 | \title{Drug Experimental Properties parser} 6 | \usage{ 7 | drug_exp_prop() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{kind}{Name of the property.} 13 | \item{value}{Drug properties that have been experimentally proven.} 14 | \item{source}{Reference to the source of this experimental data.} 15 | \item{\emph{drugbank_id}}{drugbank id} 16 | } 17 | 18 | The following experimental properties are provided: 19 | \describe{ 20 | \item{Water Solubility}{The experimentally determined aqueous solubility 21 | of the molecule.} 22 | \item{Molecular Formula}{Protein formula of Biotech drugs} 23 | \item{Molecular Weight}{Protein weight of Biotech drugs.} 24 | \item{Melting Point}{The experimentally determined temperature at which the 25 | drug molecule changes from solid to liquid at atmospheric temperature.} 26 | \item{Boiling Point}{The experimentally determined temperature at which the 27 | drug molecule changes from liquid to gas at atmospheric temperature.} 28 | \item{Hydrophobicity}{The ability of a molecule to repel water rather than 29 | absorb or dissolve water.} 30 | \item{Isoelectric Point}{The pH value at which the net electric charge of a 31 | molecule is zero.} 32 | \item{caco2 Permeability}{A continuous line of heterogenous human epithelial 33 | colorectal adenocarcinoma cells, CAC02 cells are employed as a model of 34 | human intestinal absorption of various drugs and compounds. CAC02 cell 35 | permeability is ultimately an assay to measure drug absorption.} 36 | \item{pKa}{The experimentally determined pka value of the molecule} 37 | \item{logP}{The experimentally determined partition coefficient (LogP) 38 | based on the ratio of solubility of the molecule in 1-octanol compared to 39 | water.} 40 | \item{logS}{The intrinsic solubility of a given compound is the 41 | concentration in equilibrium with its solid phase that dissolves into 42 | solution, given as the natural logarithm (LogS) of the concentration.} 43 | \item{Radioactivity}{The property to spontaneously emit particles 44 | (alpha, beta, neutron) or radiation (gamma, K capture), or both at the same 45 | time, from the decay of certain nuclides.} 46 | } 47 | } 48 | \description{ 49 | Drug properties that have been experimentally proven 50 | } 51 | \keyword{internal} 52 | -------------------------------------------------------------------------------- /man/drug_external_links.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_external_links} 4 | \alias{drug_external_links} 5 | \title{Drug External Links parser} 6 | \usage{ 7 | drug_external_links() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{resource}{Name of the source website.} 13 | \item{identifier}{Identifier for this drug in the given resource} 14 | \item{\emph{drugbank_id}}{drugbank id} 15 | } 16 | } 17 | \description{ 18 | Links to other websites or databases providing information about this drug. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/drug_food_interactions.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_food_interactions} 4 | \alias{drug_food_interactions} 5 | \title{Drug Groups parser} 6 | \usage{ 7 | drug_food_interactions() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{food-interaction}{} 13 | \item{\emph{drugbank_id}}{drugbank id} 14 | } 15 | } 16 | \description{ 17 | Food that may interact with this drug. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /man/drug_general_information.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_main_node_parser.R 3 | \name{drug_general_information} 4 | \alias{drug_general_information} 5 | \title{Drugs General Information parser} 6 | \usage{ 7 | drug_general_information() 8 | } 9 | \value{ 10 | a tibble with 15 variables: 11 | \describe{ 12 | \item{primary_key}{DrugBank id} 13 | \item{other_keys}{Other identifiers that may be associated with the drug} 14 | \item{type}{ Either small molecule, or biotech. Biotech is used for any 15 | drug that is derived from living systems or organisms, usually composed of 16 | high molecular weight mixtures of protein, while small molecule describes 17 | a low molecular weight organic compound.} 18 | \item{name}{} 19 | \item{created}{Date that this drug was first added to DrugBank.} 20 | \item{updated}{Denotes when this drug was last updated in DrugBank.} 21 | \item{description}{Descriptions of drug chemical properties, 22 | history and regulatory status.} 23 | \item{cas_number}{The Chemical Abstracts Service (CAS) registry number 24 | assigned to the drug.} 25 | \item{\emph{unii}}{Unique Ingredient Identifier (UNII) of this drug.} 26 | \item{average_mass}{The weighted average of the isotopic masses of the 27 | drug} 28 | \item{state}{One of solid, liquid, or gas} 29 | \item{monoisotopic_mass}{The mass of the most abundant isotope of the drug} 30 | \item{synthesis_reference}{Citation for synthesis of the drug molecule.} 31 | \item{fda_label}{Contains a URL for accessing the uploaded United States Food 32 | and Drug Administration (FDA) Monograph for this drug.} 33 | \item{msds}{Contains a URL for accessing the Material Safety Data Sheet 34 | (MSDS) for this drug.} 35 | } 36 | } 37 | \description{ 38 | A description of the hierarchical chemical classification of the drug; 39 | imported from ClassyFire. 40 | } 41 | \keyword{internal} 42 | -------------------------------------------------------------------------------- /man/drug_groups.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_groups} 4 | \alias{drug_groups} 5 | \title{Drug Groups parser} 6 | \usage{ 7 | drug_groups() 8 | } 9 | \value{ 10 | a tibble with 2 variables: 11 | \describe{ 12 | \item{group}{} 13 | \item{\emph{drugbank_id}}{drugbank id} 14 | } 15 | } 16 | \description{ 17 | Groups that this drug belongs to. May include any of: approved, vet_approved, 18 | nutraceutical, illicit, withdrawn, investigational, and experimental. 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/drug_interactions.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_interactions} 4 | \alias{drug_interactions} 5 | \title{Drug Interactions parser} 6 | \usage{ 7 | drug_interactions() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{drugbank-id }{DrugBank ID of the interacting drug.} 13 | \item{name}{Name of the interacting drug.} 14 | \item{description}{Textual description of the physiological consequences 15 | of the drug interaction} 16 | \item{\emph{drugbank_id}}{parent drugbank id} 17 | } 18 | } 19 | \description{ 20 | Drug-drug interactions detailing drugs that, when administered concomitantly 21 | with the drug of interest, will affect its activity or result in adverse 22 | effects. These interactions may be synergistic or antagonistic depending on 23 | the physiological effects and mechanism of action of each drug. 24 | } 25 | \keyword{internal} 26 | -------------------------------------------------------------------------------- /man/drug_intern_brand.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_intern_brand} 4 | \alias{drug_intern_brand} 5 | \title{Drug International Brands parser} 6 | \usage{ 7 | drug_intern_brand() 8 | } 9 | \value{ 10 | a tibble with 4 variables: 11 | \describe{ 12 | \item{brand}{The proprietary, well-known name for given to this drug by a 13 | manufacturer.} 14 | \item{company}{The company or manufacturer that uses this name.} 15 | \item{\emph{drugbank_id}}{drugbank id} 16 | } 17 | } 18 | \description{ 19 | The proprietary names used by the manufacturers for commercially available 20 | forms of the drug, focusing on brand names for products that are available 21 | in countries other than Canada and the Unites States. 22 | } 23 | \keyword{internal} 24 | -------------------------------------------------------------------------------- /man/drug_manufacturers.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_manufacturer_node_parser.R 3 | \name{drug_manufacturers} 4 | \alias{drug_manufacturers} 5 | \title{Drug Manufacturers parser} 6 | \usage{ 7 | drug_manufacturers() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{generic}{A list of companies that are manufacturing the generic 13 | form of the drug.} 14 | \item{url}{A link to the companies that are manufacturing the drug.} 15 | \item{\emph{drugbank_id}}{drugbank id} 16 | } 17 | } 18 | \description{ 19 | A list of companies that are manufacturing the commercially available forms 20 | of this drug that are available in Canada and the Unites States. 21 | } 22 | \keyword{internal} 23 | -------------------------------------------------------------------------------- /man/drug_mixtures.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_mixtures} 4 | \alias{drug_mixtures} 5 | \title{Drug Mixtures parser} 6 | \usage{ 7 | drug_mixtures() 8 | } 9 | \value{ 10 | a tibble with 4 variables: 11 | \describe{ 12 | \item{name}{The proprietary name provided by the manufacturer for this 13 | combination product.} 14 | \item{ingredients}{A list of ingredients, separated by addition symbols} 15 | \item{supplemental-ingredients}{List of additional active ingredients which 16 | are not clinically relevant to the main indication of the product, 17 | separated by addition symbols.} 18 | \item{\emph{drugbank_id}}{drugbank id} 19 | } 20 | } 21 | \description{ 22 | All commercially available products in which this drug is available in 23 | combination with other drug molecules 24 | } 25 | \keyword{internal} 26 | -------------------------------------------------------------------------------- /man/drug_node_options.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drugbank_parser.R 3 | \name{drug_node_options} 4 | \alias{drug_node_options} 5 | \title{returns drug node valid options.} 6 | \usage{ 7 | drug_node_options() 8 | } 9 | \value{ 10 | list of drug valid options 11 | } 12 | \description{ 13 | returns drug node valid options. 14 | } 15 | \seealso{ 16 | Other parsers: 17 | \code{\link{cett_nodes_options}()}, 18 | \code{\link{parseDrugBank}()}, 19 | \code{\link{references_node_options}()} 20 | } 21 | \concept{parsers} 22 | -------------------------------------------------------------------------------- /man/drug_packagers.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_packagers} 4 | \alias{drug_packagers} 5 | \title{Drug Packagers parser} 6 | \usage{ 7 | drug_packagers() 8 | } 9 | \value{ 10 | a tibble with 2 variables: 11 | \describe{ 12 | \item{name}{} 13 | \item{url}{A link to any companies that are packaging the drug for 14 | re-distribution.} 15 | \item{\emph{drugbank_id}}{drugbank id} 16 | } 17 | } 18 | \description{ 19 | A list of companies that are packaging the drug for re-distribution. 20 | } 21 | \keyword{internal} 22 | -------------------------------------------------------------------------------- /man/drug_patents.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_patents} 4 | \alias{drug_patents} 5 | \title{Drug Patents parser 6 | A property right issued by the United States Patent and Trademark 7 | Office (USPTO) to an inventor for a limited time, in exchange for public 8 | disclosure of the invention when the patent is granted. Drugs may be issued 9 | multiple patents.} 10 | \usage{ 11 | drug_patents() 12 | } 13 | \value{ 14 | a tibble with the following variables: 15 | \describe{ 16 | \item{number}{The patent number(s) associated with the drug.} 17 | \item{country}{The country that issued the patent rights.} 18 | \item{approved}{The date that the patent request was filed.} 19 | \item{expires}{The date that the patent rights expire.} 20 | \item{pediatric-extension}{Indicates whether or not a pediatric extension has been approved for 21 | the patent. Granted pediatric extensions provide an additional 6 months of 22 | market protection.} 23 | \item{\emph{drugbank_id}}{drugbank id} 24 | } 25 | } 26 | \description{ 27 | Drug Patents parser 28 | A property right issued by the United States Patent and Trademark 29 | Office (USPTO) to an inventor for a limited time, in exchange for public 30 | disclosure of the invention when the patent is granted. Drugs may be issued 31 | multiple patents. 32 | } 33 | \keyword{internal} 34 | -------------------------------------------------------------------------------- /man/drug_pathway.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_pathway_node_parsers.R 3 | \name{drug_pathway} 4 | \alias{drug_pathway} 5 | \title{Drug Pathway parser} 6 | \usage{ 7 | drug_pathway() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{smpdb-id}{Small Molecule Pathway Database identifier for this 13 | pathway.} 14 | \item{name}{Pathway name} 15 | \item{category}{Pathway category} 16 | \item{\emph{drugbank_id}}{drugbank id} 17 | } 18 | } 19 | \description{ 20 | Metabolic, disease, and biological pathways that the drug is involved in, as 21 | identified by the Small Molecule Protein Database (SMPDB). 22 | } 23 | \keyword{internal} 24 | -------------------------------------------------------------------------------- /man/drug_pathway_drugs.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_pathway_node_parsers.R 3 | \name{drug_pathway_drugs} 4 | \alias{drug_pathway_drugs} 5 | \title{Drug Pathway Drugs parser} 6 | \usage{ 7 | drug_pathway_drugs() 8 | } 9 | \value{ 10 | a tibble with pathway drugs properties 11 | } 12 | \description{ 13 | Drugs involved in this pathway. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /man/drug_pathway_enzyme.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_pathway_node_parsers.R 3 | \name{drug_pathway_enzyme} 4 | \alias{drug_pathway_enzyme} 5 | \title{Drug Pathway Enzymes parser} 6 | \usage{ 7 | drug_pathway_enzyme() 8 | } 9 | \value{ 10 | a tibble with pathway properties 11 | } 12 | \description{ 13 | Enzymes involved in this pathway. 14 | } 15 | \keyword{internal} 16 | -------------------------------------------------------------------------------- /man/drug_pdb_entries.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_pdb_entries} 4 | \alias{drug_pdb_entries} 5 | \title{Drug pdb-entries parser} 6 | \usage{ 7 | drug_pdb_entries() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{pdb-entry}{} 13 | \item{\emph{drugbank_id}}{drugbank id} 14 | } 15 | } 16 | \description{ 17 | Protein Data Bank (PDB) identifiers for this drug. 18 | } 19 | \keyword{internal} 20 | -------------------------------------------------------------------------------- /man/drug_pharmacology.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_pharmacology_parser.R 3 | \name{drug_pharmacology} 4 | \alias{drug_pharmacology} 5 | \title{Drug Pharmacology parser} 6 | \usage{ 7 | drug_pharmacology() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{indication}{The approved conditions, diseases, or states for which a 13 | drug can safely and effectively be used. An indication is considered to be 14 | FDA-approved when it has any of the following designations: NDA, ANDA, BLA, 15 | or OTC. May also include indications in other countries, such as Canada 16 | (through Health Canada) or in Europe 17 | (through the European Medicines Agency).} 18 | \item{pharmacodynamics}{A description of how the drug modifies or affects 19 | the organism it is being used in. May include effects in the body that are 20 | desired (enzyme or protein targets for example) and undesired 21 | (also known as “side effects”). This is in contrast to pharmacokinetics, 22 | which describes how the body modifies the drug being used.} 23 | \item{mechanism_of_action}{A component of pharmacodynamics that describes 24 | the biochemical interaction through which a drug produces its intended 25 | effect. May include the exact molecular protein or enzyme targets and/or 26 | a description of the physiological effects produced.} 27 | \item{toxicity}{Any adverse reaction, or side effect, that may or may not 28 | occur with use of the drug. May be attributed to a number of effects 29 | including: an enhanced therapeutic effect, rare anaphylactic reactions, 30 | interactions with other medications, or unanticipated binding of the 31 | molecule at different sites within the body.} 32 | \item{metabolism}{A description of the chemical degradation of the drug 33 | molecule within the body; most commonly by enzymes from the 34 | Cytochrome P450 (CYP) system in the liver.} 35 | \item{absorption}{A description of the movement of the drug from the site 36 | of administration into the bloodstream or target tissue. Common 37 | pharmacokinetic metrics used to evaluate absorption include Area Under 38 | the Curve (AUC), bioavailability (F), maximum concentration (Cmax), and 39 | time to maximum concentration (Tmax).} 40 | \item{half-life}{The period of time it takes for the amount of drug in the 41 | body to be reduced by one half. Provides a description of how quickly the 42 | drug is being eliminated and how much is available in the bloodstream.} 43 | \item{protein-binding }{A description of the drug’s affinity for plama 44 | proteins and the proportion of the drug that is bound to them when in 45 | circulation within the body.} 46 | \item{route_of_elimination}{A description of the pathway that is used to 47 | excrete the drug from the body. Common pharmacokinetic parameters used to 48 | evaluate excretion include elimination half life, renal clearance, and 49 | tracking of radiolabelled compounds through the renal and GI system.} 50 | \item{volume_of_distribution}{The Vd of a drug represents the degree to 51 | which it is distributed into body tissue compared to the plasma.} 52 | \item{clearance}{A pharmacokinetic measurement of the rate of removal of the 53 | drug from plasma, expressed as mL/min; reflects the rate of elimination of 54 | the drug.} 55 | \item{\emph{drugbank_id}}{drugbank id} 56 | } 57 | } 58 | \description{ 59 | Describes the use, mechanism of action, pharmacokinetics, pharmacodynamics, 60 | and physiological or biochemical effects in the body. 61 | } 62 | \keyword{internal} 63 | -------------------------------------------------------------------------------- /man/drug_prices.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_price_node_parser.R 3 | \name{drug_prices} 4 | \alias{drug_prices} 5 | \title{Drug Prices Parsers} 6 | \usage{ 7 | drug_prices() 8 | } 9 | \value{ 10 | a tibble with 5 variables: 11 | \describe{ 12 | \item{description}{} 13 | \item{cost}{Drug price per unit} 14 | \item{currency}{Currency of price, example: US.} 15 | \item{unit}{} 16 | \item{parent_id}{drugbank id} 17 | } 18 | } 19 | \description{ 20 | Unit drug prices 21 | } 22 | \keyword{internal} 23 | -------------------------------------------------------------------------------- /man/drug_products.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_products} 4 | \alias{drug_products} 5 | \title{Drug Products parser} 6 | \usage{ 7 | drug_products() 8 | } 9 | \value{ 10 | a tibble with 32 variables: 11 | \describe{ 12 | \item{name}{The proprietary name(s) provided by the manufacturer for any 13 | commercially available products containing this drug.} 14 | \item{labeller}{The corporation responsible for labelling this product.} 15 | \item{ndc-id}{The National Drug Code (NDC) identifier of the drug} 16 | \item{ndc-product-code}{The National Drug Code (NDC) product code from the 17 | FDA National Drug Code directory.} 18 | \item{dpd-id}{Drug Product Database (DPD) identification number (a.k.a. DIN) 19 | from the Canadian Drug Product Database. Only present for drugs that are 20 | marketed in Canada} 21 | \item{ema-product-code}{EMA product code from the European Medicines Agency 22 | Database. Only present for products that are authorized by central procedure 23 | for marketing in the European Union.} 24 | \item{ema-ma-number}{EMA marketing authorization number from the European 25 | Medicines Agency Database. Only present for products that are authorized by 26 | central procedure for marketing in the European Union.} 27 | \item{started-marketing-on}{The starting date for market approval.} 28 | \item{ended-marketing-on}{The ending date for market approval.} 29 | \item{dosage-form }{The pharmaceutical formulation by which the drug is 30 | introduced into the body.} 31 | \item{strength}{The amount of active drug ingredient provided in the dosage} 32 | \item{route}{The path by which the drug or product is taken into the body} 33 | \item{fda-application-number}{The New Drug Application [NDA] number 34 | assigned to this drug by the FDA.} 35 | \item{over-the-counter}{A list of Over The Counter (OTC) forms of the drug.} 36 | \item{generic}{Whether this product is a generic drug.} 37 | \item{approved}{Indicates whether this drug has been approved by the 38 | regulating government.} 39 | \item{country}{The country where this commercially available drug has been 40 | approved.} 41 | \item{source}{Source of this product information. For example, a value of 42 | DPD indicates this information was retrieved from the Canadian Drug Product 43 | Database.} 44 | \item{standing}{One of good, discordant, or deprecated. Distinguishes 45 | products with up to date ingredient information (good) from products with 46 | conflicting information (discordant) or products that have been removed from 47 | an active label (deprecated).} 48 | \item{standing-updated-on}{The date on which the standing was last updated} 49 | \item{standing-reason}{Explains the non-good standing of the product. 50 | One of: ingredient_change, code_duplication, invalid, or removed.} 51 | \item{jurisdiction-marketing-category }{The marketing category of this 52 | product in its jurisdiction} 53 | \item{branded}{Whether this product has a named brand} 54 | \item{prescription}{Whether this product is only available with 55 | a prescription} 56 | \item{unapproved}{Whether this product is not approved in its jurisdiction} 57 | \item{vaccine}{Whether this product is a vaccine} 58 | \item{allergenic}{Whether this product is used in allergenic testing} 59 | \item{cosmetic}{Whether this product is a cosmetic, such as sunscreen} 60 | \item{kit}{Whether this product is a kit composed of multiple distinct 61 | parts} 62 | \item{solo}{Whether this product has only a single active ingredient} 63 | \item{available}{Whether this product can be sold in its jurisdiction} 64 | \item{\emph{drugbank_id}}{drugbank id} 65 | } 66 | } 67 | \description{ 68 | A list of commercially available products in Canada and the United States 69 | that contain the drug. 70 | } 71 | \keyword{internal} 72 | -------------------------------------------------------------------------------- /man/drug_reactions.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_reaction_node_parser.R 3 | \name{drug_reactions} 4 | \alias{drug_reactions} 5 | \title{Drug Reactions Parsers} 6 | \usage{ 7 | drug_reactions() 8 | } 9 | \value{ 10 | a tibble with 5 variables: 11 | \describe{ 12 | \item{sequence}{ Reactions are displayed within a numerical sequence} 13 | \item{left_drugbank_name}{The substrate of the reaction. Maybe a drug or a 14 | metabolite.} 15 | \item{rightt_drugbank_name}{ The product of the reaction. Maybe a drug or a 16 | metabolite.} 17 | \item{left_drugbank_id}{} 18 | \item{right_drugbank_id}{} 19 | \item{parent_id}{drugbank id} 20 | } 21 | } 22 | \description{ 23 | Extract the sequential representation of the metabolic reactions that this 24 | drug molecule is involved in. Depending on available information, this may 25 | include metabolizing enzymes, reaction type, substrates, products, 26 | pharmacological activity of metabolites, and a structural representation of 27 | the biochemical reactions. 28 | } 29 | \keyword{internal} 30 | -------------------------------------------------------------------------------- /man/drug_reactions_enzymes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_reaction_node_parser.R 3 | \name{drug_reactions_enzymes} 4 | \alias{drug_reactions_enzymes} 5 | \title{Drug Reactions Enzymes Parsers} 6 | \usage{ 7 | drug_reactions_enzymes() 8 | } 9 | \value{ 10 | a tibble with 3 variables: 11 | \describe{ 12 | \item{name}{} 13 | \item{uniprot-id}{} 14 | \item{parent_id}{drugbank id} 15 | } 16 | } 17 | \description{ 18 | Enzymes involved in metabolizing this drug 19 | } 20 | \keyword{internal} 21 | -------------------------------------------------------------------------------- /man/drug_salts.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_salts} 4 | \alias{drug_salts} 5 | \title{Drug Salts parser} 6 | \usage{ 7 | drug_salts() 8 | } 9 | \value{ 10 | a tibble with 1 variables: 11 | \describe{ 12 | \item{drugbank-id}{DrugBank identifiers of the available salt form(s).} 13 | \item{name}{Name of the available salt form(s)} 14 | \item{unii}{Unique Ingredient Identifier (UNII) of the available salt 15 | form(s).} 16 | \item{cas-number}{Chemical Abstracts Service (CAS) registry number assigned 17 | to the salt form(s) of the drug.} 18 | \item{inchikey}{IUPAC International Chemical Identifier (InChi) key 19 | identifier for the available salt form(s).} 20 | \item{average-mass}{Average molecular mass: the weighted average of the 21 | isotopic masses of the salt.} 22 | \item{monoisotopic-mass}{The mass of the most abundant isotope of the salt} 23 | \item{smiles}{The simplified molecular-input line-entry system (SMILES) is 24 | a line notation used for describing the structure of chemical species using 25 | short ASCII strings; calculated by ChemAxon.} 26 | \item{inchi}{A prediction of the IUPAC 27 | International Chemical Identifier (InChI); imported by ChemAxon.} 28 | \item{formula}{Indicates the simple numbers of each type of atom within the 29 | molecule; calculated by ChemAxon.} 30 | \item{\emph{drugbank_id}}{parent drugbank id} 31 | } 32 | } 33 | \description{ 34 | Available salt forms of the drug. Ions such as hydrochloride, sodium, 35 | and sulfate are often added to the drug molecule to increase solubility, 36 | dissolution, or absorption. 37 | } 38 | \keyword{internal} 39 | -------------------------------------------------------------------------------- /man/drug_sequences.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_sequence_node_parser.R 3 | \name{drug_sequences} 4 | \alias{drug_sequences} 5 | \title{Drug Sequences parser} 6 | \usage{ 7 | drug_sequences() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{sequence}{a textual representation of the sequence} 13 | \item{format}{Currently, only the FASTA format is used} 14 | \item{\emph{drugbank_id}}{drugbank id} 15 | } 16 | } 17 | \description{ 18 | The amino acid sequence; provided if the drug is a peptide. 19 | } 20 | \details{ 21 | Describes peptide sequences of biotech drugs 22 | } 23 | \keyword{internal} 24 | -------------------------------------------------------------------------------- /man/drug_snp_adverse_reactions.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_snp_adverse_reactions} 4 | \alias{drug_snp_adverse_reactions} 5 | \title{Drug SNP Adverse Drug Reactions parser} 6 | \usage{ 7 | drug_snp_adverse_reactions() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{protein-name}{Proteins involved in this SNP.} 13 | \item{gene-symbol}{Genes involved in this SNP.} 14 | \item{uniprot-id}{Universal Protein Resource (UniProt) identifiers for 15 | proteins involved in this pathway.} 16 | \item{rs-id}{The SNP Database identifier for this single nucleotide 17 | polymorphism.} 18 | \item{allele}{The alleles associated with the identified SNP.} 19 | \item{adverse-reaction}{} 20 | \item{description}{} 21 | \item{pubmed-id }{Reference to PubMed article.} 22 | \item{\emph{drugbank_id}}{drugbank id} 23 | } 24 | } 25 | \description{ 26 | The adverse drug reactions that may occur as a result of the listed single 27 | nucleotide polymorphisms (SNPs) 28 | } 29 | \keyword{internal} 30 | -------------------------------------------------------------------------------- /man/drug_snp_effects.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_parsers.R 3 | \name{drug_snp_effects} 4 | \alias{drug_snp_effects} 5 | \title{Drug SNP Effects parser} 6 | \usage{ 7 | drug_snp_effects() 8 | } 9 | \value{ 10 | a tibble with the following variables: 11 | \describe{ 12 | \item{protein-name}{Proteins involved in this SNP.} 13 | \item{gene-symbol}{Genes involved in this SNP.} 14 | \item{uniprot-id}{Universal Protein Resource (UniProt) identifiers for 15 | proteins involved in this pathway.} 16 | \item{rs-id}{ The SNP Database identifier for this single nucleotide 17 | polymorphism.} 18 | \item{allele}{The alleles associated with the identified SNP.} 19 | \item{defining-change}{} 20 | \item{description}{A written description of the SNP effects.} 21 | \item{pubmed-id }{Reference to PubMed article.} 22 | \item{\emph{drugbank_id}}{drugbank id} 23 | } 24 | } 25 | \description{ 26 | A list of single nucleotide polymorphisms (SNPs) relevant to drug activity or 27 | metabolism, and the effects these may have on pharmacological activity. 28 | SNP effects in the patient may require close monitoring, an increase or 29 | } 30 | \keyword{internal} 31 | -------------------------------------------------------------------------------- /man/drug_syn.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_synonym_node_parser.R 3 | \name{drug_syn} 4 | \alias{drug_syn} 5 | \title{Drug Synonyms parser} 6 | \usage{ 7 | drug_syn() 8 | } 9 | \value{ 10 | a tibble with 3 variables: 11 | \describe{ 12 | \item{language}{Names of the drug in languages other than English.} 13 | \item{coder}{Organization or source providing the synonym. For example, 14 | INN indicates the synonym is an International Nonproprietary Name, 15 | while IUPAC indicates the synonym is the nomenclature designated by the 16 | International Union of Pure and Applied Chemistry.} 17 | \item{\emph{drugbank_id}}{drugbank id} 18 | } 19 | } 20 | \description{ 21 | Other names or identifiers that are associated with this drug. 22 | } 23 | \keyword{internal} 24 | -------------------------------------------------------------------------------- /man/figures/README-pressure-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/man/figures/README-pressure-1.png -------------------------------------------------------------------------------- /man/figures/README-unnamed-chunk-2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/man/figures/README-unnamed-chunk-2-1.png -------------------------------------------------------------------------------- /man/figures/README-unnamed-chunk-3-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/man/figures/README-unnamed-chunk-3-1.png -------------------------------------------------------------------------------- /man/figures/README-unnamed-chunk-4-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/man/figures/README-unnamed-chunk-4-1.png -------------------------------------------------------------------------------- /man/figures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/man/figures/logo.png -------------------------------------------------------------------------------- /man/init_dvobject.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/dvobject_metadata.R 3 | \name{init_dvobject} 4 | \alias{init_dvobject} 5 | \title{init_dvobject 6 | initialize dvobject} 7 | \usage{ 8 | init_dvobject() 9 | } 10 | \value{ 11 | dvobject 12 | } 13 | \description{ 14 | init_dvobject 15 | initialize dvobject 16 | } 17 | \keyword{internal} 18 | -------------------------------------------------------------------------------- /man/links.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/references_parsers.R 3 | \name{links} 4 | \alias{links} 5 | \alias{drugs_links} 6 | \alias{carriers_links} 7 | \alias{enzymes_links} 8 | \alias{targets_links} 9 | \alias{transporters_links} 10 | \title{Drugs/ Carriers/ Enzymes/ Targets/ Transporters links element parser} 11 | \usage{ 12 | drugs_links() 13 | 14 | carriers_links() 15 | 16 | enzymes_links() 17 | 18 | targets_links() 19 | 20 | transporters_links() 21 | } 22 | \value{ 23 | a tibble with 4 variables: 24 | \describe{ 25 | \item{ref-id}{Name of the source website} 26 | \item{title}{Identifier for this drug in the given resource} 27 | \item{url}{The url of the website} 28 | \item{\emph{parent_id}}{drug/ carrier/ target/ enzyme/ transporter id} 29 | } 30 | } 31 | \description{ 32 | Return a list of websites that were used as references for 33 | Drugs/ Carriers/ Enzymes/ Targets/ Transporters 34 | } 35 | \keyword{internal} 36 | -------------------------------------------------------------------------------- /man/parseDrugBank.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drugbank_parser.R 3 | \name{parseDrugBank} 4 | \alias{parseDrugBank} 5 | \title{parseDrugBank} 6 | \usage{ 7 | parseDrugBank( 8 | db_path, 9 | drug_options = NULL, 10 | parse_salts = FALSE, 11 | parse_products = FALSE, 12 | references_options = NULL, 13 | cett_options = NULL 14 | ) 15 | } 16 | \arguments{ 17 | \item{db_path}{\strong{string}, full path for the \strong{DrugBank} xml or 18 | zip file.} 19 | 20 | \item{drug_options}{\strong{character vector}, list of sub drug related nodes 21 | names options to parse (default = NULL). Check \code{drug_node_options()} 22 | for all available options. If its value is `NULL` ONLY `drug_general_information` 23 | will be placed in the returned dvobject.} 24 | 25 | \item{parse_salts}{\strong{boolean}, parse salts info (default = FALSE)} 26 | 27 | \item{parse_products}{\strong{boolean}, parse products info (default = FALSE)} 28 | 29 | \item{references_options}{\strong{character vector}, list of sub references 30 | related nodes names options to parse (default = NULL). 31 | Check \code{references_node_options()} for all available options.} 32 | 33 | \item{cett_options}{\strong{character vector}, list of sub cett related nodes 34 | names options to parse (default = NULL). Check \code{cett_nodes_options()} 35 | for all available options.} 36 | } 37 | \value{ 38 | dvobject 39 | } 40 | \description{ 41 | parses given DrugBank XML database into a dvobject. dvobject is a list of 42 | data.frames in which each data.frame represents a part of parsed data (i.e 43 | drugs, prices, carriers, ...) 44 | } 45 | \seealso{ 46 | Other parsers: 47 | \code{\link{cett_nodes_options}()}, 48 | \code{\link{drug_node_options}()}, 49 | \code{\link{references_node_options}()} 50 | } 51 | \concept{parsers} 52 | -------------------------------------------------------------------------------- /man/parse_cett_node.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drugbank_parser.R 3 | \name{parse_cett_node} 4 | \alias{parse_cett_node} 5 | \title{Run all CETT related parsers} 6 | \usage{ 7 | parse_cett_node(cett_options) 8 | } 9 | \value{ 10 | a list of all drugs parsed tibbles 11 | } 12 | \description{ 13 | Run all parsers that retrieve carriers, enzymes, targets and transporters 14 | related information 15 | } 16 | \keyword{internal} 17 | -------------------------------------------------------------------------------- /man/parse_drug_nodes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drugbank_parser.R 3 | \name{parse_drug_nodes} 4 | \alias{parse_drug_nodes} 5 | \title{Run all drug related parsers} 6 | \usage{ 7 | parse_drug_nodes(drug_options) 8 | } 9 | \arguments{ 10 | \item{drug_options}{- list of options to parse} 11 | } 12 | \value{ 13 | a list of all drugs parsed tibbles 14 | } 15 | \description{ 16 | Run all parsers that retrieve drugs related information 17 | } 18 | \keyword{internal} 19 | -------------------------------------------------------------------------------- /man/parse_references_node.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drugbank_parser.R 3 | \name{parse_references_node} 4 | \alias{parse_references_node} 5 | \title{Drugs/ Carriers/ Enzymes/ Targets/ Transporters references element parser} 6 | \usage{ 7 | parse_references_node(references_options) 8 | } 9 | \value{ 10 | a list of all references for drugs, carriers, enzymes, targets or 11 | transporters 12 | } 13 | \description{ 14 | Drugs/ Carriers/ Enzymes/ Targets/ Transporters references element parser 15 | } 16 | \keyword{internal} 17 | -------------------------------------------------------------------------------- /man/read_drugbank_xml_db.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drug_common_utilities.R 3 | \name{read_drugbank_xml_db} 4 | \alias{read_drugbank_xml_db} 5 | \title{Reads \strong{DrugBank} xml database and load it into memory.} 6 | \usage{ 7 | read_drugbank_xml_db(db_path) 8 | } 9 | \arguments{ 10 | \item{db_path}{\strong{string}, full path for the 11 | \strong{DrugBank} xml or zip file.} 12 | } 13 | \value{ 14 | loaded DB or NULL 15 | } 16 | \description{ 17 | \code{read_drugbank_xml_db} loads \strong{DrugBank} xml database full tree 18 | into memory. 19 | } 20 | \details{ 21 | This functions reads \strong{DrugBank} xml database and load it into memory 22 | for later processing. Hence; this method \strong{must} be called before any 23 | other function in the package and it needs to be called one time only. 24 | 25 | It takes one single mandatory argument which is the location of DrugBank db. 26 | } 27 | \keyword{internal} 28 | -------------------------------------------------------------------------------- /man/references_node_options.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/drugbank_parser.R 3 | \name{references_node_options} 4 | \alias{references_node_options} 5 | \title{returns references node valid options.} 6 | \usage{ 7 | references_node_options() 8 | } 9 | \value{ 10 | list of references valid options 11 | } 12 | \description{ 13 | returns references node valid options. 14 | } 15 | \seealso{ 16 | Other parsers: 17 | \code{\link{cett_nodes_options}()}, 18 | \code{\link{drug_node_options}()}, 19 | \code{\link{parseDrugBank}()} 20 | } 21 | \concept{parsers} 22 | -------------------------------------------------------------------------------- /man/show_dvobject_metadata.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/dvobject_metadata.R 3 | \name{show_dvobject_metadata} 4 | \alias{show_dvobject_metadata} 5 | \title{init_dvobject 6 | Returns data.frame with two columns (key, value) of dvobject attributes} 7 | \usage{ 8 | show_dvobject_metadata(dvobject) 9 | } 10 | \arguments{ 11 | \item{dvobject}{- dvobject list to show related metadata} 12 | } 13 | \value{ 14 | data.frame 15 | } 16 | \description{ 17 | init_dvobject 18 | Returns data.frame with two columns (key, value) of dvobject attributes 19 | } 20 | \concept{utility} 21 | -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/pkgdown/favicon/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/pkgdown/favicon/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/pkgdown/favicon/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/pkgdown/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /pkgdown/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/pkgdown/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /pkgdown/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/pkgdown/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /pkgdown/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/pkgdown/favicon/favicon.ico -------------------------------------------------------------------------------- /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | library(dbparser) 3 | 4 | test_check("dbparser") 5 | -------------------------------------------------------------------------------- /tests/testthat/test_dvobject_metadata.R: -------------------------------------------------------------------------------- 1 | context("test drugbank database metadata") 2 | 3 | library(testthat) 4 | 5 | biotech <- "drugbank_record_biotech.xml" 6 | test_that( 7 | desc = "Read database", 8 | code = { 9 | expect_true(!is.null(read_drugbank_xml_db( 10 | system.file("extdata", biotech, package = "dbparser") 11 | ))) 12 | } 13 | ) 14 | 15 | test_that( 16 | desc = "Read dvobject metadata", 17 | code = { 18 | db_location <- system.file("extdata", 19 | biotech, 20 | package = "dbparser") 21 | 22 | dvobj <- parseDrugBank(db_location) 23 | metadata <- dbparser::show_dvobject_metadata(dvobj) 24 | 25 | expect_match(metadata$Value[[1]], "DrugBank") 26 | expect_match(metadata$Value[[2]], "5.1") 27 | expect_match(metadata$Value[[3]], "2018-07-03") 28 | expect_match(metadata$Value[[4]], "dvobject") 29 | } 30 | ) 31 | -------------------------------------------------------------------------------- /vignettes/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | *.R 3 | -------------------------------------------------------------------------------- /vignettes/dbparser.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "DrugBank Database XML Parser" 3 | author: "Mohammed Ali" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{DrugBank Database XML Parser} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | ```{r setup, include = FALSE} 13 | knitr::opts_chunk$set( 14 | collapse = TRUE, 15 | comment = "#>", 16 | fig.path = "docs/articles/", 17 | out.width = "100%" 18 | ) 19 | ``` 20 | 21 | ## Introduction 22 | The main purpose of the `dbparser` package is to parse the 23 | [DrugBank](https://go.drugbank.com/) database which is downloadable in XML format 24 | from [this link](https://go.drugbank.com/releases/latest). The parsed data can 25 | then be explored and analyzed as desired by the user. 26 | In this tutorial, we will see how to use `dbparser` along with `dplyr` and 27 | `ggplot2` along with other libraries to do simple drug analysis 28 | 29 | ## Loading and Parsing the Data 30 | 31 | Before starting the code we are assuming the following: 32 | 33 | - user already downloaded *DrugBank* xml database file based on the 34 | [Read Me](https://docs.ropensci.org/dbparser/) instructions or the above note, 35 | - user saved the downloaded database in working directory as `C:\`. 36 | - user named the downloaded xml file **drugbank.xml**. 37 | 38 | Now we can loads the `drugs` info, `drug groups` info and `drug targets` 39 | actions info. 40 | 41 | ```{r eval=T} 42 | ## load dbparser package 43 | suppressPackageStartupMessages({ 44 | library(tidyr) 45 | library(dplyr) 46 | library(canvasXpress) 47 | library(tibble) 48 | library(dbparser) 49 | }) 50 | 51 | 52 | ## load drugs data 53 | drugs <- readRDS(system.file("drugs.RDS", package = "dbparser")) 54 | 55 | ## load drug groups data 56 | drug_groups <- readRDS(system.file("drug_groups.RDS", package = "dbparser")) 57 | 58 | ## load drug targets actions data 59 | drug_targets_actions <- readRDS(system.file("targets_actions.RDS", package = "dbparser")) 60 | ``` 61 | 62 | 63 | ## Exploring the data 64 | 65 | Following is an example involving a quick look at a few aspects of the parsed 66 | data. First we look at the proportions of `biotech` and `small-molecule` drugs 67 | in the data. 68 | 69 | ```{r eval=T} 70 | ## view proportions of the different drug types (biotech vs. small molecule) 71 | type_stat <- drugs %>% 72 | select(type) %>% 73 | group_by(type) %>% 74 | summarise(count = n()) %>% 75 | column_to_rownames("type") 76 | 77 | canvasXpress( 78 | data = type_stat, 79 | graphOrientation = "vertical", 80 | graphType = "Bar", 81 | showSampleNames = FALSE, 82 | title ="Drugs Type Distribution", 83 | xAxisTitle = "Count" 84 | ) 85 | ``` 86 | 87 | 88 | Below, we view the different `drug_groups` in the data and how prevalent they 89 | are. 90 | 91 | ```{r eval=T} 92 | ## view proportions of the different drug types for each drug group 93 | type_stat <- drugs %>% 94 | full_join(drug_groups, by = c("drugbank_id")) %>% 95 | select(type, group) %>% 96 | group_by(type, group) %>% 97 | summarise(count = n()) %>% 98 | pivot_wider(names_from = group, values_from = count) %>% 99 | column_to_rownames("type") 100 | 101 | canvasXpress( 102 | data = type_stat, 103 | graphType = "Stacked", 104 | legendColumns = 2, 105 | legendPosition = "bottom", 106 | title ="Drug Type Distribution per Drug Group", 107 | xAxisTitle = "Quantity", 108 | xAxis2Show = TRUE, 109 | xAxisShow = FALSE, 110 | smpTitle = "Drug Group") 111 | ``` 112 | 113 | Finally, we look at the `drug_targets_actions` to observe their proportions as 114 | well. 115 | 116 | 117 | ```{r eval=T} 118 | ## get counts of the different target actions in the data 119 | targetActionCounts <- 120 | drug_targets_actions %>% 121 | group_by(action) %>% 122 | summarise(count = n()) %>% 123 | arrange(desc(count)) %>% 124 | top_n(10) %>% 125 | column_to_rownames("action") 126 | 127 | ## get bar chart of the 10 most occurring target actions in the data 128 | canvasXpress( 129 | data = targetActionCounts, 130 | graphType = "Bar", 131 | legendColumns = 2, 132 | legendPosition = "bottom", 133 | title = "Target Actions Distribution", 134 | showSampleNames = FALSE, 135 | xAxis2Show = TRUE, 136 | xAxisShow = FALSE) 137 | ``` 138 | 139 | -------------------------------------------------------------------------------- /vignettes/maria_tables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ropensci/dbparser/39d9a078503c734a74d5f0fdc693db117e94b40f/vignettes/maria_tables.png --------------------------------------------------------------------------------