A set of SPARQL examples that are used in different SIB resources
Frequent variants at a PTM site
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(?ptmlab) as ?ptmlabSTR) ?varpos (str(?varAA) as ?varAASTR) ?freq where {
?entry :isoform ?iso .
?iso :swissprotDisplayed true .
?iso :variant ?var .
?var :start ?varpos .
?var :variation ?varAA .
?iso :ptm ?ptm .
?ptm :term / rdfs:label ?ptmlab.
?ptm :start ?varpos .
?var :evidence ?ev .
?ev :allele-frequency ?freq .
filter (?freq > 0.5 )
}
order by desc(?freq)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?entry"):::projected
v9("?ev")
v1("?freq"):::projected
v3("?iso")
v7("?ptm")
v8("?ptmlab"):::projected
v10("?ptmlabSTR")
v4("?var")
v6("?varAA"):::projected
v11("?varAASTR")
v5("?varpos"):::projected
a1((" "))
c4(["true^^xsd:boolean"]):::literal
f0[["?freq > '0.5^^xsd:decimal'"]]
f0 --> v1
v2 --":isoform"--> v3
v3 --":swissprotDisplayed"--> c4
v3 --":variant"--> v4
v4 --":start"--> v5
v4 --":variation"--> v6
v3 --":ptm"--> v7
v7 --":term"--> a1
a1 --"rdfs:label"--> v8
v7 --":start"--> v5
v4 --":evidence"--> v9
v9 --":allele-frequency"--> v1
bind1[/"str(?ptmlab)"/]
v8 --o bind1
bind1 --as--o v10
bind2[/"str(?varAA)"/]
v6 --o bind2
bind2 --as--o v11