A set of SPARQL examples that are used in different SIB resources
Proteins whose genes are on chromosome 13 and are associated with a disease
PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?entry WHERE {
?entry :gene / :chromosome "13"^^xsd:string.
?entry :isoform ?iso.
{
?iso :medical / rdf:type :Disease.
} union {
?iso :uniprotKeyword / :term ?kw .
?kw :termType "Disease"^^xsd:string
filter (?kw != nextprot_cv:KW-0656)
}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?entry"):::projected
v2("?iso")
v3("?kw")
a1((" "))
a2((" "))
a3((" "))
c3(["13"]):::literal
c12(["Disease"]):::literal
c7([":Disease"]):::iri
v1 --":gene"--> a1
a1 --":chromosome"--> c3
v1 --":isoform"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
f0[["?kw != ':terminology/KW-0656'"]]
f0 --> v3
v2 --":uniprotKeyword"--> a3
a3 --":term"--> v3
v3 --":termType"--> c12
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --":medical"--> a2
a2 --"a"--> c7
end
union0r <== or ==> union0l
end