A set of SPARQL examples that are used in different SIB resources
Number of proteins with binding sites for metals or metal sulfur clusters (and experimental evidence for the binding)
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?ligand
?ligandName
(COUNT(DISTINCT ?protein) as ?entries)
WHERE {
?protein up:annotation ?annotation .
VALUES ?evs { obo:ECO_0000269 obo:ECO_0007744 } .
VALUES ?chebids { CHEBI:25213 CHEBI:25214 } .
?st rdf:subject ?protein ;
rdf:predicate up:annotation ;
rdf:object ?annotation ;
up:attribution/up:evidence ?evs .
?annotation up:ligand/rdfs:subClassOf ?ligand .
?ligand rdfs:subClassOf+ ?chebids ;
rdfs:label ?ligandName .
}
GROUP BY ?ligand ?ligandName
ORDER BY DESC(?entries)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?annotation")
v5("?chebids")
v9("?entries")
v4("?evs")
v7("?ligand"):::projected
v8("?ligandName"):::projected
v2("?protein"):::projected
v6("?st")
a1((" "))
a2((" "))
c1(["up:annotation"]):::iri
v2 -->c1--> v3
bind0[/VALUES ?evs/]
bind0-->v4
bind00(["obo:ECO_0000269"])
bind00 --> bind0
bind01(["obo:ECO_0007744"])
bind01 --> bind0
bind1[/VALUES ?chebids/]
bind1-->v5
bind10(["obo:CHEBI_25213"])
bind10 --> bind1
bind11(["obo:CHEBI_25214"])
bind11 --> bind1
v6 --"rdf:subject"--> v2
v6 --"rdf:predicate"--> c1
v6 --"rdf:object"--> v3
v6 --"up:attribution"--> a1
a1 --"up:evidence"--> v4
v3 --"up:ligand"--> a2
a2 --"rdfs:subClassOf"--> v7
v7 --"rdfs:subClassOf"--> v5
v7 --"rdfs:label"--> v8
bind3[/"count(?protein)"/]
v2 --o bind3
bind3 --as--o v9