Thesis presentation Samuel Lampa

27
MSc Thesis presentation: SWI-Prolog as a Semantic Web tool for semantic querying in Bioclipse: Integration and performance benchmarking Samuel Lampa <http://saml.rilspace.org> Supervisor: Egon Willighagen <http://chem-bla-ics.blogspot.com> Bioclipse & Proteochemometric group (Prof. Jarl Wikberg) Department of Pharmaceutical Bioinformatics Uppsala University 2010-06-18 MSc Thesis presentation: SWI-Prolog as a Semantic Web tool for semantic querying in Bioclipse: Integration and performance benchmarking Samuel Lampa <http://saml.rilspace.org> Supervisor: Egon Willighagen <http://chem-bla-ics.blogspot.com> Bioclipse & Proteochemometric group (Prof. Jarl Wikberg) Department of Pharmaceutical Bioinformatics Uppsala University 2010-06-18

description

Presentation of my project, entitled "SWI-Prolog as a Semantic Web tool for semantic querying in Bioclipse: Integration and performance benchmarking"

Transcript of Thesis presentation Samuel Lampa

Page 1: Thesis presentation Samuel Lampa

MSc Thesis presentation:

SWI-Prolog as a Semantic Web tool for semantic querying in Bioclipse:

Integration and performance benchmarking

Samuel Lampa <http://saml.rilspace.org>

Supervisor: Egon Willighagen <http://chem-bla-ics.blogspot.com>

Bioclipse & Proteochemometric group (Prof. Jarl Wikberg) Department of Pharmaceutical Bioinformatics

Uppsala University

2010-06-18

MSc Thesis presentation:

SWI-Prolog as a Semantic Web tool for semantic querying in Bioclipse:

Integration and performance benchmarking

Samuel Lampa <http://saml.rilspace.org>

Supervisor: Egon Willighagen <http://chem-bla-ics.blogspot.com>

Bioclipse & Proteochemometric group (Prof. Jarl Wikberg) Department of Pharmaceutical Bioinformatics

Uppsala University

2010-06-18

Page 2: Thesis presentation Samuel Lampa
Page 3: Thesis presentation Samuel Lampa

What is Bioclipse?What is Bioclipse?

Page 4: Thesis presentation Samuel Lampa
Page 5: Thesis presentation Samuel Lampa
Page 6: Thesis presentation Samuel Lampa

What is the Semantic Web?What is the

Semantic Web?

Page 7: Thesis presentation Samuel Lampa

What is the Semantic Web?

Page 8: Thesis presentation Samuel Lampa
Page 9: Thesis presentation Samuel Lampa

RDF Example (In Notation 3 format)

@prefix : <http://www.nmrshiftdb.org/onto#> . xsd: <http://www.w3.org/2001/XMLSchema#> . nmr: <http://pele.farmbio.uu.se/nmrshiftdb/?> nmr:moleculeId=234 :hasSpectrum nmr:spectrumId=4735 ; :moleculeId "234" . nmr:spectrumId=4735 :hasPeak nmr:s4735p0 , nmr:s4735p1 , nmr:s4735p2 . nmr:s4735p0 :hasShift "17.6"^^xsd:decimal . nmr:s4735p1 :hasShift "18.3"^^xsd:decimal . nmr:s4735p2 :hasShift "22.6"^^xsd:decimal .

Page 10: Thesis presentation Samuel Lampa

PREFIX fn: <http://www.w3.org/2005/xpath-functions#>

PREFIX nmr: <http://www.nmrshiftdb.org/onto#>

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?s

WHERE {

?s nmr:hasPeak [ nmr:hasShift ?s1 ] ,

[ nmr:hasShift ?s2 ] ,

[ nmr:hasShift ?s3 ] .

FILTER ( fn:abs(?s1 - 17.6) < 0.3 ) .

FILTER ( fn:abs(?s2 - 18.3) < 0.3 ) .

FILTER ( fn:abs(?s3 - 22.6) < 0.3 ) . }

SPARQL Example

Page 11: Thesis presentation Samuel Lampa

What is Prolog?What is Prolog?

Page 12: Thesis presentation Samuel Lampa

Prolog: Fewer technical layers

Conventional software Prolog

Page 13: Thesis presentation Samuel Lampa

Prolog code example % === SOME FACTS === hasHBondDonorsCount( substanceX, 3 ).hasHBondDonorsCount( substanceY, 5 ).hasHBondDonorsCount( substanceZ, 7 ).

hasHBondAcceptorsCount( substanceX, 7 ).hasHBondAcceptorsCount( substanceY, 10 ).hasHBondAcceptorsCount( substanceZ, 13 ).

