#
# example SPARQL query 102
#

@prefix schema: <https://schema.org/> . 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 
@prefix sh: <http://www.w3.org/ns/shacl#> . 
@prefix cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/> .


cello:Query_102 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Cell lines from patients with a kidney cancer"""@en ; 
    schema:keywords "disease" , "cancer" , "kidney" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
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
    """
    .

