A set of SPARQL examples that are used in different SIB resources
Select all Rhea reactions used in UniProtKB/Swiss-Prot for a given organism (NCBI taxonomy ID).
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
# Query 13
# Select all Rhea reactions used to annotate Escherichia coli (taxid=83333) in UniProtKB/Swiss-Prot
# return the number of UniProtKB entries
#
# Federated query using a service to UniProt SPARQL endpoint
#
# This query cannot be performed using the Rhea search website
SELECT ?uniprot ?mnemo ?rhea ?accession ?equation
WHERE {
SERVICE <https://sparql.uniprot.org/sparql> {
BIND (taxon:83333 AS ?taxid)
GRAPH <http://sparql.uniprot.org/uniprot> {
?uniprot up:reviewed true .
?uniprot up:mnemonic ?mnemo .
?uniprot up:organism ?taxid .
?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea .
}
}
?rhea rh:accession ?accession .
?rhea rh:equation ?equation .
}