A set of SPARQL examples that are used in different SIB resources
Proteins whose genes are on chromosome 18 and that are experimentally (cv:ECO_0000269) known to be glycosylated or phosphorylated or acetylated
PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?entry {
?entry :gene / :chromosome "18"^^xsd:string.
?entry :isoform ?iso.
{
?iso :glycosylationSite ?ptm1.
?ptm1 :evidence /:evidenceCode / :childOf nextprot_cv:ECO_0000269
}
union {
?iso :modifiedResidue ?ptm2.
?ptm2 rdfs:comment ?com.
?ptm2 :evidence / :evidenceCode / :childOf nextprot_cv:ECO_0000269
filter (regex(?com, '^phospho|acetyl','i'))
}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?com")
v1("?entry"):::projected
v2("?iso")
v3("?ptm1")
v5("?ptm2")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
c3(["18"]):::literal
c9([":terminology/ECO_0000269"]):::iri
v1 --":gene"--> a1
a1 --":chromosome"--> c3
v1 --":isoform"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
f0[["regex(?com,'^phospho|acetyl','i')"]]
f0 --> v4
v2 --":modifiedResidue"--> v5
v5 --"rdfs:comment"--> v4
v5 --":evidence"--> a4
a4 --":evidenceCode"--> a5
a5 --":childOf"--> c9
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --":glycosylationSite"--> v3
v3 --":evidence"--> a2
a2 --":evidenceCode"--> a3
a3 --":childOf"--> c9
end
union0r <== or ==> union0l
end