#
# example SPARQL query 157
#

@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_157 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Some cell lines with a BCR ABL1 fusion"""@en ; 
    schema:keywords "gene" , "fusion" , "sequence variation" ; 
    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_ac1 ?gene_name1 ?gene_ac2 ?gene_name2  where {
  values ( ?gene_ac_xsd1 ?gene_ac_xsd2 ) { ( "HGNC:76" "HGNC:1014" ) } # accession of gene ABL1 and BCR
  ?cl cello:recommendedName ?cl_name .
  ?cl cello:hasSequenceVariationInfo ?annot .
  ?annot cello:variationStatus ?status .
  ?annot cello:hasTarget ?seqvar .
  ?seqvar a ?seqvar_class .
  optional { ?seqvar cello:zygosity ?zygozity . }
  ?seqvar rdfs:label ?seqvar_label .
  ?seqvar cello:ofGene ?gene1 .
  ?seqvar cello:ofGene ?gene2 .
  ?gene1 cello:isIdentifiedByXref ?xref1 .
  ?xref1 cello:accession ?gene_ac1 .
  ?xref1 rdfs:label ?gene_name1 .
  ?gene2 cello:isIdentifiedByXref ?xref2 .
  ?xref2 cello:accession ?gene_ac2 .
  ?xref2 rdfs:label ?gene_name2 .
}
order by ?cl_name
limit 1000
    """
    .

