sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

Query_145

rq turtle/ttl

Cell lines that are annotated as originating from liver

Use at


PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX db: <https://purl.expasy.org/cellosaurus/rdf/db/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select ?cl ?cl_name ?xref_label ?xref_notation
where {
  ?cl cello:derivedFromSite ?site .
  ?cl cello:recommendedName ?cl_name .
  ?site cello:isIdentifiedByXref ?xref .
  ?xref skos:prefLabel ?xref_label ; skos:notation ?xref_notation .
  ?xref cello:more_specific_than* ?generic_concept .
  # examples: liver: UBERON_0002107, bone marrow: UBERON_0002371, lymph node: UBERON_0000029
  ?generic_concept skos:notation "UBERON_0002107" . # liver
  ?generic_concept skos:inScheme db:UBERON .
}
limit 100
    
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?cl"):::projected 
  v3("?cl_name"):::projected 
  v7("?generic_concept")
  v2("?site")
  v4("?xref")
  v5("?xref_label"):::projected 
  v6("?xref_notation"):::projected 
  c7(["UBERON_0002107"]):::literal 
  c9([https://purl.expasy.org/cellosaurus/rdf/db/UBERON]):::iri 
  v1 --"cello:derivedFromSite"-->  v2
  v1 --"cello:recommendedName"-->  v3
  v2 --"cello:isIdentifiedByXref"-->  v4
  v4 --"skos:prefLabel"-->  v5
  v4 --"skos:notation"-->  v6
  v4 --"cello:more_specific_than"-->  v7
  v7 --"skos:notation"-->  c7
  v7 --"skos:inScheme"-->  c9