A set of SPARQL examples that are used in different SIB resources
Protein domains or regions that frequently occur in interaction mappings
PREFIX : <http://nextprot.org/rdf/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT (str(?rlab) as ?rlab1) (count(distinct ?itid) as ?itcnt) WHERE {
?entry :isoform ?iso; :gene / :name / rdfs:label ?gen .
?iso :swissprotDisplayed true; :interactionMapping ?itmap .
?itmap :entryAnnotationId ?itid; :start ?its; :end ?ite .
bind(?ite - ?its + 1 as ?itlen)
?iso :region ?reg .
?reg :start ?rs; :end ?re; :term ?rterm .
?rterm rdfs:label ?rlab .
bind(?re - ?rs + 1 as ?rlen)
filter (?rs >= ?its - 15 && ?re <= ?ite + 15)
filter(xsd:float(?itlen) / xsd:float(?rlen) < 2.0)
} group by ?rlab having(count(distinct ?itid) >= 10)
order by desc(?itcnt)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v16("?_anon_524857e97b124dceaa8a4ecc8d1a18274821")
v8("?entry")
v10("?gen")
v9("?iso")
v18("?itcnt")
v7("?ite")
v12("?itid"):::projected
v13("?itlen")
v11("?itmap")
v5("?its")
v6("?re")
v13("?reg")
v15("?rlab"):::projected
v17("?rlab1")
v16("?rlen")
v4("?rs")
v14("?rterm")
a2((" "))
a3((" "))
a1((" "))
c9(["true^^xsd:boolean"]):::literal
f0[[" >= '10^^xsd:integer'"]]
f0 --> a1
f1[["http://www.w3.org/2001/XMLSchema#float(?itlen) / http://www.w3.org/2001/XMLSchema#float(?rlen) < '2.0^^xsd:decimal'"]]
f1 --> v13
f1 --> v16
f2[["?rs >= ?its - '15^^xsd:integer'?re <= ?ite + '15^^xsd:integer'"]]
f2 --> v4
f2 --> v5
f2 --> v6
f2 --> v7
v8 --":isoform"--> v9
v8 --":gene"--> a2
a2 --":name"--> a3
a3 --"rdfs:label"--> v10
v9 --":swissprotDisplayed"--> c9
v9 --":interactionMapping"--> v11
v11 --":entryAnnotationId"--> v12
v11 --":start"--> v5
v11 --":end"--> v7
bind3[/"?ite - ?its + '1^^xsd:integer'"/]
v7 --o bind3
v5 --o bind3
bind3 --as--o v13
v9 --":region"--> v13
v13 --":start"--> v4
v13 --":end"--> v6
v13 --":term"--> v14
v14 --"rdfs:label"--> v15
bind4[/"?re - ?rs + '1^^xsd:integer'"/]
v6 --o bind4
v4 --o bind4
bind4 --as--o v16
bind7[/"count(?itid)"/]
v12 --o bind7
bind7 --as--o v16
bind8[/"str(?rlab)"/]
v15 --o bind8
bind8 --as--o v17
bind9[/"count(?itid)"/]
v12 --o bind9
bind9 --as--o v18