A set of SPARQL examples that are used in different SIB resources
What are the anatomical entities where the human gene APOC1 is expressed in the post-juvenile stage?
PREFIX efo: <http://www.ebi.ac.uk/efo/>
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 ?anatName ?anat ?stageName ?stage WHERE {
?seq a orth:Gene ;
rdfs:label "APOC1" ;
genex:isExpressedIn ?condition ;
orth:organism ?organism .
?condition a genex:ExpressionCondition ;
genex:hasAnatomicalEntity ?anat ;
genex:hasAnatomicalEntity obo:GO_0005575 ;
genex:hasDevelopmentalStage ?stage .
?anat a genex:AnatomicalEntity ;
rdfs:label ?anatName .
?stage a efo:EFO_0000399 ;
rdfs:label ?stageName .
?organism obo:RO_0002162 ?species .
?species a up:Taxon ;
up:commonName "human" .
FILTER (CONTAINS(LCASE(?stageName), 'post-juvenile' ))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?anat"):::projected
v7("?anatName"):::projected
v3("?condition")
v4("?organism")
v2("?seq")
v8("?species")
v6("?stage"):::projected
v1("?stageName"):::projected
c13(["efo:EFO_0000399"]):::iri
c8(["genex:ExpressionCondition"]):::iri
c10(["obo:GO_0005575"]):::iri
c3(["orth:Gene"]):::iri
c15(["up:Taxon"]):::iri
c12(["genex:AnatomicalEntity"]):::iri
c5(["APOC1"]):::literal
c17(["human"]):::literal
f0[["contains(lower-case(?stageName),'post-juvenile')"]]
f0 --> v1
v2 --"a"--> c3
v2 --"rdfs:label"--> c5
v2 --"genex:isExpressedIn"--> v3
v2 --"orth:organism"--> v4
v3 --"a"--> c8
v3 --"genex:hasAnatomicalEntity"--> v5
v3 --"genex:hasAnatomicalEntity"--> c10
v3 --"genex:hasDevelopmentalStage"--> v6
v5 --"a"--> c12
v5 --"rdfs:label"--> v7
v6 --"a"--> c13
v6 --"rdfs:label"--> v1
v4 --"obo:RO_0002162"--> v8
v8 --"a"--> c15
v8 --"up:commonName"--> c17