sparql-examples

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

View the Project on GitHub ytirlet/sparql-examples

M50_module

rq turtle/ttl

protein, annotation, ligand and ?chebi

Use at

PREFIX up: <http://purl.uniprot.org/core/>
  PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?annotation ?ligand ?chebi
WHERE {
        ?annotation up:ligand ?ligand.
        ?ligand rdfs:subClassOf ?chebi.
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?annotation"):::projected 
  v3("?chebi"):::projected 
  v2("?ligand"):::projected 
  v1 --"up:ligand"-->  v2
  v2 --"rdfs:subClassOf"-->  v3