sparql-examples

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

View the Project on GitHub ytirlet/sparql-examples

M20_module

rq turtle/ttl

protein and annotation and up to the source

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 ?object ?attribution ?source ?sourceType
WHERE {
        ?object rdf:object ?annotation.
        ?object up:attribution ?attribution.
        ?attribution up:source ?source.
        ?source rdf:type ?sourceType.
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?annotation"):::projected 
  v3("?attribution"):::projected 
  v1("?object"):::projected 
  v4("?source"):::projected 
  v5("?sourceType"):::projected 
  v1 --"rdf:object"-->  v2
  v1 --"up:attribution"-->  v3
  v3 --"up:source"-->  v4
  v4 --"a"-->  v5