Recently I knew useful database “DrugCentral“.
From About.
DrugCentral provides information on active ingredients chemical entities, pharmaceutical products, drug mode of action, indications, pharmacologic action. We monitor FDA, EMA, and PMDA for new drug approval on regular basis to ensure currency of the resource.
By using the site, user can search many information on web browser. And also the site provides posgresql dump file with all data of DrugCentral.
I had interest the data so I got dump file and use it.
Afte download the dump file, I made local db in my postgres env and install the db.
iwatobipen$ psql -U postgres postgres=# create database drugcentral; postgres=# \q iwatobipen$ psql drugcental < drugcentral.dump.08292017.sql
OK now I made local drugcentral db.
Next, I would like to know the structure of the database, schema. I could not find the schema in the site but I found good library named "eralchemy".
ERAlchemy generates Entity Relation (ER) diagram (like the one below) from databases or from SQLAlchemy models. I installed the package via pip and made ER diagram. ;-)
iwatobipen$ pip install eralchemy
iwatobipen$ eralchemy -i 'postgresql+psycopg2://postgres@127.0.0.1:5432/drugcentral' -o er.pdf
Second code of above generates ER diagram as PDF format. Let's check it.
er
Good! ;-)
First extract smiles and DDI risk.
iwatobipen$ psql -U postgres -D drugcentral drugcentral=# SELECT STRUCTURES.SMILES, DDI.DESCRIPTION, DDI.DDI_RISK FROM STRUCTURES, DDI WHERE STRUCTURES.ID = DDI.ID LIMIT 10; smiles | description | ddi_risk --------------------------------------------------------------------------------------------------------+----------------------------------------------------+------------- OC[C@H]1N[C@H]([C@H](O)[C@@H]1O)C1=CNC2=C1NC=NC2=O | FLUCONAZOLE/OSPEMIFENE [VA Drug Interaction] | Significant CO[C@@H]1[C@@H](C[C@H]2O[C@]1(C)N1C3=CC=CC=C3C3=C4CNC(=O)C4=C4C5=CC=CC=C5N2C4=C13)N(C)C(=O)C1=CC=CC=C1 | MERCAPTOPURINE/TOFACITINIB [VA Drug Interaction] | Critical CCS(=O)(=O)N1CC(CC#N)(C1)N1C=C(C=N1)C1=NC=NC2=C1C=CN2 | FLUDROCORTISONE/RISPERIDONE [VA Drug Interaction] | Significant CNCC1=CC=C(C=C1)C1=C2CCNC(=O)C3=CC(F)=CC(N1)=C23 | ARIPIPRAZOLE/HYDROCORTISONE [VA Drug Interaction] | Significant OC(CNC1=CC=CC=N1)C1=CC=CC=C1 | CISAPRIDE/ZIPRASIDONE [VA Drug Interaction] | Significant C#CC1=CC=CC(NC2=NC=NC3=C2C=C2OCCOCCOCCOC2=C3)=C1 | ARIPIPRAZOLE/PHENYTOIN [VA Drug Interaction] | Significant CN1CCN(CC1)C1=CC=C(NC2=NC3=C(SC=C3)C(OC3=CC=CC(NC(=O)C=C)=C3)=N2)C=C1 | ARIPIPRAZOLE/PREDNISOLONE [VA Drug Interaction] | Significant OB1OCC2=CC(OC3=CC=C(C=C3)C#N)=CC=C12 | ARIPIPRAZOLE/FLUDROCORTISONE [VA Drug Interaction] | Significant CC1=CN(C=N1)C1=CC(NC(=O)C2=CC=C(C)C(NC3=NC=CC(=N3)C3=CN=CC=N3)=C2)=CC(=C1)C(F)(F)F | AMOBARBITAL/RISPERIDONE [VA Drug Interaction] | Significant
Second extract smiles and mode of action.
drugcentral=# SELECT ST.SMILES, AC.ACTION_TYPE, AC.DESCRIPTION FROM STRUCTURES AS ST, ACTION_TYPE AS AC WHERE ST.ID = AC.ID LIMIT 10; smiles | action_type | description --------------------------------------------------------------------------------+----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------- COC1=C2OC=CC2=CC2=C1OC(=O)C=C2 | PHARMACOLOGICAL CHAPERONE | Pharmaceutical chaperones may help stabilize the protein structure thereby restoring folding and/or preventing misfolding of the protein FC1=CNC(=O)NC1=O | MINIMUM INHIBITORY CONCENTRATION | The lowest concentration of an antimicrobial that will inhibit the visible growth of a microorganism CC(=O)OC[C@H]1O[C@H]([C@H](OC(C)=O)[C@@H]1OC(C)=O)N1N=CC(=O)NC1=O | ANTIBODY BINDING | Antibody binding activity CCCCN1CCCC[C@H]1C(=O)NC1=C(C)C=CC=C1C | ANTAGONIST | Binds to a receptor and prevents activation by an agonist through competing for the binding site COC(=O)C1=C(C)NC(C)=C([C@H]1C1=CC(=CC=C1)[N+]([O-])=O)C(=O)OCCN(C)CC1=CC=CC=C1 | ANTISENSE INHIBITOR | Prevents translation of a complementary mRNA sequence through binding to it CCOC(=O)C1=C(C)NC(C)=C([C@@H]1C1=CC(=CC=C1)[N+]([O-])=O)C(=O)OC | BINDING AGENT | Binds to a substance such as a cell surface antigen, targetting a drug to that location, but not necessarily affecting the functioning of the substance itself C[C@@H](CCC1=CC=C(O)C=C1)NCCC1=CC=C(O)C(O)=C1 | MODULATOR | Effects the normal functioning of a protein in some way e.g., mixed agonist/antagonist or unclear whether action is positive or negative NC1=NC2=NC=C(CNC3=CC=C(C=C3)C(=O)N[C@@H](CCC(O)=O)C(O)=O)N=C2C(N)=N1 | POSITIVE MODULATOR | Positively effects the normal functioning of a protein e.g., receptor agonist, positive allosteric modulator, ion channel activator NCC1=CC=C(C=C1)C(O)=O | PROTEOLYTIC ENZYME | Hydrolyses a protein substrate through enzymatic reaction OC(=O)CCCC1=CC=CC=C1 | SUBSTRATE | Carried by a transporter, possibly competing with the natural substrate for transport (10 rows)
This is very limited example of the DB. If reader who interested in the DB how about play and analyze with the DB? And ERAlchemy is very useful!!!
Enjoy!
* To use ERAlchemy with postgresql, you need to install psycopg2 at first.