A set of SPARQL examples that are used in different SIB resources
Proteins with at least one variant of the types "A->R" or "R->A"
PREFIX : <http://nextprot.org/rdf/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?entry WHERE {
?entry :isoform/:variant ?statement.
{?statement :original "A"^^xsd:string;:variation "R"^^xsd:string}
UNION
{?statement :original "R"^^xsd:string;:variation "A"^^xsd:string}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?entry"):::projected
v2("?statement")
a1((" "))
c4(["A"]):::literal
c6(["R"]):::literal
v1 --":isoform"--> a1
a1 --":variant"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --":original"--> c6
v2 --":variation"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --":original"--> c4
v2 --":variation"--> c6
end
union0r <== or ==> union0l
end