A set of SPARQL examples that are used in different SIB resources
Proteins phosphorylated and located in the cytoplasm
PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>
SELECT DISTINCT ?entry WHERE {
values ?cytoloc {nextprot_cv:SL-0086 nextprot_cv:GO_0005737} # SL and GO values for cytoplasm
?entry :isoform ?iso.
?iso :uniprotKeyword / :term nextprot_cv:KW-0597. # Phosphorylated
?iso :cellularComponent ?loc .
?loc :term /:childOf ?cytoloc.
filter not exists {?loc :negativeEvidence ?negev} # No negative localization evidence
}
# Assign values to the variable ?cytoloc
# The values correspond to the two controlled vocabulary (cv) terms for cytoplam:
# SL-0086 is the UniProt subcellular location term
# GO_0005737 is the Gene Ontology cellular component term
#
# Use the same name of the variable (?iso and ?loc) in several statements.
# It is the name of the variable that enforces the constraints.
#
# Phosphorylated proteins are retrieved using a keyword:
# KW-0597 is the UniProt keyword for phosphorylated
#
# Use :childOf to include children of a term.
# Cytosol (SL-0091), the child term of cytoplasm, will thus be included.
#
# Exclude negative locatization evidences.
# This enforces that the protein is located in the cytoplasm.
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?cytoloc")
v4("?entry"):::projected
v5("?iso")
v1("?loc")
v2("?negev")
a1((" "))
a2((" "))
c5([":terminology/KW-0597"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --":negativeEvidence"--> e0v2
e0v1("?loc"):::projected
e0v2("?negev"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --":negativeEvidence"--> v2
bind1[/VALUES ?cytoloc/]
bind1-->v3
bind10([":terminology/SL-0086"])
bind10 --> bind1
bind11([":terminology/GO_0005737"])
bind11 --> bind1
v4 --":isoform"--> v5
v5 --":uniprotKeyword"--> a1
a1 --":term"--> c5
v5 --":cellularComponent"--> v1
v1 --":term"--> a2
a2 --":childOf"--> v3