A set of SPARQL examples that are used in different SIB resources
Proteins for which different splice isoforms have a different subcellular location or function
PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#A0A1B0GVQ0,A0AVT1 ,A0PJK1...
SELECT DISTINCT ?entry WHERE {
?entry :isoform ?iso1, ?iso2.
?iso1 :swissprotDisplayed true .
?iso2 :swissprotDisplayed false .
{
?iso2 :function / :term ?functerm .
filter (?functerm != nextprot_cv:GO_0005515) #protein-binding
filter not exists {?iso1 :function / :term ?functerm .}
}
UNION
{
?iso2 :functionInfo / rdfs:comment ?functext .
filter not exists {?iso1 :functionInfo / rdfs:comment ?functext .}
}
UNION
{
?iso2 :cellularComponent / :term ?locterm .
filter not exists {?iso1 :cellularComponent / :term ?locterm}
}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?entry"):::projected
v4("?functerm")
v5("?functext")
v2("?iso1")
v3("?iso2")
v6("?locterm")
a2((" "))
a1((" "))
a4((" "))
a3((" "))
a6((" "))
a5((" "))
c3(["true^^xsd:boolean"]):::literal
c4(["false^^xsd:boolean"]):::literal
v1 --":isoform"--> v2
v1 --":isoform"--> v3
v2 --":swissprotDisplayed"--> c3
v3 --":swissprotDisplayed"--> c4
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --":cellularComponent"--> e0a1
e0a1 --":term"--> e0v2
e0v1("?iso1"):::projected
e0v2("?locterm"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c10
f0 --> a5
f0 --> c6
f0 --> v6
v2 --":cellularComponent"--> a5
a5 --":term"--> v6
v3 --":cellularComponent"--> a6
a6 --":term"--> v6
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --":functionInfo"--> e1a1
e1a1 --"rdfs:comment"--> e1v2
e1v2("?functext"):::projected
e1v1("?iso1"):::projected
e1a1((" ")):::projected
end
f1--EXISTS--> f1e1
f1 --> v2
f1 --> c8
f1 --> a3
f1 --> c9
f1 --> v5
v2 --":functionInfo"--> a3
a3 --"rdfs:comment"--> v5
v3 --":functionInfo"--> a4
a4 --"rdfs:comment"--> v5
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f2[["not "]]
subgraph f2e2["Exists Clause"]
e2v1 --":function"--> e2a1
e2a1 --":term"--> e2v2
e2v2("?functerm"):::projected
e2v1("?iso1"):::projected
e2a1((" ")):::projected
end
f2--EXISTS--> f2e2
f2 --> v2
f2 --> c5
f2 --> a1
f2 --> c6
f2 --> v4
v2 --":function"--> a1
a1 --":term"--> v4
f3[["?functerm != ':terminology/GO_0005515'"]]
f3 --> v4
v3 --":function"--> a2
a2 --":term"--> v4
end
union0r <== or ==> union0l
end