@prefix cito: <http://purl.org/spar/cito/> .
@prefix ex: <https://bigcat-um.github.io/sparql-examples/WikiPathways/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix spex: <https://purl.expasy.org/sparql-examples/ontology#> .

ex:066 a sh:SPARQLExecutable,
       sh:SPARQLSelectExecutable ;
    rdfs:label "Groups and Complexes with a Particular Gene"@en ;
    rdfs:comment "Lists all groups and complexes that contain a particular gene or protein (wp:GeneProduct), here gene products whose label contains \"CYP\"."@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>

SELECT DISTINCT ?pathway (str(?label) as ?geneProduct)
WHERE {
    ?gene a wp:GeneProduct .
    ?gene rdfs:label ?label .
    ?gene dcterms:isPartOf ?pathway .

    FILTER NOT EXISTS { ?pathway a wp:Interaction } .
    FILTER NOT EXISTS { ?pathway a wp:Pathway } .
    FILTER regex(str(?label), "CYP").
}""" ;
    schema:target <https://sparql.wikipathways.org/sparql> ;
    schema:keywords "gene", "group", "complex" ;
    cito:usesMethodIn <https://www.wikipathways.org/sparql.html> .
