#
# example SPARQL query 111
#

@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_111 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """HLA typing of a chosen cell line"""@en ; 
    schema:keywords "HLA" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX cvcl: <https://purl.expasy.org/cellosaurus/rdf/cvcl/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select ?cl ?cl_name ?gene_name ?allele_id  where {
  	values ?cl { cvcl:CVCL_E549 }
        ?cl cello:hasHLAtyping ?hasHLAtyping .
  	?cl cello:recommendedName ?cl_name .
    ?hasHLAtyping cello:includesObservation ?obs .
        ?obs cello:hasTarget ?gene .
    ?gene rdfs:label ?gene_name .
    ?gene rdf:type ?gene_class .
    ?obs cello:detectedAllele ?allele .
    ?allele cello:alleleIdentifier ?allele_id .
}
order by ?gene_name
    """
    .

