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