sparql-examples

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

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

9

At the LCA level, find all human orthologs of mouse genes with name containing "MAPK", case-insensitive

Use at

PREFIX up: <http://purl.uniprot.org/core/>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX : <http://purl.orthodb.org/>

SELECT *
WHERE {
    ?og a :OrthoGroup.
    ?og :ogBuiltAt taxon:314146.
    ?gene_m a :Gene.
    ?gene_h a :Gene.
    ?gene_m up:organism/a taxon:10090.
    ?gene_h up:organism/a taxon:9606.
    ?gene_m :memberOf ?og.
    ?gene_h :memberOf ?og.
    ?gene_m :name ?gene_m_name.
    ?gene_h :name ?gene_h_name.
    FILTER(contains (UCASE(?gene_m_name), "MAPK" ))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v4("?gene_h"):::projected 
  v5("?gene_h_name"):::projected 
  v3("?gene_m"):::projected 
  v1("?gene_m_name"):::projected 
  v2("?og"):::projected 
  a1((" "))
  a2((" "))
  c8(["taxon:10090"]):::iri 
  c6([":Gene"]):::iri 
  c3([":OrthoGroup"]):::iri 
  c5(["taxon:314146"]):::iri 
  c9(["taxon:9606"]):::iri 
  f0[["contains(upper-case(?gene_m_name),'MAPK')"]]
  f0 --> v1
  v2 --"a"-->  c3
  v2 --":ogBuiltAt"-->  c5
  v3 --"a"-->  c6
  v4 --"a"-->  c6
  v3 --"up:organism"-->  a1
  a1 --"a"-->  c8
  v4 --"up:organism"-->  a2
  a2 --"a"-->  c9
  v3 --":memberOf"-->  v2
  v4 --":memberOf"-->  v2
  v3 --":name"-->  v1
  v4 --":name"-->  v5