sparql-examples

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

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

15

Find orthologous group/s at any level containing protein with Uniprot id P12345

Use at

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

SELECT *
WHERE {
    ?og a :OrthoGroup ;
        :ogBuiltAt ?level;
        :hasMember/rdfs:seeAlso uniprotkb:P12345 .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?level"):::projected 
  v1("?og"):::projected 
  a1((" "))
  c2([":OrthoGroup"]):::iri 
  c6(["uniprotkb:P12345"]):::iri 
  v1 --"a"-->  c2
  v1 --":ogBuiltAt"-->  v2
  v1 --":hasMember"-->  a1
  a1 --"rdfs:seeAlso"-->  c6