A set of SPARQL examples that are used in different SIB resources
Find human transporter proteins in reviewed UniProtKB/Swiss-Prot, that are expressed in the liver (Uses Bgee and UBERON).
PREFIX genex: <http://purl.org/genex#>
PREFIX lscr: <http://purl.org/lscr#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX uberon: <http://purl.obolibrary.org/obo/uo#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?rhea
?protein
?anat
WHERE
{
GRAPH <https://sparql.rhea-db.org/rhea> {
?rhea rh:isTransport true .
}
?protein up:annotation ?ann .
?protein up:organism taxon:9606 .
?ann up:catalyticActivity ?ca .
?ca up:catalyzedReaction ?rhea .
BIND(uberon:0002107 AS ?anat)
SERVICE <https://www.bgee.org/sparql> {
?seq genex:isExpressedIn ?anat .
?seq lscr:xrefUniprot ?protein .
?seq orth:organism ?organism .
?organism obo:RO_0002162 taxon:9606 .
}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?anat"):::projected
v3("?ann")
v4("?ca")
v7("?organism")
v2("?protein"):::projected
v1("?rhea"):::projected
v6("?seq")
c6(["taxon:9606"]):::iri
c2(["true^^xsd:boolean"]):::literal
v1 --"rh:isTransport"--> c2
v2 --"up:annotation"--> v3
v2 --"up:organism"--> c6
v3 --"up:catalyticActivity"--> v4
v4 --"up:catalyzedReaction"--> v1
bind0[/"'obo:uo#0002107'"/]
bind0 --as--o v5
subgraph s1["https://www.bgee.org/sparql"]
style s1 stroke-width:4px;
v6 --"genex:isExpressedIn"--> v5
v6 --"lscr:xrefUniprot"--> v2
v6 --"orth:organism"--> v7
v7 --"obo:RO_0002162"--> c6
end