Searching for DrugBank Ids

24 views
Skip to first unread message

Douglas Myers-Turnbull

unread,
Oct 27, 2014, 8:10:15 PM10/27/14
to jbiowh-...@googlegroups.com
Hi,

I noticed that querying either of these with JBioWHSearch.search(query, null) returns no results:
APRD00372, DB01050

However, querying for "ibuprofen" does. What's going on here?

Thanks,
Douglas

Roberto Vera Alvarez

unread,
Oct 28, 2014, 4:47:13 AM10/28/14
to jbiowh-...@googlegroups.com
Hi Douglas,

Using the query DB01050 and ibuprofen works for me. APRD00372 is a second
accession id and the DrugBank search implementation does not use it as a
predefined search. You can search it using directly the DrugBank entity. If you
are interested in this I can add it to the search implementation.

This is the result for the DB01050

ProteinCUDA1:~> java -jar
/home/roberto/.m2/repository/org/DrugBankSearch/0.0.1/DrugBankSearch-0.0.1-
jar-with-dependencies.jar -v -q DB01050
INFO [main] 2014-10-28 09:42:36,817 - Opening JPA connection to:
INFO [main] 2014-10-28 09:42:36,818 - Driver: com.mysql.jdbc.Driver
INFO [main] 2014-10-28 09:42:36,818 - URL:
jdbc:mysql://hydrax.icgeb.trieste.it:3307/biowh
INFO [main] 2014-10-28 09:42:36,818 - User: biowh
INFO [main] 2014-10-28 09:42:36,819 - Adding the WHDBMSFactory to the Map
INFO [main] 2014-10-28 09:42:39,645 - Open EntityManagerFactory:
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl@7962144c
INFO [main] 2014-10-28 09:42:39,646 - Parsing by drug id
INFO [main] 2014-10-28 09:42:39,646 - Using query: DB01050
INFO [main] 2014-10-28 09:42:41,751 - JPQL: SELECT g FROM DrugBank g WHERE
g.id like :id0
INFO [main] 2014-10-28 09:42:41,751 - JPQL Parameters: id0 --> 'DB01050'
INFO [main] 2014-10-28 09:42:41,804 - Found 1 drugs
INFO [main] 2014-10-28 09:42:41,804 - DB01050 Ibuprofen For
symptomatic treatment of rheumatoid arthritis, juvenile rheumatoid arthritis
and osteoarthritis. May be used to treat mild to moderate pain and for the
management of dysmenorrhea. May be used to reduce fever. Has been used with
some success for treating ankylosing spondylitis, gout and psoriatic
arthritis. May reduce pain, fever and inflammation of pericarditis. May be used
IV with opiates to relieve moderate to severe pain. Ibuprofen lysine may be
used IV to treat patent ductus arteriosus (PDA) in premature neonates.
INFO [main] 2014-10-28 09:42:41,805 - Total elapsed time: 5 s

Douglas Myers-Turnbull

unread,
Oct 28, 2014, 2:39:46 PM10/28/14
to jbiowh-...@googlegroups.com
Strange.

Perhaps you can tell me what I did wrong here. I downloaded a fresh copy of JBioWH, the SQL scripts, and drugbank.xml. Then I ran:
drop database jbiowh;
drop user jbiowh@localhost;
create database jbiowh character set = utf8 collate= utf8_bin;
create user 'jbiowh'@'localhost' identified by 'jbiowh';
grant all on `jbiowh`.* to `jbiowh`@localhost identified by 'jbiowh';
use jbiowh;
source warehouse.sql
source warehouse-6.1.0-to-6.1.1.sql
>java -jar ~/.m2/repository/org/DrugBankSearch/0.0.1/jbiowh-parser-6.1.0-jar-with-dependencies.jar -i ./drugbank/config.xml

However, now I get:
>java -jar ~/.m2/repository/org/DrugBankSearch/0.0.1/DrugBankSearch-0.0.1-jar-with-dependencies.jar -url jdbc:mysql://localhost:3306/jbiowh -user jbiowh -passwd jbiowh -q DB01050
 INFO [main] 2014-10-28 11:33:12,851 - Parsing by drug id
   INFO [main] 2014-10-28 11:33:12,852 - Using query: DB01050

