#
# example SPARQL query 146
#

@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_146 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Cell lines that are annotated as endothelial cells"""@en ; 
    schema:keywords "cell type" , "endothelial" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
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#>
# All cell line with a child of CL_0000115 A+ endothelial cell
select distinct ?cl ?cl_name ?xref_db ?xref_ac ?xref_label where {
  ?cl cello:derivedFromCellType ?celltype .
  ?cl cello:recommendedName ?cl_name .
  ?celltype  cello:isIdentifiedByXref ?xref .
  ?xref cello:more_specific_than* ?generic_concept .
  ?generic_concept skos:notation "CL_0000115" ; skos:inScheme db:CL . # endothelial cell
  ?xref cello:accession ?xref_ac ; cello:database ?xref_db; skos:prefLabel ?xref_label .
}
limit 1000
    """
    .

