--- 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/>
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up