A set of SPARQL examples that are used in different SIB resources
Proteins that have an interaction mapping region that contains the sequence 'ERLI'
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select distinct ?entry (str(?gen) as ?gene) where {
?entry :isoform ?iso; :gene / :name / rdfs:label ?gen .
?iso :swissprotDisplayed true; :interactionMapping ?itm .
?itm :start ?its; :end ?ite .
?iso :sequence / :chain ?seq.
bind (substr(?seq, ?its, ?ite-?its+1) as ?itseq)
filter (contains(?itseq,"ERLI"))
} order by ?entry
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?entry"):::projected
v4("?gen"):::projected
v9("?gene")
v3("?iso")
v7("?ite")
v5("?itm")
v6("?its")
v9("?itseq")
v8("?seq")
a1((" "))
a2((" "))
a3((" "))
c7(["true^^xsd:boolean"]):::literal
f0[["contains(?itseq,'ERLI')"]]
f0 --> v9
v1 --":isoform"--> v3
v1 --":gene"--> a1
a1 --":name"--> a2
a2 --"rdfs:label"--> v4
v3 --":swissprotDisplayed"--> c7
v3 --":interactionMapping"--> v5
v5 --":start"--> v6
v5 --":end"--> v7
v3 --":sequence"--> a3
a3 --":chain"--> v8
bind1[/"substring(?seq,?its,?ite - ?its + '+1^^xsd:integer')"/]
v8 --o bind1
v6 --o bind1
v7 --o bind1
bind1 --as--o v9
bind2[/"str(?gen)"/]
v4 --o bind2
bind2 --as--o v9