hasMolecularWeight( substanceX, 320 ).hasMolecularWeight( substanceY, 500 ).hasMolecularWeight( substanceZ, 500 ).

% === A RULE ("RULE OF FIVE" ÀLA PROLOG) === isDrugLike( Substance ) :- hasHBondDonorsCount( Substance, HBDonors ), HBDonors <= 5, hasHBondAcceptorsCount( Substance, HBAcceptors ), HBAcceptors <= 10, hasMolecularWeight( Substance, MW ), MW < 500.

% === QUERYING THE RULE ===?- isDrugLike(substanceX)true.?- isDrugLike(X)X = substanceX ;X = substanceY.

Page 14: Thesis presentation Samuel Lampa

Prolog code example % === SOME FACTS === hasHBondDonorsCount( substanceX, 3 ).hasHBondDonorsCount( substanceY, 5 ).hasHBondDonorsCount( substanceZ, 7 ).

hasHBondAcceptorsCount( substanceX, 7 ).hasHBondAcceptorsCount( substanceY, 10 ).hasHBondAcceptorsCount( substanceZ, 13 ).

hasMolecularWeight( substanceX, 320 ).hasMolecularWeight( substanceY, 500 ).hasMolecularWeight( substanceZ, 500 ).

% === A RULE ("RULE OF FIVE" ÀLA PROLOG) === isDrugLike( Substance ) :- hasHBondDonorsCount( Substance, HBDonors ), HBDonors <= 5, hasHBondAcceptorsCount( Substance, HBAcceptors ), HBAcceptors <= 10, hasMolecularWeight( Substance, MW ), MW < 500.

% === QUERYING THE RULE ===?- isDrugLike(substanceX)true.?- isDrugLike(X)X = substanceX ;X = substanceY.

Body

HeadImplication (“If [body] then [head]”)

Comma means conjunction (“and”)

Capitalized terms are always variables

Page 15: Thesis presentation Samuel Lampa

Prolog code example % === SOME FACTS === hasHBondDonorsCount( substanceX, 3 ).hasHBondDonorsCount( substanceY, 5 ).hasHBondDonorsCount( substanceZ, 7 ).

hasHBondAcceptorsCount( substanceX, 7 ).hasHBondAcceptorsCount( substanceY, 10 ).hasHBondAcceptorsCount( substanceZ, 13 ).

hasMolecularWeight( substanceX, 320 ).hasMolecularWeight( substanceY, 500 ).hasMolecularWeight( substanceZ, 500 ).

% === A RULE ("RULE OF FIVE" ÀLA PROLOG) === isDrugLike( Substance ) :- hasHBondDonorsCount( Substance, HBDonors ), HBDonors <= 5, hasHBondAcceptorsCount( Substance, HBAcceptors ), HBAcceptors <= 10, hasMolecularWeight( Substance, MW ), MW < 500.

% === QUERYING THE RULE ===?- isDrugLike(substanceX)true.?- isDrugLike(X)X = substanceX ;X = substanceY.

By submitting a variable “X”, it will be populated with all instances which satisfies the “isDrugLike” rule

Testing a specific atom (“sutstanceX”)

Page 16: Thesis presentation Samuel Lampa

Prolog: Fewer technical layers

Conventional software Prolog

Page 17: Thesis presentation Samuel Lampa

What was done in this project?What was done in this project?

Page 18: Thesis presentation Samuel Lampa

The work done (New functionality in dashed lines)

Page 19: Thesis presentation Samuel Lampa

SWI-Prolog in action in Bioclipse

Page 20: Thesis presentation Samuel Lampa

SPARQL Code used

Page 21: Thesis presentation Samuel Lampa

Prolog code used (1)

Page 22: Thesis presentation Samuel Lampa
Page 23: Thesis presentation Samuel Lampa
Page 24: Thesis presentation Samuel Lampa

Prolog code used (2)

Page 25: Thesis presentation Samuel Lampa
Page 26: Thesis presentation Samuel Lampa
Page 27: Thesis presentation Samuel Lampa

Thank you!Samuel Lampa <http://saml.rilspace.org>

Supervisor: Egon Willighagen <http://chem-bla-ics.blogspot.com>

Bioclipse & Proteochemometric group (Prof. Jarl Wikberg) Department of Pharmaceutical Bioinformatics

Uppsala University

2010-06-18

Thank you!Samuel Lampa <http://saml.rilspace.org>

Supervisor: Egon Willighagen <http://chem-bla-ics.blogspot.com>

Bioclipse & Proteochemometric group (Prof. Jarl Wikberg) Department of Pharmaceutical Bioinformatics

Uppsala University

2010-06-18