A set of SPARQL examples that are used in different SIB resources
Proteins with protein existence "At protein level" (PE=1) that have no function annotated, are highly expressed in brain and have homologs in Drosophila melanogaster according to OrthoDB
PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>
PREFIX orthodb: <http://purl.orthodb.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
select ?entry (str(?name) as ?human_name) (group_concat(distinct str(?fly_name); SEPARATOR = ",") as ?fly_names) where
{
?entry :isoform ?iso.
?entry :gene / :recommendedName / rdfs:label ?name.
?entry :existence :Evidence_at_protein_level .
filter not exists { ?iso :functionInfo ?_. }
filter not exists { ?iso :catalyticActivity ?_ .}
filter not exists { ?iso :transportActivity ?_ .}
filter not exists { ?iso :pathway ?_. }
filter not exists { ?iso :function / :term ?fterm . filter(?fterm != nextprot_cv:GO_0005524 && ?fterm != nextprot_cv:GO_0000287 && ?fterm != nextprot_cv:GO_0005515 && ?fterm != nextprot_cv:GO_0042802 && ?fterm != nextprot_cv:GO_0008270 && ?fterm != nextprot_cv:GO_0051260 && ?fterm != nextprot_cv:GO_0005509 && ?fterm != nextprot_cv:GO_0003676 && ?fterm != nextprot_cv:GO_0003824 && ?fterm != nextprot_cv:GO_0007165 && ?fterm != nextprot_cv:GO_0035556 && ?fterm != nextprot_cv:GO_0046914 && ?fterm != nextprot_cv:GO_0046872)}
?iso :expression ?e1.
?e1 :term/:childOf nextprot_cv:TS-0095;:evidence/:observedExpression :High.
{
SERVICE <https://sparql.orthodb.org/sparql>
{?gene rdfs:seeAlso ?entry; orthodb:memberOf ?og.
?og orthodb:ogBuiltAt [up:scientificName ?clade]
; orthodb:hasMember ?ortholog.
?ortholog orthodb:name ?fly_name; up:organism/a/up:scientificName 'Drosophila melanogaster'.
filter (?clade='Metazoa') }
}
} group by ?entry ?name
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?_")
v7("?clade")
v6("?e1")
v4("?entry"):::projected
v11("?fly_name"):::projected
v13("?fly_names")
v1("?fterm")
v8("?gene")
v12("?human_name")
v2("?iso")
v5("?name"):::projected
v9("?og")
v10("?ortholog")
a2((" "))
a3((" "))
a1((" "))
a4((" "))
a5((" "))
a6((" "))
a7((" "))
a8((" "))
c25([":Evidence_at_protein_level"]):::iri
c28([":terminology/TS-0095"]):::iri
c31([":High"]):::iri
c42(["Drosophila melanogaster"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?fterm != ':terminology/GO_0005524'?fterm != ':terminology/GO_0000287'?fterm != ':terminology/GO_0005515'?fterm != ':terminology/GO_0042802'?fterm != ':terminology/GO_0008270'?fterm != ':terminology/GO_0051260'?fterm != ':terminology/GO_0005509'?fterm != ':terminology/GO_0003676'?fterm != ':terminology/GO_0003824'?fterm != ':terminology/GO_0007165'?fterm != ':terminology/GO_0035556'?fterm != ':terminology/GO_0046914'?fterm != ':terminology/GO_0046872'"]]
e0f0 --> e0v1
e0v2 --":function"--> e0a1
e0a1 --":term"--> e0v1
e0v1("?fterm"):::projected
e0v2("?iso"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> v2
f0 --> c14
f0 --> a1
f0 --> c15
f1[["?fterm != ':terminology/GO_0005524'?fterm != ':terminology/GO_0000287'?fterm != ':terminology/GO_0005515'?fterm != ':terminology/GO_0042802'?fterm != ':terminology/GO_0008270'?fterm != ':terminology/GO_0051260'?fterm != ':terminology/GO_0005509'?fterm != ':terminology/GO_0003676'?fterm != ':terminology/GO_0003824'?fterm != ':terminology/GO_0007165'?fterm != ':terminology/GO_0035556'?fterm != ':terminology/GO_0046914'?fterm != ':terminology/GO_0046872'"]]
f1 --> v1
v2 --":function"--> a1
a1 --":term"--> v1
f2[["not "]]
subgraph f2e1["Exists Clause"]
e1v1 --":pathway"--> e1v2
e1v2("?_"):::projected
e1v1("?iso"):::projected
end
f2--EXISTS--> f2e1
f2 --> v2
f2 --> c16
f2 --> v3
v2 --":pathway"--> v3
f3[["not "]]
subgraph f3e2["Exists Clause"]
e2v1 --":transportActivity"--> e2v2
e2v2("?_"):::projected
e2v1("?iso"):::projected
end
f3--EXISTS--> f3e2
f3 --> v2
f3 --> c17
f3 --> v3
v2 --":transportActivity"--> v3
f4[["not "]]
subgraph f4e3["Exists Clause"]
e3v1 --":catalyticActivity"--> e3v2
e3v2("?_"):::projected
e3v1("?iso"):::projected
end
f4--EXISTS--> f4e3
f4 --> v2
f4 --> c18
f4 --> v3
v2 --":catalyticActivity"--> v3
f5[["not "]]
subgraph f5e4["Exists Clause"]
e4v1 --":functionInfo"--> e4v2
e4v2("?_"):::projected
e4v1("?iso"):::projected
end
f5--EXISTS--> f5e4
f5 --> v2
f5 --> c19
f5 --> v3
v2 --":functionInfo"--> v3
v4 --":isoform"--> v2
v4 --":gene"--> a2
a2 --":recommendedName"--> a3
a3 --"rdfs:label"--> v5
v4 --":existence"--> c25
v2 --":expression"--> v6
v6 --":term"--> a4
a4 --":childOf"--> c28
v6 --":evidence"--> a5
a5 --":observedExpression"--> c31
subgraph s1["https://sparql.orthodb.org/sparql"]
style s1 stroke-width:4px;
f6[["?clade = 'Metazoa'"]]
f6 --> v7
v8 --"rdfs:seeAlso"--> v4
v8 --"orthodb:memberOf"--> v9
a6 --"up:scientificName"--> v7
v9 --"orthodb:ogBuiltAt"--> a6
v9 --"orthodb:hasMember"--> v10
v10 --"orthodb:name"--> v11
v10 --"up:organism"--> a7
a7 --"a"--> a8
a8 --"up:scientificName"--> c42
end
bind8[/"str(?name)"/]
v5 --o bind8
bind8 --as--o v12
bind9[/"str(?fly_name)"/]
v11 --o bind9
bind9 --as--o v13