Examples
- Select the SwissLipids categories and their labels.PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> # Example 1 SELECT ?category ?label WHERE { ?category SWISSLIPID:rank SWISSLIPID:Category . ?category rdfs:label ?label . }
- For a given (list of) lipid Species identifier(s) (e.g. SWISSLIPID:000056420 (Phosphatidylcholine (20:2)) SWISSLIPID:000308470 (Triacylglycerol (64:6))), return a list of the corresponding Molecular subspecies (if any), Structural subspecies (if any), and Isomeric subspecies. The query should return the lipid recommended names as well as identifiers. The list should be sorted by level in the hierarchy (Isomeric subspecies last). Future versions of this query should be generic enough to work from any start point (Species, Molecular subspecies, Structural subspecies). Recapitulates the “browse lipid analytes” function of the website (in batch).PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> # Example 2 SELECT ?startId ?startName ?rank ?id ?name WHERE { # query: list of SwissLipids Species identifiers VALUES ?startId { SWISSLIPID:000056420 SWISSLIPID:000308470 } ?startId SWISSLIPID:rank SWISSLIPID:Species . # SwissLipids Species name ?startId rdfs:label ?startName . # Hierarchical search ?id rdfs:subClassOf+ ?startId . ?id SWISSLIPID:rank ?rank . VALUES ?rank { SWISSLIPID:Isomeric_Subspecies SWISSLIPID:Molecular_Subspecies SWISSLIPID:Structural_Subspecies} ?id rdfs:label ?name . } ORDER BY DESC(?rank) ?startId
- For a given (list of) lipid Species identifiers (e.g. SWISSLIPID:000056493, Phosphatidylcholine (32:0)), return a list of the corresponding Molecular subspecies (if any), Structural subspecies (if any), and Isomeric subspecies (if any) which are associated with at least one citation (PMID: PubMed id). The query should return the lipid identifiers (?id), recommended names (?name), and PMIDs (?citation). Future versions of this query should be generic enough to work from any start point (Species, Molecular subspecies, Structural subspecies). PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> # Example 3 SELECT ?startId ?startLabel ?rank ?id ?name ?citation WHERE { # Queried lipid species VALUES ?startId { SWISSLIPID:000056493 } ?startId rdfs:label ?startLabel . ?id rdfs:subClassOf+ ?startId . VALUES ?rank { SWISSLIPID:Isomeric_Subspecie SWISSLIPID:Molecular_Subspecies SWISSLIPID:Structural_Subspecies} ?id SWISSLIPID:rank ?rank ; rdfs:label ?name ; SWISSLIPID:citation ?citation . } ORDER BY ?startId ?id DESC(?rank)
- For a given (list of) lipid classes (e.g. SWISSLIPID:000399814 (Ceramide) SWISSLIPID:000000007 (Sphingomyelin (iso-d17:1(4E))), return a list of the corresponding Isomeric subspecies. The query should return the lipid recommended names (?name) as well as identifiers (?id). Recapitulates the “browse lipid classes” function of the website (in batch).PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> # Example 4 SELECT ?startId ?startName ?id ?name WHERE { VALUES ?startId { SWISSLIPID:000399814 SWISSLIPID:000000567} ?startId SWISSLIPID:rank SWISSLIPID:Class . ?startId rdfs:label ?startName . ?id rdfs:subClassOf+ ?startId . ?id SWISSLIPID:rank SWISSLIPID:Isomeric_Subspecies ; rdfs:label ?name . } ORDER BY ?startId
- For a given lipid (SWISSLIPID:000399814, Ceramide), return a list of all corresponding reactions (Rhea IDs and equation). This query does consider the hierarchy: it looks for reactions involving the specified lipid and/or its more specific forms.PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Example 5 SELECT ?startId ?startName ?id ?name ?chebi ?rhea ?rheaEquation WHERE { # SwissLipids query (list of) identifier(s) VALUES ?startId { SWISSLIPID:000399814 } # name ?startId rdfs:label ?startName . # Retrieve children lipids ?id rdfs:subClassOf* ?startId . ?id rdfs:label ?name . # ChEBI x-ref ?id owl:equivalentClass ?chebi . # federated query to Rhea SERVICE <https://sparql.rhea-db.org/sparql> { ?rhea rh:equation ?rheaEquation . ?rhea rh:side/rh:contains/rh:compound/rh:chebi ?chebi . } } ORDER BY ?startId ?id
- For a given lipid (SWISSLIPID:000399814, Ceramide), return a list of all corresponding reactions (Rhea IDs and equation), as well as their enzymes as annotated in UniProtKB/Swiss-Prot) enzymes themselves (ID and protein name). This query does not consider the hierarchy: it looks for reactions and enzymes only for the specified lipid.PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> PREFIX up: <http://purl.uniprot.org/core/> # Example 6 SELECT ?startId ?startName ?chebi ?rhea ?rheaEquation ?uniprot ?uniprotName WHERE { # SwissLipids query (list of) identifier(s) VALUES ?startId { SWISSLIPID:000399814 } # name ?startId rdfs:label ?startName . # ChEBI x-ref ?startId owl:equivalentClass ?chebi . # federated query to Rhea SERVICE <https://sparql.rhea-db.org/sparql> { ?rhea rh:equation ?rheaEquation . ?rhea rh:side/rh:contains/rh:compound/rh:chebi ?chebi . } # federated query to UniProt SERVICE <https://sparql.uniprot.org/sparql> { ?uniprot up:reviewed true . ?uniprot up:recommendedName/up:fullName ?uniprotName . ?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea . } } ORDER BY ?startId
- For a given list of lipid Species, return a list of the corresponding Isomeric subspecies for that particular lipid that are linked to an enzyme as annotated in UniProtKB (UniProt AC and recommended name). This question would allow a user with (a list of) very high level MS identifications to immediately narrow them to the most likely potential lipid structures and protein targets as in this example: SWISSLIPID:000056871 / PC(O-36:4) (target species of interest) -> SWISSLIPID:000028143 / PC(O-16:0/20:4(5Z,8Z,11Z,14Z)) -> LPCAT4, PLA2G4A, PLA2G4C, PLA2G4F (target proteins)PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> PREFIX up: <http://purl.uniprot.org/core/> # Example 7 SELECT ?startId ?startLabel ?id ?name WHERE { # Queried lipid species VALUES ?startId { SWISSLIPID:000056871 } ?startId rdfs:label ?startLabel . # Corresponding Isomeric subspecies ?id rdfs:subClassOf+ ?startId . ?id SWISSLIPID:rank SWISSLIPID:Isomeric_Subspecie ; rdfs:label ?name . # Mapped ChEBI ?id owl:equivalentClass ?chebi . # federated query to Rhea SERVICE <https://sparql.rhea-db.org/sparql> { ?rhea rh:equation ?rheaEquation . ?rhea rh:side/rh:contains/rh:compound/rh:chebi ?chebi . } # federated query to UniProt SERVICE <https://sparql.uniprot.org/sparql> { ?uniprot up:reviewed true . ?uniprot up:recommendedName/up:fullName ?uniprotName . ?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea . } }
- Retrieve mapping between SwissLipids lipid identifiers and their corresponding LIPID MAPS identifiers. Output should include SwissLipids identifier and name plus the LIPID MAPS identifier. PREFIX lipidmaps: <https://www.lipidmaps.org/rdf/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> # Example 8 SELECT ?slm ?slmName ?lipidmaps WHERE { ?slm rdfs:label ?slmName . # Corresponding LIPID MAPS ?slm rdfs:seeAlso ?lipidmaps . FILTER (strstarts(str(?lipidmaps), str(lipidmaps:))) . } ORDER BY ?slm
- 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 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
- Retrieve mapping between SwissLipids lipid identifiers and their corresponding HMDB identifiers. Output should include SwissLipids identifier and name plus the HMDB identifier. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> # Example 10 SELECT ?slm ?slmName ?hmdb WHERE { ?slm rdfs:label ?slmName . # Corresponding HMDB entries ?slm rdfs:seeAlso ?hmdb . FILTER regex(str(?hmdb), "hmdb") . } ORDER BY ?slm
- For a given list of HMDB identifiers return the list of corresponding SwissLipids identifiers. Output should include SwissLipids identifier and name plus the HMDB 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.PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> # Example 11 prefix HMDB:<http://identifiers.org/hmdb/> SELECT ?hmdb ?slm ?slmName WHERE { VALUES ?hmdb {HMDB:HMDB00269 HMDB:HMDB00032 HMDB:HMDB01383} ?slm rdfs:label ?slmName . # Corresponding SwissLipids entries ?slm rdfs:seeAlso ?hmdb . } ORDER BY ?hmdb
- 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
- For a given list of ChEBI identifiers return the list of corresponding SwissLipids identifiers. Output should include SwissLipids identifier and name plus the HMDB 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.PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> # Example 13 SELECT ?chebi ?slm ?slmName WHERE { VALUES ?chebi {CHEBI:70846 CHEBI:70771 CHEBI:70829} ?slm rdfs:label ?slmName . # Corresponding SwissLipids entries ?slm owl:equivalentClass ?chebi . } ORDER BY ?chebi
- For a given list of LIPID MAPS identifiers return the list of corresponding ChEBI IDs. Output should include LIPID MAPS ID, the corresponding SwissLipids ID and name, plus the ChEBI ID. This query first identifies SwissLipids identifiers for a given list of HMDB identifiers. It then retrieves all children and from them the required LIPID MAPS identifiers. extends ex:9PREFIX lipidmaps: <https://www.lipidmaps.org/rdf/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> # Example 14 SELECT ?lipidmaps ?slm ?slmName ?chebi WHERE { #VALUES ?lipidmaps {lipidmaps:LMSP01020001 lipidmaps:LMST01010069 lipidmaps:LMST04030222} ?slm rdfs:label ?slmName . # Corresponding SwissLipids entries ?slm rdfs:seeAlso ?lipidmaps . FILTER regex(str(?lipidmaps), "lipidmaps") . # Hierarchical search #?children rdfs:subClassOf* ?slm . #?children rdfs:label ?name . # Corresponding ChEBI entries ?slm owl:equivalentClass ?chebi . } ORDER BY ?lipidmaps ?slm ?chebi
- For a given list of LipidX lipid identifiers return the list of published Isomeric subspecies. Output should include the LipidX ID and the corresponding SwissLipids ID(s) and name(s) plus PubMed ID(s). This query first identifies SwissLipids identifiers for a given list of LipidX identifiers. It then retrieves the corresponding Isomeric subspecies that are linked to at least one publication, and the corresponding PMIDs. extends ex:15PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?swisslipid ?lipidx ?isomericsubSwisslipid ?pubmed WHERE { VALUES ?hmdb {'HMDB00269' 'MDB00032'} BIND (IRI(CONCAT('http://identifiers.org/lipidx/', ?lipidx)) AS ?lipidxIRI) ?swisslipid rdfs:seeAlso ?lipidxIRI . ?swisslipid rdfs:subClassOf ?isomericsubSwisslipid . ?isomericsubSwisslipid SWISSLIPID:rank SWISSLIPID:Isomeric_Subspecies . ?isomericsubSwisslipid SWISSLIPID:citation ?pubmed . }
- More examples
About
This SPARQL endpoint contains all SwissLipids data. It is free to access and supports the SPARQL 1.1 Standard.
There are 15,271,370 triples in this release (2024_10_04). The query timeout is 45 minutes. All triples are available in the default graph. There are 3 named graphs.