A set of SPARQL examples that are used in different SIB resources
Select all human UniProtKB entries with a sequence variant that leads to a 'loss of function'
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT ?protein ?text
WHERE
{
?protein a up:Protein .
?protein up:organism taxon:9606 .
?protein up:annotation ?annotation .
?annotation a up:Natural_Variant_Annotation .
?annotation rdfs:comment ?text .
FILTER (CONTAINS(?text, 'loss of function'))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?annotation")
v2("?protein"):::projected
v1("?text"):::projected
c7(["up:Natural_Variant_Annotation"]):::iri
c3(["up:Protein"]):::iri
c5(["taxon:9606"]):::iri
f0[["contains(?text,'loss of function')"]]
f0 --> v1
v2 --"a"--> c3
v2 --"up:organism"--> c5
v2 --"up:annotation"--> v3
v3 --"a"--> c7
v3 --"rdfs:comment"--> v1