But:
>java -jar ~/.m2/repository/org/DrugBankSearch/0.0.1/DrugBankSearch-0.0.1-jar-with-dependencies.jar -url jdbc:mysql://localhost:3306/jbiowh -user jbiowh -passwd jbiowh -q DB01050
.    .    .
.    .    .
.    .    .
Caused by: java.sql.SQLException: Value '1109535�
15687-27-1��2013�Ibuprofen, a propionic acid derivative, is a prototypical nonsteroidal anti-inflammatory agent (NSAIA) with analgesic and antipyretic properties.�~ 80% absorbed from GI tract<p>Time to reach peak plasma concentration = 47 minutes (suspension), 62 minutes (chewable tablets), 120 minutes (conventional tablets)</p> APRD00372�For symptomatic treatment of rheumatoid arthritis, juvenile rheumatoid arthritis and osteoarthritis. May be used to treat mild to moderate pain and for the management of dysmenorrhea. May be used to reduce fever. Has been used with some success for treating ankylosing spondylitis, gout and psoriatic arthritis. May reduce pain, fever and inflammation of pericarditis. May be used IV with opiates to relieve moderate to severe pain. Ibuprofen lysine may be used IV to treat patent ductus arteriosus (PDA) in premature neonates.�hThe exact mechanism of action of ibuprofen is unknown. Ibuprofen is a non-selective inhibitor of cyclooxygenase, an enzyme invovled in prostaglandin synthesis via the arachidonic acid pathway. Its pharmacological effects are believed to be due to inhibition cylooxygenase-2 (COX-2) which decreases the synthesis of  prostaglandins involved in mediating inflammation, pain, fever and swelling. Antipyretic effects may be due to action on the hypothalamus, resulting in an increased peripheral blood flow, vasodilation, and subsequent heat dissipation. Inhibition of COX-1 is thought to cause some of the side effects of ibuprofen including GI ulceration. Ibuprofen is administered as a racemic mixture. The R-enantiomer undergoes extensive interconversion to the S-enantiomer  <i>in vivo</i>. The S-enantiomer is believed to be the more pharmacologically active enantiomer. Ibuprofen� 2-4 hours�90-99% to whole human plasma and site II of purified albumin, binding appears to be saturable and becomes non-linear at concentrations exceeding 20 mcg/ml.0http://en.wikipedia.org/wiki/Ibuprofen#Synthesis��<p>Side effects: May cause peripheral edema and fluid retention. Use caution in patients with congestive heart failure or severe uncontrolled hypertension. May cause dyspepsia, heartburn, nausea, vomiting, anorexia, diarrhea, constipation, stomatitis, flatulence, bloating, epigastric pain, and abdominal pain. Peptic ulcer and GI bleeding have been reported. May also cause dizziness, headache and nervousness. Acute renal failure accompanied by acute tubular necrosis has been reported. <p>Most common symptoms of overdose are abdominal pain, nausea, vomiting, lethargy, vertigo, drowsiness (somnolence), dizziness and insomnia. Other symptoms of overdose include headache, loss of consciousness, tinnitus, CNS depression, convulsions and seizures. May rarely cause metabolic acidosis, abnormal hepatic function, hyperkalemia, renal failure, dyspnea, respiratory depression, coma, acute renal failure, and apnea (primarily in very young pediatric patients).</p><p>LD<sub>50</sub>=1255mg/kg(orally in mice)</p>�0000-00-00 00:00:00=Ibuprofen is rapidly metabolized and eliminated in the urine.' can not be represented as java.sql.Timestamp
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:870)
at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:928)
at com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:555)
at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:5943)
at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:5609)
at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4582)
at org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getObjectFromResultSet(DatabasePlatform.java:1344)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:1300)
... 28 more

Thanks,
Douglas

Roberto Vera Alvarez

unread,
Oct 29, 2014, 9:56:40 AM10/29/14
to jbiowh-...@googlegroups.com
Hi Douglas

I released another version of JBioWH (6.1.2). New changes in the DrugBank
module were introduced. Please, use the new JAR files.

JBioWH last version relational schema is the warehouse.sql script. If you are
using this file you don't need to use any other file from the updates. The
updates are applied when you have created the database with a old version of
the warehouse.sql script.

So, in your case the source warehouse.sql (downloading the last version from
our web site) will be sufficient.

Please, let me know if you need more help.

Regards,
Roberto

Douglas Myers-Turnbull

unread,
Oct 29, 2014, 2:25:55 PM10/29/14
to jbiowh-...@googlegroups.com
Hi Roberto:

Thanks. With the new release, I'm able to query DB01050 and get Ibuprofen.

