A set of SPARQL examples that are used in different SIB resources
All the different sarcomas represented in Cellosaurus
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
# All NCiT terms child of C9118 "Sarcoma"
select distinct ?concept_id ?concept_label where {
?concept cello:more_specific_than+ ?generic_concept .
?concept skos:notation ?concept_id ; skos:prefLabel ?concept_label .
# ?generic_concept rdfs:label "Sarcoma" . # we use skos:notation instead
?generic_concept skos:notation "C9118" .
}
limit 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?concept")
v3("?concept_id"):::projected
v4("?concept_label"):::projected
v2("?generic_concept")
c4(["C9118"]):::literal
v1 --"cello:more_specific_than"--> v2
v1 --"skos:notation"--> v3
v1 --"skos:prefLabel"--> v4
v2 --"skos:notation"--> c4