#
# example SPARQL query 155
#

@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_155 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Cell lines with a EGFR mutation"""@en ; 
    schema:keywords "mutation" , "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 ?gene_ac ?gene_name  where {
  values (?seqvar_class ?gene_ac) { (cello:GeneMutation  "HGNC:3236") } # mutations (of) EGFR gene
  ?cl cello:recommendedName ?cl_name .
  ?cl cello:hasSequenceVariationInfo ?annot .
  ?annot cello:variationStatus ?status .
  ?annot cello:hasTarget ?seqvar .
  ?seqvar a ?seqvar_class .
  ?seqvar rdfs:label ?seqvar_label .
  ?seqvar cello:ofGene ?gene .
  ?gene cello:isIdentifiedByXref ?xref .
  ?xref cello:accession ?gene_ac .
  ?xref rdfs:label ?gene_name.
}
order by ?ac
limit 10000
    """
    .

