Skip to content

Latest commit

 

History

History
95 lines (78 loc) · 4.6 KB

drugcentral.md

File metadata and controls

95 lines (78 loc) · 4.6 KB

BioClients.drugcentral

DrugCentral (drugcentral.org)

DrugCentral is a widely used research database of approved drugs, active pharmaceutical ingredients and clinical products, with indications, side effects, molecular mechanism of action targets, and much more. Developed, curated, and maintained by Tudor Oprea, Oleg Ursu, Jayme Holmes, Sorin Avram, and coworkers as a key resource for the NIH Illuminating the Druggable Genome (IDG) project.

DrugCentral employs a backend PostgreSql db, freely available at https://drugcentral.org/download, and containerized via DockerHub. The BioClients API provides programmatic access to an available db instance, which may be deployed locally, or may be available publicly with configuration details at https://drugcentral.org (at time of writing: dbhost=unmtid-dbs.net, dbport=5433, dbname=drugcentral, dbuser=drugman, dbpw=dosage).

Operations include:

  • list_products - List all drug products.
  • list_structures - List all drug structures.
  • list_structures2smiles - List all drug structures as SMILES file.
  • list_structures2molfile - List all drug structures as MDL molfile.
  • list_active_ingredients - List all active ingredients.
  • list_indications - List all indications.
  • list_xref_types - List all xref types.
  • list_ddis - List all drug-drug interactions.
  • get_structure - Get structure by struct_id.
  • get_structure_by_synonym - Get structure by synonym.
  • get_structure_by_xref - Get structure by xref ID.
  • get_structure_xrefs - Get all xref IDs for structures.
  • get_structure_products - Get all products for structures.
  • get_structure_atcs - Get all ATC classes for structures.
  • get_product - Get product by product_id.
  • get_product_structures - Get structures for product.
  • get_indication_structures - Get all structures for indication (OMOP ID).
  • get_drugpage - Get drug (structure), with products, xrefs, etc. as JSON.
  • get_drugsummary - Get drug (structure), with names, xrefs, etc. as TSV.
  • search_indications - Search indications by regular expression.
  • search_products - Search products by regular expression.

All results are TSV format except as noted.

Usage

$ python3 -m BioClients.drugcentral.Client -h
usage: Client.py [-h] [--i IFILE] [--ids IDS] [--xref_type XREF_TYPE] [--o OFILE]
                 [--dbhost DBHOST] [--dbport DBPORT] [--dbname DBNAME] [--dbusr DBUSR]
                 [--dbpw DBPW] [--param_file PARAM_FILE] [--dbschema DBSCHEMA] [-v]
                 {list_tables,list_columns,list_tables_rowCounts,version,get_structure,get_structure_by_synonym,get_structure_by_xref,get_structure_xrefs,get_structure_products,get_structure_orangebook_products,get_structure_atcs,get_structure_synonyms,get_product,get_product_structures,get_indication_structures,get_drugpage,get_drugsummary,list_products,list_structures,list_structures2smiles,list_structures2molfile,list_active_ingredients,list_indications,list_indication_targets,list_ddis,list_atcs,list_xrefs,list_xref_types,search_indications,search_products,meta_listdbs}

DrugCentral PostgreSql client utility

positional arguments:
  {list_tables,list_columns,list_tables_rowCounts,version,get_structure,get_structure_by_synonym,get_structure_by_xref,get_structure_xrefs,get_structure_products,get_structure_orangebook_products,get_structure_atcs,get_structure_synonyms,get_product,get_product_structures,get_indication_structures,get_drugpage,get_drugsummary,list_products,list_structures,list_structures2smiles,list_structures2molfile,list_active_ingredients,list_indications,list_indication_targets,list_ddis,list_atcs,list_xrefs,list_xref_types,search_indications,search_products,meta_listdbs}
                        OPERATION (select one)

optional arguments:
  -h, --help            show this help message and exit
  --i IFILE             input ID file
  --ids IDS             input IDs (comma-separated)
  --xref_type XREF_TYPE
                        xref ID type
  --o OFILE             output (TSV)
  --dbhost DBHOST
  --dbport DBPORT
  --dbname DBNAME
  --dbusr DBUSR
  --dbpw DBPW
  --param_file PARAM_FILE
  --dbschema DBSCHEMA
  -v, --verbose

Search via --ids as regular expressions, e.g. "^Alzheimer"

Database credentials

Db credentials are normally stored in a configuration file at $HOME/.drugcentral.yaml, formatted thus:

DBHOST: "====Replace_with_HOST===="
DBPORT: "====Replace_with_PORT===="
DBNAME: "====Replace_with_NAME===="
DBUSR:  "====Replace_with_USERNAME===="
DBPW:   "====Replace_with_PASSWORD===="