sparql-examples

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

View the Project on GitHub ytirlet/sparql-examples

M14_module

rq turtle/ttl

protein, annotation and type of annotation

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 ?protein ?annotation ?annType
WHERE {
        ?protein rdf:type up:Protein.
        ?protein up:annotation ?annotation.
        ?annotation rdf:type ?annType.
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?annType"):::projected 
  v2("?annotation"):::projected 
  v1("?protein"):::projected 
  c2(["up:Protein"]):::iri 
  v1 --"a"-->  c2
  v1 --"up:annotation"-->  v2
  v2 --"a"-->  v3