A set of SPARQL examples that are used in different SIB resources
What are the genes expressed in the human brain?
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX genex: <http://purl.org/genex#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT DISTINCT ?gene ?geneName WHERE {
?gene a orth:Gene ;
genex:isExpressedIn ?anat ;
rdfs:label ?geneName ;
orth:organism ?organism .
?anat a genex:AnatomicalEntity ;
rdfs:label "brain" .
?organism obo:RO_0002162 ?species .
?species a up:Taxon ;
up:scientificName "Homo sapiens" .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?anat")
v1("?gene"):::projected
v3("?geneName"):::projected
v4("?organism")
v5("?species")
c6(["genex:AnatomicalEntity"]):::iri
c11(["Homo sapiens"]):::literal
c2(["orth:Gene"]):::iri
c7(["brain"]):::literal
c9(["up:Taxon"]):::iri
v1 --"a"--> c2
v1 --"genex:isExpressedIn"--> v2
v1 --"rdfs:label"--> v3
v1 --"orth:organism"--> v4
v2 --"a"--> c6
v2 --"rdfs:label"--> c7
v4 --"obo:RO_0002162"--> v5
v5 --"a"--> c9
v5 --"up:scientificName"--> c11