sparql-examples

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

View the Project on GitHub sib-swiss/sparql-examples

6

Select all cross-references to external databases of the category '3D structure databases' of UniProtKB entries that are classified with the keyword 'Acetoin biosynthesis (KW-0005)'

Use at

PREFIX keywords: <http://purl.uniprot.org/keywords/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT DISTINCT ?link
WHERE
{
    ?protein a up:Protein .
    ?protein up:classifiedWith keywords:5 .
    ?protein rdfs:seeAlso ?link .
    ?link up:database ?db .
    ?db up:category '3D structure databases'
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?db")
  v2("?link"):::projected 
  v1("?protein")
  c8(["3D structure databases"]):::literal 
  c4(["keywords:5"]):::iri 
  c2(["up:Protein"]):::iri 
  v1 --"a"-->  c2
  v1 --"up:classifiedWith"-->  c4
  v1 --"rdfs:seeAlso"-->  v2
  v2 --"up:database"-->  v3
  v3 --"up:category"-->  c8