A set of SPARQL examples that are used in different SIB resources
What are the anatomical entities where the eel gene apoc1 is expressed along with its expression score independently of the strain, sex, and cell type?
PREFIX efo: <http://www.ebi.ac.uk/efo/>
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?anat ?anatName ?stageIRI ?score WHERE {
?seq a orth:Gene ;
lscr:xrefNCBIGene <https://www.ncbi.nlm.nih.gov/gene/118230125> .
# Or dcterms:identifier "118230125" .
?expression a genex:Expression ;
genex:hasExpressionCondition ?condition ;
genex:hasExpressionLevel ?score ;
genex:hasSequenceUnit ?seq .
?anat a genex:AnatomicalEntity ;
rdfs:label ?anatName .
?condition a genex:ExpressionCondition ;
genex:hasAnatomicalEntity ?anat ;
genex:hasDevelopmentalStage ?stageIRI ;
genex:hasSex "any" ;
genex:hasStrain ?strain .
?stageIRI a efo:EFO_0000399 .
?strain a efo:EFO_0005135 ;
rdfs:label "wild-type" .
FILTER (?anat != obo:GO_0005575)
} ORDER BY DESC(?score)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?anat"):::projected
v6("?anatName"):::projected
v5("?condition")
v4("?expression")
v1("?score"):::projected
v3("?seq")
v7("?stageIRI"):::projected
v8("?strain")
c6(["genex:Expression"]):::iri
c18(["efo:EFO_0000399"]):::iri
c12(["genex:ExpressionCondition"]):::iri
c19(["efo:EFO_0005135"]):::iri
c3(["orth:Gene"]):::iri
c5([https://www.ncbi.nlm.nih.gov/gene/118230125]):::iri
c16(["any"]):::literal
c10(["genex:AnatomicalEntity"]):::iri
c20(["wild-type"]):::literal
f0[["?anat != 'obo:GO_0005575'"]]
f0 --> v2
v3 --"a"--> c3
v3 --"lscr:xrefNCBIGene"--> c5
v4 --"a"--> c6
v4 --"genex:hasExpressionCondition"--> v5
v4 --"genex:hasExpressionLevel"--> v1
v4 --"genex:hasSequenceUnit"--> v3
v2 --"a"--> c10
v2 --"rdfs:label"--> v6
v5 --"a"--> c12
v5 --"genex:hasAnatomicalEntity"--> v2
v5 --"genex:hasDevelopmentalStage"--> v7
v5 --"genex:hasSex"--> c16
v5 --"genex:hasStrain"--> v8
v7 --"a"--> c18
v8 --"a"--> c19
v8 --"rdfs:label"--> c20