A set of SPARQL examples for tutorials at SWAT4HCLS
What are the anatomical entities where the APOC1 Homo sapiens gene is not expressed, that is where is APOC1 absent?
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 ?anat ?anatName WHERE {
?seq a orth:Gene ;
rdfs:label "APOC1" ;
genex:isAbsentIn ?anat ;
orth:organism ?organism .
?anat a genex:AnatomicalEntity ;
rdfs:label ?anatName .
?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"):::projected
v4("?anatName"):::projected
v3("?organism")
v1("?seq")
v5("?species")
c7(["genex:AnatomicalEntity"]):::iri
c4(["APOC1"]):::literal
c11(["Homo sapiens"]):::literal
c2(["orth:Gene"]):::iri
c9(["up:Taxon"]):::iri
v1 --"a"--> c2
v1 --"rdfs:label"--> c4
v1 --"genex:isAbsentIn"--> v2
v1 --"orth:organism"--> v3
v2 --"a"--> c7
v2 --"rdfs:label"--> v4
v3 --"obo:RO_0002162"--> v5
v5 --"a"--> c9
v5 --"up:scientificName"--> c11