A set of SPARQL examples that are used in different SIB resources
Proteins with a mature chain of less than 1000 amino acids which are secreted and do not contain cysteines in the mature chain
PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>
SELECT DISTINCT ?entry WHERE {
values ?sloc {nextprot_cv:GO_0005576 nextprot_cv:SL-0243} # GO and SL values for secreted
?entry :isoform ?iso.
?iso :cellularComponent ?anno .
?anno :term /:childOf ?sloc .
filter not exists { ?anno :negativeEvidence ?_ }
#
# filter not exists {?iso :cellularComponent /:term nextprot_cv:GO_0070062 .
# filter not exists {?iso :cellularComponent /:term /:childOf nextprot_cv:SL-0243 .}
# }
# you can uncomment this to filters out extracellular exosome only location (2240 entries),
# most of them evidenced only by large-scale proteomic analysis
#
?iso :sequence / :chain ?seq.
?iso :matureProtein [ :start ?mstart ; :end ?mend]
filter ((?mend-?mstart > 0) && (?mend-?mstart < 1000))
bind (?mend - ?mstart + 1 as ?mlen)
bind (substr(?seq, ?mstart, ?mlen) as ?mseq)
filter (!regex (?mseq,'C'))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?_")
v4("?anno")
v7("?entry"):::projected
v8("?iso")
v2("?mend")
v10("?mlen")
v11("?mseq")
v3("?mstart")
v9("?seq")
v6("?sloc")
a1((" "))
a2((" "))
a3((" "))
f0[["not regex(?mseq,'C')"]]
f0 --> v11
f1[["?mend - ?mstart > '0^^xsd:integer'?mend - ?mstart < '1000^^xsd:integer'"]]
f1 --> v2
f1 --> v3
f2[["not "]]
subgraph f2e0["Exists Clause"]
e0v1 --":negativeEvidence"--> e0v2
e0v2("?_"):::projected
e0v1("?anno"):::projected
end
f2--EXISTS--> f2e0
f2 --> v4
f2 --> c4
f2 --> v5
v4 --":negativeEvidence"--> v5
bind3[/VALUES ?sloc/]
bind3-->v6
bind30([":terminology/GO_0005576"])
bind30 --> bind3
bind31([":terminology/SL-0243"])
bind31 --> bind3
v7 --":isoform"--> v8
v8 --":cellularComponent"--> v4
v4 --":term"--> a1
a1 --":childOf"--> v6
v8 --":sequence"--> a2
a2 --":chain"--> v9
a3 --":start"--> v3
a3 --":end"--> v2
v8 --":matureProtein"--> a3
bind4[/"?mend - ?mstart + '1^^xsd:integer'"/]
v2 --o bind4
v3 --o bind4
bind4 --as--o v10
bind5[/"substring(?seq,?mstart,?mlen)"/]
v9 --o bind5
v3 --o bind5
v10 --o bind5
bind5 --as--o v11