#
# example SPARQL query 156
#

@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_156 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Some cell lines with an hemizygous mutation"""@en ; 
    schema:keywords "mutation" , "sequence variation" , "zygozity" ; 
    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#>
select ?cl ?cl_name ?status ?seqvar_class ?seqvar_label ?zygozity ?gene_ac ?gene_name  where {
  # possible values for zygozity are Hemizygous Hemizygous or homozygous Heteroplasmic
  # Heterozygous Heterozygous or homozygous Homoplasmic Homozygous Mosaic Unspecified
  values ( ?zygozity ) { ( "Hemizygous") }
  ?cl cello:recommendedName ?cl_name_xsd .
  ?cl cello:hasSequenceVariationInfo ?annot .
  ?annot cello:variationStatus ?status_xsd .
  ?annot cello:hasTarget ?seqvar .
  ?seqvar cello:zygosity ?zygozity .
  ?seqvar a ?seqvar_class .
  ?seqvar rdfs:label ?seqvar_label_xsd .
  ?seqvar cello:ofGene ?gene .
  ?gene cello:isIdentifiedByXref ?xref .
  ?xref cello:accession ?gene_ac_xsd .
  ?xref rdfs:label ?gene_name_xsd .
  bind(str(?cl_name_xsd) as ?cl_name)
  bind(str(?status_xsd) as ?status)
  bind(str(?seqvar_label_xsd) as ?seqvar_label)
  bind(str(?gene_ac_xsd) as ?gene_ac)
  bind(str(?gene_name_xsd) as ?gene_name)
}
order by ?cl_name
limit 1000
    """
    .

