ncbo sparql endpoint

51
THE NATIONAL CENTER FOR BIOMEDICAL ONTOLOGY NCBO SPARQL Endpoint Trish Whetzel Outreach Coordinator

Upload: tomai

Post on 15-Jan-2016

35 views

Category:

Documents


0 download

DESCRIPTION

NCBO SPARQL Endpoint. Trish Whetzel Outreach Coordinator. Outline. NCBO Overview BioPortal Web and Web services BioPortal SPARQL Endpoint BioPortal Metadata Ontology SPARQL Examples. Links of Interest. http://www.bioontology.org/wiki/index.php/SWAT4LS2012_Tutorial. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: NCBO SPARQL Endpoint

THE NATIONAL CENTER FORBIOMEDICAL ONTOLOGY

NCBO SPARQL Endpoint

Trish WhetzelOutreach Coordinator

Page 2: NCBO SPARQL Endpoint

Outline

• NCBO Overview• BioPortal Web and Web services • BioPortal SPARQL Endpoint• BioPortal Metadata Ontology• SPARQL Examples

Page 3: NCBO SPARQL Endpoint

Links of Interest

• http://www.bioontology.org/wiki/index.php/SWAT4LS2012_Tutorial

Page 4: NCBO SPARQL Endpoint

National Center for Biomedical Ontology

• Mission – To create software for the application of

ontologies in biomedical science and clinical care

• NCBO Partners– Stanford University - Dr. Mark A. Musen– Mayo Clinic - Dr. Christopher G. Chute– University at Buffalo - Dr. Barry Smith– University of Victoria - Dr. Margaret-Anne

Storey

Page 5: NCBO SPARQL Endpoint

NCBO Key Activities

• We create and maintain a library of biomedical ontologies

• We build tools and Web services to enable the use of ontologies

• We collaborate with scientific communities that develop and use ontologies

Page 6: NCBO SPARQL Endpoint

