--- title: SPARQL Snips --- ## Find term, label, and description for strings ```sql= PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX UBERON: <http://purl.obolibrary.org/obo/UBERON_> PREFIX IAO: <http://purl.obolibrary.org/obo/IAO_> SELECT DISTINCT ?s ?label ?desc FROM <http://purl.obolibrary.org/obo/merged/CL> WHERE { ?s rdfs:label ?label . ?s IAO:0000115 ?desc . FILTER( regex(?label, "^abnormal cell$", "i") || regex(?label, "^leukocyte$", "i") ) } ``` Endpoint: <http://www.ontobee.org/sparql> \ API Endpoint: <http://sparql.hegroup.org/sparql/> ## Find Description for a term ```sql= PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX UBERON: <http://purl.obolibrary.org/obo/UBERON_> PREFIX IAO: <http://purl.obolibrary.org/obo/IAO_> SELECT DISTINCT ?desc WHERE { UBERON:0004539 IAO:0000115 ?desc . } ``` Endpoint: <http://www.ontobee.org/sparql> \ API Endpoint: <http://sparql.hegroup.org/sparql/> ## Find label and description for a term ```sql= PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX UBERON: <http://purl.obolibrary.org/obo/UBERON_> PREFIX IAO: <http://purl.obolibrary.org/obo/IAO_> SELECT DISTINCT ?label ?desc WHERE { UBERON:0004539 rdfs:label ?label . UBERON:0004539 IAO:0000115 ?desc . } ``` Endpoint: <http://www.ontobee.org/sparql> \ API Endpoint: <http://sparql.hegroup.org/sparql/>