sparql-examples

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

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

9

For a given list of LIPID MAPS identifiers return the list of corresponding SwissLipids identifiers. Output should include SwissLipids identifier and name plus the LIPID MAPS identifier. This query considers only the cross references in the SwissLipids entry – it does not attempt to query other levels to find links between parents or children. Recapitulates one ID mapping function on the website

Use at

PREFIX lipidmaps: <https://www.lipidmaps.org/rdf/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

# Example 9
SELECT ?lipidmaps ?slm ?slmName 
WHERE {
  VALUES ?lipidmaps {lipidmaps:LMSP01020001 lipidmaps:LMST01010069 lipidmaps:LMST04030222}
  ?slm rdfs:label ?slmName . 
  # Corresponding SwissLipds entries
  ?slm rdfs:seeAlso ?lipidmaps .
}
ORDER BY ?lipidmaps
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?lipidmaps"):::projected 
  v2("?slm"):::projected 
  v3("?slmName"):::projected 
  bind0[/VALUES ?lipidmaps/]
  bind0-->v2
  bind00(["lipidmaps:LMSP01020001"])
  bind00 --> bind0
  bind01(["lipidmaps:LMST01010069"])
  bind01 --> bind0
  bind02(["lipidmaps:LMST04030222"])
  bind02 --> bind0
  v2 --"rdfs:label"-->  v3
  v2 --"rdfs:seeAlso"-->  v2