National Centers for Biomedical Computing(http://www.ncbcs.org)

Page 7: NCBO SPARQL Endpoint

www.bioontology.org

Page 8: NCBO SPARQL Endpoint

Outline

• NCBO Overview• BioPortal Web and Web services • BioPortal SPARQL Endpoint• BioPortal Metadata Ontology• SPARQL Examples

Page 9: NCBO SPARQL Endpoint

bioportal.bioontology.orgbioportal.bioontology.org

Page 10: NCBO SPARQL Endpoint

BioPortal

• Repository of biomedical ontologies• Infrastructure is domain independent• Stores ontologies developed in OWL, Protégé

frames, OBO format, and Rich Release Format• Access to ontologies via Web interface, Web

services, and SPARQL • Access control for private ontologies• Supports subsets/views of ontologies

Page 11: NCBO SPARQL Endpoint

http:

//re

st.b

ioon

tolo

gy.o

rghtt

p://

rest

.bio

onto

logy

.org

Ontology ServicesOntology Services

• Search• Traverse• Comment• Download

• Search• Traverse• Comment• Download

WidgetsWidgets• Tree-view• Auto-complete• Graph-view

• Tree-view• Auto-complete• Graph-view

AnnotationAnnotation

Data AccessData Access

Mapping ServicesMapping Services

• Create• Upload• Download

• Create• Upload• Download

Term recognitionTerm recognition

Search “data” annotated with a given term

Search “data” annotated with a given term

http://bioportal.bioontology.orghttp://bioportal.bioontology.org

Page 12: NCBO SPARQL Endpoint

Virtual Appliance Installations

Page 13: NCBO SPARQL Endpoint

Who is using NCBO technology?

Page 14: NCBO SPARQL Endpoint

Outline

• NCBO Overview• BioPortal Web and Web services • BioPortal SPARQL Endpoint• BioPortal Metadata Ontology• SPARQL Examples

Page 15: NCBO SPARQL Endpoint

BioPortal Architecture

OWL, RDF, Protégé frames

RDF LexEVSProtégé DB

Hibernate ORM

Spring Framework

Restlet

Tomcat

Ruby on Rails

OBO format, UMLS RRF, LexGrid XML

Third partyapplications

SPARQLAccess

Page 16: NCBO SPARQL Endpoint

http://sparql.bioontology.org/http://sparql.bioontology.org/

Page 17: NCBO SPARQL Endpoint

BioPortal SPARQL Data

• Ontology Content• Ontology Metadata• Mapping Data

Page 18: NCBO SPARQL Endpoint

BioPortal SPARQL Data cont.

• All ontologies from BioPortal– Original ontology format transformed into RDF

• OBO and OWL converted via OWL API• RRF converted via UMLS2RDF custom code

– Latest version only

• Statistics– 415 ontologies– 4.2M terms– 2419 different predicates– 80M triples

Page 19: NCBO SPARQL Endpoint

Outline

• NCBO Overview• BioPortal Web and Web services • BioPortal SPARQL Endpoint• BioPortal Metadata Ontology• SPARQL Examples

Page 20: NCBO SPARQL Endpoint

BioPortal Metadata Ontology

• Virtual Ontology – Virtual ontology identifier provides a stable

identifier across all versions of the ontology– All versions of an ontology are linked via this ID

• Ontology – Ontology version identifier is unique for each

version of an ontology– Most metadata linked directly to the ontology

version

Page 21: NCBO SPARQL Endpoint

BioPortal Ontology Metadata

Page 22: NCBO SPARQL Endpoint

BioPortal Metadata Ontology

Page 23: NCBO SPARQL Endpoint

Outline

• NCBO Overview• BioPortal Web and Web services • BioPortal SPARQL Endpoint• BioPortal Metadata Ontology• SPARQL Examples

Page 24: NCBO SPARQL Endpoint

SPARQL Basics

– W3C standard query language for RDF

Page 25: NCBO SPARQL Endpoint

Prefixes of Interest

• meta: http://bioportal.bioontology.org/metadata/def/• omv: http://omv.ontoware.org/2005/05/ontology# • map:

http://protege.stanford.edu/ontologies/mappings/mappings.rdfs#

• owl: http://www.w3.org/2002/07/owl# • skos: http://www.w3.org/2004/02/skos/core# • rdfs: http://www.w3.org/2000/01/rdf-schema# • rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# • xsd: http://www.w3.org/2001/XMLSchema#

Page 26: NCBO SPARQL Endpoint

Ontology Content in Named Graphs

No named graph is the same as the union of all graphs.

Page 27: NCBO SPARQL Endpoint

Globals

• Provides rdfs:subPropertyOf reasoning to enable querying over multiple ontologies while using the same predicate– http://bioportal.bioontology.org/ontologies/globals

• Implemented for:– Preferred name – skos:prefLabel– Synonyms – skos:altLabel– Term definition – skos:definition– Term author – dc:author

Page 28: NCBO SPARQL Endpoint

Query including globals

Page 29: NCBO SPARQL Endpoint

Select all ontology graphs

Page 30: NCBO SPARQL Endpoint
Page 31: NCBO SPARQL Endpoint

All ontologies updated since DATE

Page 32: NCBO SPARQL Endpoint

List latest ontologies

Page 33: NCBO SPARQL Endpoint

Find term in all ontologies

Page 34: NCBO SPARQL Endpoint

Get all root terms

Page 35: NCBO SPARQL Endpoint

Select all terms from theABA Adult Mouse Anatomy

Page 36: NCBO SPARQL Endpoint

Select URI and preferred label from all terms

Page 37: NCBO SPARQL Endpoint

Get parent of given term

Page 38: NCBO SPARQL Endpoint

Select all terms and their parent

Page 39: NCBO SPARQL Endpoint

Select distinct properties from an ontology

Page 40: NCBO SPARQL Endpoint

Select properties for term

Page 41: NCBO SPARQL Endpoint

Get count of terms in SNOMED

Page 42: NCBO SPARQL Endpoint

Mapping Access

• Get a list of mappings for an ontology to all other ontologies

• Get a list of mappings between two ontologies• Get a list of mappings for a single term• Get a list of mappings between two terms

Page 43: NCBO SPARQL Endpoint

Mapping Data Sources

• Loom - lexical mappings• REST - user submitted mappings• UMLS-CUI - CUI based mappings• OBO-XREF - Mappings for terms with same

xref attribute• URI-MATCH - Mappings that for terms that in

different ontologies are represented by the same URI

http://www.bioontology.org/wiki/index.php/SPARQL_BioPortal#Mappings

Page 44: NCBO SPARQL Endpoint

RDF Representation of Mappings

Noy, N.F., Griffith, N., Musen, M.A.: Collecting community-based mappings in an ontology repository. In: International Semantic Web Conference. pp. 371–386 (2008)

Page 45: NCBO SPARQL Endpoint

Get mapping statistics for an ontology

Page 46: NCBO SPARQL Endpoint

Get all mappings between two ontologies

Page 47: NCBO SPARQL Endpoint

Get all mappings for a given term

Page 48: NCBO SPARQL Endpoint

Performance Tips and Tricks

– Completely unbound patterns (?g ?s ?p ?o) are not allowed

– To optimize queries, use UNIONS instead of FILTERS

– If using FILTER on literals it is better if the filter is not applied to millions of rows

– To prevent combinatorial explosions of results, consider use CONSTRUCT or DESCRIBE (any M-N relationship can provoke this)

Page 49: NCBO SPARQL Endpoint

SPARQL Code Repository

• https://github.com/ncbo/sparql-code-examples

Page 50: NCBO SPARQL Endpoint

Thank you!

• BioPortal SPARQL documentation: http://www.bioontology.org/wiki/index.php/SPARQL_BioPortal

• Keep in touch

– Software support: [email protected] – Twitter: @bioontology– Facebook: http://on.fb.me/bioontology – LinkedIn: http://linkd.in/ncbo-group

Page 51: NCBO SPARQL Endpoint

BioPortal SPARQL Endpoint Info

• Documentation: http://www.bioontology.org/wiki/index.php/SPARQL_BioPortal

• Query interface: http://sparql.bioontology.org/• Example queries:

http://sparql.bioontology.org/examples • Sample code:

https://github.com/ncbo/sparql-code-examples