A set of SPARQL examples for tutorials at SWAT4HCLS
Retrieve mapping between SwissLipids lipid identifiers and their corresponding ChEBI identifiers. Output should include SwissLipids identifier and name plus the ChEBI identifier.
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# Example 12
SELECT ?slm ?slmName ?chebi
WHERE {
?slm rdfs:label ?slmName .
# Corresponding ChEBI entries
?slm owl:equivalentClass ?chebi .
}
ORDER BY ?slm
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?chebi"):::projected
v1("?slm"):::projected
v2("?slmName"):::projected
v1 --"rdfs:label"--> v2
v1 --"owl:equivalentClass"--> v3