sparql-examples

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

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

35

Lipids by fatty acid component (hexadecanoate) at position sn1

Use at

PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT 
?swisslipid 
WHERE {
  VALUES (?chebi) {
    (CHEBI:7896) #hexadecanoate
  }
  ?swisslipidHexadeconate owl:equivalentClass ?chebi .
  ?swisslipid SWISSLIPID:hasPart [
    SWISSLIPID:derived_from ?swisslipidHexadecanoate ;
    SWISSLIPID:position SWISSLIPID:sn1 
  ]
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?chebi")
  v4("?swisslipid"):::projected 
  v3("?swisslipidHexadecanoate")
  v2("?swisslipidHexadeconate")
  a1((" "))
  c4(["SWISSLIPID:sn1"]):::iri 
  bind0[/VALUES ?chebi/]
  bind0-->v1
  bind00(["CHEBI:7896"])
  bind00 --> bind0
  v2 --"owl:equivalentClass"-->  v1
  a1 --"SWISSLIPID:derived_from"-->  v3
  a1 --"SWISSLIPID:position"-->  c4
  v4 --"SWISSLIPID:hasPart"-->  a1