sparql-examples

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

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

Query_102

rq turtle/ttl

Cell lines from patients with a kidney cancer

Use at


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 cell lines with a child of: C3150 "Kidney neoplasm"
select ?cl ?cl_name  ?disease_id ?disease_label where {
  ?cl cello:derivedFromIndividualWithDisease ?disease .
  ?cl cello:recommendedName ?cl_name .
  ?disease cello:isIdentifiedByXref ?disease_xref .
  ?disease rdfs:label ?disease_label .
  ?disease_xref  cello:more_specific_than* ?generic_disease .
  ?disease_xref skos:notation ?disease_id .
  ?generic_disease skos:notation "C3150" . # Kidney neoplasm
}
limit 2000
    
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?cl"):::projected 
  v3("?cl_name"):::projected 
  v2("?disease")
  v7("?disease_id"):::projected 
  v5("?disease_label"):::projected 
  v4("?disease_xref")
  v6("?generic_disease")
  c7(["C3150"]):::literal 
  v1 --"cello:derivedFromIndividualWithDisease"-->  v2
  v1 --"cello:recommendedName"-->  v3
  v2 --"cello:isIdentifiedByXref"-->  v4
  v2 --"rdfs:label"-->  v5
  v4 --"cello:more_specific_than"-->  v6
  v4 --"skos:notation"-->  v7
  v6 --"skos:notation"-->  c7