sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

013

What are the anatomical entities where the P02654 gene is expressed? Note that P02654 is a UniProtKB identifier of the APOC1 human gene.

Use at

PREFIX genex: <http://purl.org/genex#>
PREFIX lscr: <http://purl.org/lscr#>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/>

SELECT DISTINCT ?anat ?anatName WHERE {
    ?seq a orth:Gene ;
        genex:isExpressedIn ?anat ;
        lscr:xrefUniprot uniprotkb:P02654 .
    ?anat a genex:AnatomicalEntity ;
        rdfs:label ?anatName .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?anat"):::projected 
  v3("?anatName"):::projected 
  v1("?seq")
  c6(["genex:AnatomicalEntity"]):::iri 
  c5(["uniprotkb:P02654"]):::iri 
  c2(["orth:Gene"]):::iri 
  v1 --"a"-->  c2
  v1 --"genex:isExpressedIn"-->  v2
  v1 --"lscr:xrefUniprot"-->  c5
  v2 --"a"-->  c6
  v2 --"rdfs:label"-->  v3