138_unique_taxons_having_an_experimental_chebi
- ChEBI
- catalytic
- cofactor
- enzyme
- ligand
Count distinct taxons linked to ChEBI in different ways via experimental annotations in UniProt
Use at
PREFIX ECO: <http://purl.obolibrary.org/obo/ECO_>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
(COUNT(DISTINCT ?taxon) AS ?taxonsLinkedToChebi)
(COUNT(DISTINCT ?ligandTaxon) AS ?taxonsLinkedToChebiViaLigand)
(COUNT(DISTINCT ?cofactorTaxon) AS ?taxonsLinkedToChebiViaCofactor)
(COUNT(DISTINCT ?catalyticTaxon) AS ?taxonsLinkedToChebiViaCatalytic)
WHERE {
{
GRAPH <http://sparql.uniprot.org/uniprot> {
?protein up:annotation ?ligandAnnotation .
?ligandAnnotation up:ligand/rdfs:subClassOf ?chebi .
?reif rdf:subject ?protein ;
rdf:object ?ligandAnnotation .
}
} UNION {
GRAPH <http://sparql.uniprot.org/uniprot> {
?protein up:annotation ?cofactorAnnotation .
?cofactorAnnotation up:cofactor ?chebi .
?reif rdf:subject ?cofactorAnnotation ;
rdf:object ?chebi .
}
} UNION {
GRAPH <http://sparql.uniprot.org/uniprot> {
?protein up:annotation ?catalyticActivityAnnotation .
?catalyticActivityAnnotation a up:Catalytic_Activity_Annotation ;
up:catalyticActivity ?catalyticActivity .
?catalyticActivity up:catalyzedReaction ?rhea .
?reif rdf:subject ?catalyticActivityAnnotation ;
rdf:object ?catalyticActivity .
}
GRAPH <https://sparql.rhea-db.org/rhea> {
?rhea rh:side/rh:contains/rh:compound ?compound .
?compound (rh:chebi|(rh:reactivePart/rh:chebi)|rh:underlyingChebi) ?chebi .
}
}
GRAPH <http://sparql.uniprot.org/uniprot> {
?reif up:attribution ?attr .
?attr up:evidence ECO:0000269 .
?protein up:organism ?taxon .
BIND(IF(BOUND(?ligandAnnotation),?taxon, ?_) AS ?ligandTaxon)
BIND(IF(BOUND(?cofactorAnnotation),?taxon, ?_) AS ?cofactorTaxon)
BIND(IF(BOUND(?catalyticActivityAnnotation),?taxon, ?_) AS ?catalyticTaxon)
}
GRAPH <http://sparql.uniprot.org/chebi> {
?chebi a owl:Class .
}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v10("?attr")
v7("?catalyticActivity")
v6("?catalyticActivityAnnotation")
v14("?catalyticTaxon"):::projected
v3("?chebi")
v5("?cofactorAnnotation")
v13("?cofactorTaxon"):::projected
v9("?compound")
v2("?ligandAnnotation")
v12("?ligandTaxon"):::projected
v1("?protein")
v4("?reif")
v8("?rhea")
v11("?taxon"):::projected
v15("?taxonsLinkedToChebi")
v18("?taxonsLinkedToChebiViaCatalytic")
v17("?taxonsLinkedToChebiViaCofactor")
v16("?taxonsLinkedToChebiViaLigand")
a2((" "))
a3((" "))
a1((" "))
a4((" "))
c23(["owl:Class"]):::iri
c21(["ECO:0000269"]):::iri
c9(["up:Catalytic_Activity_Annotation"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v1 --"up:annotation"--> v6
v6 --"a"--> c9
v6 --"up:catalyticActivity"--> v7
v7 --"up:catalyzedReaction"--> v8
v4 --"rdf:subject"--> v6
v4 --"rdf:object"--> v7
v8 --"rh:side"--> a2
a2 --"rh:contains"--> a3
a3 --"rh:compound"--> v9
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
v9 --"rh:underlyingChebi"--> v3
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v9 --"rh:reactivePart"--> a4
a4 --"rh:chebi"--> v3
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v9 --"rh:chebi"--> v3
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"up:annotation"--> v5
v5 --"up:cofactor"--> v3
v4 --"rdf:subject"--> v5
v4 --"rdf:object"--> v3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"up:annotation"--> v2
v2 --"up:ligand"--> a1
a1 --"rdfs:subClassOf"--> v3
v4 --"rdf:subject"--> v1
v4 --"rdf:object"--> v2
end
union0r <== or ==> union0l
end
v4 --"up:attribution"--> v10
v10 --"up:evidence"--> c21
v1 --"up:organism"--> v11
bind0[/"if(bound(?ligandAnnotation),?taxon,?_)"/]
v2 --o bind0
v11 --o bind0
null --o bind0
bind0 --as--o v12
bind1[/"if(bound(?cofactorAnnotation),?taxon,?_)"/]
v5 --o bind1
v11 --o bind1
null --o bind1
bind1 --as--o v13
bind2[/"if(bound(?catalyticActivityAnnotation),?taxon,?_)"/]
v6 --o bind2
v11 --o bind2
null --o bind2
bind2 --as--o v14
v3 --"a"--> c23
bind7[/"count(?taxon)"/]
v11 --o bind7
bind7 --as--o v15
bind8[/"count(?ligandTaxon)"/]
v12 --o bind8
bind8 --as--o v16
bind9[/"count(?cofactorTaxon)"/]
v13 --o bind9
bind9 --as--o v17
bind10[/"count(?catalyticTaxon)"/]
v14 --o bind10
bind10 --as--o v18