sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

neXtProt/NXQ_00246

Proteins which are enzymes catalyzing a reaction involving lipids

Use at

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
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v6("?chebi")
  v5("?compound")
  v1("?entry"):::projected 
  v4("?participant")
  v2("?reaction")
  v3("?reactionSide")
  v7("?x")
  v8("?xlab")
  a1((" "))
  a2((" "))
  c5(["rh:Approved"]):::iri 
  c3(["rh:Reaction"]):::iri 
  c10(["CHEBI:18059"]):::iri 
  subgraph s1["https://sparql.rhea-db.org/sparql"]
    style s1 stroke-width:4px;
    v2 --"rdfs:subClassOf"-->  c3
    v2 --"rh:status"-->  c5
    v2 --"rh:side"-->  v3
    v3 --"rh:contains"-->  v4
    v4 --"rh:compound"-->  v5
    v5 --"rh:chebi"-->  v6
    v6 --"rdfs:subClassOf"-->  c10
  end
  v1 --":isoform"-->  a1
  a1 --":smallMoleculeInteraction"-->  a2
  a2 --":interactant"-->  v7
  v7 --"rdfs:label"-->  v8
  v7 --"skos:exactMatch"-->  v6