@prefix ex:<https://purl.expasy.org/sparql-examples/neXtProt/> .
@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:NXQ_00246 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Proteins which are enzymes catalyzing a reaction involving lipids"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://nextprot.org/rdf/>
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

SELECT DISTINCT ?entry WHERE {
#SELECT DISTINCT ?entry str(?xlab) WHERE {
 SERVICE <https://sparql.rhea-db.org/sparql> {
 SELECT distinct ?chebi WHERE {
 ?reaction rdfs:subClassOf rh:Reaction .
 ?reaction rh:status rh:Approved .
 ?reaction rh:side ?reactionSide .
 ?reactionSide rh:contains ?participant .
 ?participant rh:compound ?compound .
 ?compound rh:chebi ?chebi .
 ?chebi rdfs:subClassOf+ CHEBI:18059 .
 }
 }
 ?entry :isoform / :smallMoleculeInteraction / :interactant ?x .
 ?x rdfs:label ?xlab .
 ?x skos:exactMatch ?chebi .
} order by ?entry""" ;
    schema:keywords "enzyme",
        "federated query",
        "function",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> ;
    spex:federatesWith <https://sparql.rhea-db.org/sparql> .

