Go Pub Med and beyond Rules and reasoning
Go. Pub. Med and beyond: Rules and reasoning for ontology-based literature search Michael Schroeder Bio. Technological Center TU Dresden ms@mpi-cbg. de http: //www. biotec. tu-dresden. de Biotec
REWERSE: a European Network of Excellence n Reasoning on the Web with Rules and Semantics n Technology n Rule Markup languages n Policy specification, composition and conformance n Composition and typing n Reasoning-aware querying n Evolution and reactivity n Application n Web-based Decision Support for Event, Temporal, and Geographical Data n Towards a Bioinformatics Semantic Web n Personalised Information Systems n Towards a Bioinformatics Semantic Web n Groups: Dresden, Jena, Lisbon, Linkoeping, Edinburgh, Bucarest, Manchester, Paris n Rules and constraints for structure prediction, metabolic pathways, gene expression analysis, ontologies, workflows. 2
Go. Pub. Med and beyond: Rules and reasoning for ontology-based literature search 3
Problem Pub. Med >12 M articles 4
Example Task n Which enzymes does Levamisole inhibit? n It is well known that Levamisole inhibits alkaline phosphatase n It is not well known that Levamisole inhibits phosphofructokinase 5
Pub. Med Example n A keyword search for levamisole inhibitor produces well over 100 hits in Pub. Med. n To find out about specific functions, we have to go through all these papers! n We are interested in the relevant enzymatic functions. n A refined search for Levamisole inhibitor enzymatic activity produces only 5 hits a lot of relevant papers have been dropped. 6
Go. Pub. Med Example Query: Levamisole inhibitor Maximum papers: 100 Strict matching 54 papers in biological process 20 in cellular components 72 in molecular function 7
Go. Pub. Med Example Let’s look for some functions: 70 papers including terms, which are enzyme activities 8
Go. Pub. Med Example Transferase Kinase Hydrolase Oxidoreductase Lyase 8 6 58 2 1 9
Go. Pub. Med Example …alkaline phosphatase inhibitor levamisole… Effects of alkaline phosphatase and its inhibitor Levamisole… Alkaline Phosphatase: 52 papers 10
Go. Pub. Med Example Phosphofructokinase 11
Go. Pub. Med Example Levamisole direclty inhibits tumor phosphofructokinase 12
Go. Pub. Med Example In Pub. Med the article is listed at position 84! And hence unlikely to be read 13
Go. Pub. Med and beyond: Rules and reasoning for ontology-based literature search 14
Prova 15
Prova n Rule-based Java scripting for middleware n Combination of object-oriented and declarative programming n Offer a rule-based platform for distributed agent programming. n Expose logic and agent behaviour as rules; n Access data sources via wrappers written in Java n Make all Java API from available packages directly accessible from rules; n Run within the Java runtime; n Enable rapid prototyping of applications; 16
Pub. Med XML Output <Pubmed. Article> <Medline. Citation Owner="NLM" Status="Publisher"> <PMID>15469972</PMID> <Date. Created> <Year>2004</Year> <Month>10</Month> <Day>7</Day> </Date. Created> <Article> <Journal> <ISSN>0950 -1991</ISSN> <Journal. Issue Print. YN="N"> <Pub. Date> <Year>2004</Year> <Month>10</Month> <Day>6</Day> </Pub. Date> </Journal. Issue> <Coden>DEVPED</Coden> <Title>Development (Cambridge, England)</Title> <ISOAbbreviation>Development</ISOAbbreviation> </Journal>… 17
Output Year: 2004 Article. Title: Developmental potential of defined neural progenitors derived from mouse embryonic stem cells. Last. Name: Plachta First. Name: Nicolas Initials: N *********** Last. Name: Bibel First. Name: Miriam Initials: M *********** Last. Name: Tucker First. Name: Kerry Lee Initials: KL *********** Last. Name: Barde First. Name: Yves-Alain Initials: YA ********************* Year: 2004 Article. Title: Eye evolution: a question of genetic promiscuity. Last. Name: Nilsson Fore. Name: Dan-E Initials: DE *********** … 18
Code Snippet %%% XML reading tests : - eval(test_xml 1()). Prolog rules evaluate(Child. Node): "Year"=Child. Node. get. Node. Name(), printout(Child. Node). test_xml 1() : Document=XML("pubmed. xml"), Root = Document. get. Document. Element(), tagname(Root, Elements), Elements. nodes(Element), subtag(Element, Sub. Elements), Sub. Elements. nodes(Sub. Element), Sub. Element. Node. Name = Sub. Element. get. Node. Name(), Child. Nodes=Sub. Element. get. Child. Nodes(), Child. Nodes. nodes(Child. Node), evaluate(Child. Node). Java objects Unification tagname(Root, Elements): Elements = Root. get. Elements. By. Tag. Name("Medline. Citation"). subtag(Element, Sub. Elements): Sub. Elements = Element. get. Elements. By. Tag. Name("Pub. Date"). subtag(Element, Sub. Elements): Sub. Elements = Element. get. Elements. By. Tag. Name("Article"). subtag(Element, Sub. Elements): Sub. Elements = Element. get. Elements. By. Tag. Name("Author"). evaluate(Child. Node): "Initials"=Child. Node. get. Node. Name(), printout(Child. Node), println([***********]). evaluate(Child. Node): "First. Name"=Child. Node. get. Node. Name(), printout(Child. Node). evaluate(Child. Node): "Fore. Name"=Child. Node. get. Node. Name(), printout(Child. Node). evaluate(Child. Node): "Last. Name"=Child. Node. get. Node. Name(), printout(Child. Node). evaluate(Child. Node): "Article. Title"=Child. Node. get. Node. Name(), printout(Child. Node): Child. Node. Name = Child. Node. get. Node. Name(), Data. Name = Child. Node. get. First. Child(), String. Name = Data. Name. get. Node. Value(), println([Child. Node. Name, ": ", String. Name]). 19
Traverse the GO tree and find all phosphofructokinases Built-in DB location(database, “go", "jdbc: mysql: //comas. soi. city. ac. uk", "guest"). access location(database, "GO", "jdbc: mysql: //dbserver", "guest "). : -eval(consult("utils. prova")). : -solve(is. Phosphofructokinase()). Backtracking is. Phosphofructokinase() : dbopen("GO", DB), println(["DB open"]), sql_select(DB, term, [id, Term. ID], [name, Name], [where, "name = 'phosphofructokinase activity'"]), println(["Looking for all children of GO-Term (", Term. ID, "): ", Name]), findall(Term. ID, is. Phosphofructokinase(DB, Term. ID ), _). is. Phosphofructokinase(DB, Term. ID) : concat(["term 1_id=", Term. ID], Where. Clause), sql_select(DB, term 2 term, [term 2_id, Child. Term. ID], [where, Where. Clause]), concat(["id=", Child. Term. ID], Where. Clause 2), sql_select(DB, term, [name, Child. Name], [where, Where. Clause 2]), println([Term. ID, " has child ", Child. Name, ", ", Child. Term. ID]), is. Phosphofructokinase(DB, Child. Term. ID). is. Phosphofructokinase(DB, Term. ID) : println([Term. ID, " does not have any children. "]). 20 Recursion
Output Looking for all children of GO-Term (2153): phosphofructokinase activity 2153 has child 1 -phosphofructokinase activity, 2154 does not have any children. 2153 has child 6 -phosphofructo-2 -kinase activity, 2155 does not have any children. 2153 has child 6 -phosphofructokinase activity, 2156 does not have any children. 2153 does not have any children. yes 21
Messaging and Reaction Rules n Prova is designed to implement agents in a distributed system n Prova is based on theoretical work on multi agent systems n Prova provides predicates to send and receive messages and to realise reaction rules 22
Code Snippet Built-in agent communication: : - eval(ex 004()). a(1). a(2). b(3). b(4). % Send out messages ex 004() : println(["=====ex 004====="]), iam(Me), send. Msg and rcv. Msg Abstracting from protocols like JMS, Jade or inline send. Msg(XID 1, self, Me, queryref, a(I)), rcv. Mult(XID 1, self, Me, reply, a(I)), println(["Inline reaction ", rcv. Mult(XID 1, self, Me, reply, a(I))]), send. Msg(XID 2, self, Me, queryref, b(J)), rcv. Mult(XID 2, self, Me, reply, b(J)), println(["Inline reaction ", rcv. Mult(XID 2, self, Me, reply, b(J))]). % Reaction rule to general queryref rcv. Msg(XID, Protocol, From, queryref, [X|Xs]|Local. Context) : println(["Rule reaction 1 ", rcv. Msg(XID, Protocol, From, queryref, [X|Xs]|Local. Context)]), derive([X|Xs]), send. Msg(XID, Protocol, From, reply, [X|Xs]|Local. Context). rcv. Msg(XID, Protocol, From, queryref, [X|Xs]|Local. Context) : println(["Rule reaction 2 ", rcv. Msg(XID, Protocol, From, queryref, [X|Xs]|Local. Context)]), send. Msg(XID, Protocol, From, end_of_transmission, [X|Xs]|Local. Context). % A testing harness for printing incoming end_of_transmission messages. rcv. Msg(XID, Protocol, From, end_of_transmission|Extra) : println(["end_of_transmission for conversation-id ", XID, ": "|Extra]). 23
Output =====ex 004===== Rule reaction 1 ["rcv. Msg", "mediator@bioinf-mobile 3", "self", "mediator", "queryref", ["a", I]] Rule reaction 2 ["rcv. Msg", "mediator@bioinf-mobile 3", "self", "mediator", "queryref", ["a", I]] Inline reaction ["rcv. Mult", "mediator@bioinf-mobile 3", "self", "mediator", "reply", ["a", 1]] Inline reaction ["rcv. Mult", "mediator@bioinf-mobile 3", "self", "mediator", "reply", ["a", 2]] end_of_transmission for conversation-id mediator@bioinf-mobile 3: ["a", I] Rule reaction 1 ["rcv. Msg", "mediator@bioinf-mobile 6", "self", "mediator", "queryref", ["b", N@@16]] Rule reaction 2 ["rcv. Msg", "mediator@bioinf-mobile 6", "self", "mediator", "queryref", ["b", N@@16]] Rule reaction 1 ["rcv. Msg", "mediator@bioinf-mobile 8", "self", "mediator", "queryref", ["b", N@@16]] Rule reaction 2 ["rcv. Msg", "mediator@bioinf-mobile 8", "self", "mediator", "queryref", ["b", N@@16]] Inline reaction ["rcv. Mult", "mediator@bioinf-mobile 6", "self", "mediator", "reply", ["b", 3]] Inline reaction ["rcv. Mult", "mediator@bioinf-mobile 6", "self", "mediator", "reply", ["b", 4]] end_of_transmission for conversation-id mediator@bioinf-mobile 6: ["b", N@@16] Inline reaction ["rcv. Mult", "mediator@bioinf-mobile 8", "self", "mediator", "reply", ["b", 3]] Inline reaction ["rcv. Mult", "mediator@bioinf-mobile 8", "self", "mediator", "reply", ["b", 4]] end_of_transmission for conversation-id mediator@bioinf-mobile 8: ["b", N@@16] end_of_transmission for conversation-id mediator@bioinf-mobile 3: ["a", I] Shutdown complete. 24
Conclusion n Go. Pub. Med facilitates exploration of literature abstracts with the Gene. Ontology n Prova implements Prolog-style rules and reasoning with Java n Thanks: n Go. Pub. Med: Andreas Doms, Ralf Delfs, Alex Kozlenkov n Prova: Alex Kozlenkov n Support: EU Projects REWERSE, Gene. Stream, Bio. Grid n Contact: n Michael Schroeder: ms@biotec. tu-dresden. de n URLs n n www. biotec. tu-dresden. de www. rewerse. net (REWERSE project including info on bioinfo group) www. semanticwebrules. org (Prova) www. gopubmed. org (Go. Pub. Med) 25
- Slides: 25