A set of SPARQL examples that are used in different SIB resources
Proteins located in mitochondrion and that lack a transit peptide
PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>
SELECT DISTINCT ?entry WHERE {
values ?mitoloc {nextprot_cv:SL-0173 nextprot_cv:GO_0005739 } # SL and GO values for mitochondrion
?entry :isoform ?iso.
filter not exists { ?iso :uniprotKeyword /:term nextprot_cv:KW-0809 } # Transit peptide
?iso :cellularComponent ?loc .
?loc :term /:childOf ?mitoloc.
filter not exists {?loc :negativeEvidence ?negev} # No negative localization evidence
}
# Variables start with ? and can be given any name.
# Variables such as ?entry and ?mitoloc (location in the mitochondrion) are easily understood by humans.
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?entry"):::projected
v3("?iso")
v1("?loc")
v4("?mitoloc")
v2("?negev")
a1((" "))
a2((" "))
c4([":terminology/KW-0809"]):::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
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --":uniprotKeyword"--> e1a1
e1a1 --":term"--> e1c3
e1v1("?iso"):::projected
e1a1((" ")):::projected
e1c3([":terminology/KW-0809"]):::iri
end
f1--EXISTS--> f1e1
f1 --> v3
f1 --> c2
f1 --> a1
f1 --> c3
f1 --> c4
v3 --":uniprotKeyword"--> a1
a1 --":term"--> c4
bind2[/VALUES ?mitoloc/]
bind2-->v4
bind20([":terminology/SL-0173"])
bind20 --> bind2
bind21([":terminology/GO_0005739"])
bind21 --> bind2
v5 --":isoform"--> v3
v3 --":cellularComponent"--> v1
v1 --":term"--> a2
a2 --":childOf"--> v4