sparql-examples

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

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

6

Retrieve all genes that are paralogous to HUMAN00529 OMA protein (identifier) and their cross-reference links to OMA and Uniprot.

Use at

PREFIX dc: <http://purl.org/dc/terms/>
PREFIX lscr: <http://purl.org/lscr#>
PREFIX orth: <http://purl.org/net/orth#>

SELECT ?protein2 ?Uniprot_link
WHERE {
    ?cluster a orth:ParalogsCluster ;
        orth:hasHomologousMember ?node1 ;
        orth:hasHomologousMember ?node2 .
    ?node2 orth:hasHomologousMember* ?protein2 .
    ?node1 orth:hasHomologousMember* ?protein1 .
    ?protein1 a orth:Protein ;
        dc:identifier 'HUMAN00529'.
    ?protein2 a orth:Protein ;
        lscr:xrefUniprot ?Uniprot_link .
    filter(?node1 != ?node2)
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v6("?Uniprot_link"):::projected 
  v3("?cluster")
  v1("?node1")
  v2("?node2")
  v5("?protein1")
  v4("?protein2"):::projected 
  c4(["orth:Protein"]):::iri 
  c2(["orth:ParalogsCluster"]):::iri 
  c6(["HUMAN00529"]):::literal 
  f0[["?node1 != ?node2"]]
  f0 --> v1
  f0 --> v2
  v3 --"a"-->  c2
  v3 --"orth:hasHomologousMember"-->  v1
  v3 --"orth:hasHomologousMember"-->  v2
  v2 --"orth:hasHomologousMember"-->  v4
  v1 --"orth:hasHomologousMember"-->  v5
  v5 --"a"-->  c4
  v5 --"dc:identifier"-->  c6
  v4 --"a"-->  c4
  v4 --"lscr:xrefUniprot"-->  v6