However, when I try to get the transporters, carriers, enzymes, or targets, I get:
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'Partner' in 'field list'
Error Code: 1054
Call: SELECT WID, DrugBank_WID, Partner, Position FROM DrugBankTransporter WHERE (DrugBank_WID = ?)
bind => [1 parameter bound]
Query: ReadAllQuery(name="drugBankTransporter" referenceClass=DrugBankTransporter sql="SELECT WID, DrugBank_WID, Partner, Position FROM DrugBankTransporter WHERE (DrugBank_WID = ?)")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:682)
.   .   .
.   .   .
.   .   .
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'Partner' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
at com.mysql.jdbc.Util.getInstance(Util.java:360)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2030)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:1007)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:642)
... 33 more

Roberto Vera Alvarez

unread,
Oct 29, 2014, 2:58:28 PM10/29/14
to jbiowh-...@googlegroups.com
Hi Douglas,

Please, update the version of JBioWH in the POM file to 6.1.2 like this:

<dependency>
<groupId>org</groupId>
<artifactId>jbiowh-core</artifactId>
<version>6.1.2</version>
</dependency>
<dependency>
<groupId>org</groupId>
<artifactId>jbiowh-dbms</artifactId>
<version>6.1.2</version>
</dependency>
<dependency>
<groupId>org</groupId>
<artifactId>jbiowh-persistence</artifactId>
<version>6.1.2</version>
</dependency>


perseo:DrugBankSearch> java -jar target/DrugBankSearch-0.0.1-jar-with-
dependencies.jar -v -q DB01050
INFO [main] 2014-10-29 19:51:36,493 - Opening JPA connection to:
INFO [main] 2014-10-29 19:51:36,494 - Driver: com.mysql.jdbc.Driver
INFO [main] 2014-10-29 19:51:36,494 - URL:
jdbc:mysql://hydrax.icgeb.trieste.it:3307/biowh
INFO [main] 2014-10-29 19:51:36,494 - User: biowh
INFO [main] 2014-10-29 19:51:36,494 - Adding the WHDBMSFactory to the Map
INFO [main] 2014-10-29 19:51:39,001 - Open EntityManagerFactory:
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl@32f246b2
INFO [main] 2014-10-29 19:51:39,001 - Parsing by drug id
INFO [main] 2014-10-29 19:51:39,001 - Using query: DB01050
INFO [main] 2014-10-29 19:51:41,787 - JPQL: SELECT g FROM DrugBank g WHERE
g.id like :id0
INFO [main] 2014-10-29 19:51:41,787 - JPQL Parameters: id0 --> 'DB01050'
INFO [main] 2014-10-29 19:51:41,946 - Found 1 drugs
INFO [main] 2014-10-29 19:51:47,450 - DB01050 Ibuprofen For
symptomatic treatment of rheumatoid arthritis, juvenile rheumatoid arthritis
and osteoarthritis. May be used to treat mild to moderate pain and for the
management of dysmenorrhea. May be used to reduce fever. Has been used with
some success for treating ankylosing spondylitis, gout and psoriatic
arthritis. May reduce pain, fever and inflammation of pericarditis. May be used
IV with opiates to relieve moderate to severe pain. Ibuprofen lysine may be
used IV to treat patent ductus arteriosus (PDA) in premature neonates. 11
1 8 10
CFTR_HUMAN
PGH1_HUMAN
PPARG_HUMAN
ALBU_HUMAN
TPA_HUMAN
TRBM_HUMAN
CP2C9_HUMAN
FABPI_HUMAN
BCL2_HUMAN
PGH2_HUMAN
AOFB_HUMAN
SO1A2_HUMAN
SO2B1_HUMAN
S22A8_HUMAN
S22AB_HUMAN
MRP1_HUMAN
MRP4_HUMAN
MDR1_HUMAN
S22A6_HUMAN
ALBU_HUMAN
PGH1_HUMAN
UD2B4_HUMAN
UD19_HUMAN
UD13_HUMAN
CP2C8_HUMAN
CP2C9_HUMAN
UD2B7_HUMAN
PGH2_HUMAN
UD11_HUMAN
CP2CJ_HUMAN
INFO [main] 2014-10-29 19:51:49,672 - Total elapsed time: 13 s
perseo:DrugBankSearch>
DrugBankSearch.tar.gz

Douglas Myers-Turnbull

unread,
Oct 30, 2014, 4:26:47 PM10/30/14
to jbiowh-...@googlegroups.com
Thanks!

I did indeed forget to update the POM. Everything seems to be working now.

Sincerely,
Douglas

Roberto Vera Alvarez

unread,
Oct 30, 2014, 4:38:56 PM10/30/14
to jbiowh-...@googlegroups.com
Hi Douglas,

I'm happy with that.

Please, don't hesitate to ask if you need any help.

Regards,
Roberto
Reply all
Reply to author
Forward
0 new messages