#
# example SPARQL query 103
#

@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_103 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Cell lines derived from an individual with a diabetes mellitus or more specific disease"""@en ; 
    schema:keywords "di" , "disease" , "individual" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select distinct ?cl ?cl_name ?disease_name ?disease_concept_scheme ?disease_concept_notation  where {
  values ?generic_concept_notation { "C2985" } # notation of Diabetes mellitus in NCIt
  ?cl cello:derivedFromIndividualWithDisease ?disease .
  ?cl cello:recommendedName ?cl_name .
  ?disease cello:name ?disease_name .
  ?disease cello:isIdentifiedByXref ?xref .
  ?xref skos:notation ?disease_concept_notation .
  ?xref skos:inScheme ?disease_concept_scheme .
  ?xref cello:more_specific_than* ?generic_concept .
  ?generic_concept skos:notation ?generic_concept_notation .
  ?generic_concept skos:inScheme ?concept_scheme .
}
order by ?cl
limit 2000
    """
    .

