A set of SPARQL examples that are used in different SIB resources
Select the preferred gene name and disease annotation of all human UniProtKB entries that are known to be involved in a disease
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT ?name ?text
WHERE
{
?protein a up:Protein .
?protein up:organism taxon:9606 .
?protein up:encodedBy ?gene .
?gene skos:prefLabel ?name .
?protein up:annotation ?annotation .
?annotation a up:Disease_Annotation .
?annotation rdfs:comment ?text
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?annotation")
v2("?gene")
v3("?name"):::projected
v1("?protein")
v5("?text"):::projected
c8(["up:Disease_Annotation"]):::iri
c2(["up:Protein"]):::iri
c4(["taxon:9606"]):::iri
v1 --"a"--> c2
v1 --"up:organism"--> c4
v1 --"up:encodedBy"--> v2
v2 --"skos:prefLabel"--> v3
v1 --"up:annotation"--> v4
v4 --"a"--> c8
v4 --"rdfs:comment"--> v5