sparql-examples

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

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

18

Find zebrafish orthologs of disease-implicated (according to Nextprot SPARQL endpoint) human genes via Vertebrata-level orthogroup/s annotated with both IPR000719 (protein kinase domain) and GO:0048013 (ephrin receptor signaling pathway)

Use at

PREFIX up: <http://purl.uniprot.org/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX GO: <http://purl.obolibrary.org/obo/GO_>
PREFIX : <http://purl.orthodb.org/>
PREFIX np: <http://nextprot.org/rdf#>
PREFIX interpro: <http://www.ebi.ac.uk/interpro/entry/>

SELECT ?gene_zf ?gene_zf_name ?gene ?gene_name ?description ?go ?disease
WHERE {
	SERVICE <https://sparql.nextprot.org/> {
        select distinct ?entry ?disease WHERE {
            ?entry np:isoform / np:disease / rdfs:comment ?disease
        }
    }
    ?gene rdfs:seeAlso ?entry;
        :name ?gene_name ;
        :description ?description.
    ?gene :memberOf ?og .
    ?og :xref/:xrefResource interpro:IPR000719 , GO:0048013.
    ?og :ogBuiltAt/up:scientificName "Vertebrata";
        :hasMember ?gene_zf.
    ?gene_zf :name ?gene_zf_name;
        up:organism/a [up:scientificName "Danio rerio"].
} ORDER BY ?disease

graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v5("?description"):::projected 
  v1("?disease"):::projected 
  v2("?entry")
  v3("?gene"):::projected 
  v4("?gene_name"):::projected 
  v7("?gene_zf"):::projected 
  v8("?gene_zf_name"):::projected 
  v6("?og")
  a1((" "))
  a2((" "))
  a3((" "))
  a4((" "))
  a6((" "))
  a5((" "))
  c12(["GO:0048013"]):::iri 
  c17(["Danio rerio"]):::literal 
  c15(["Vertebrata"]):::literal 
  c11(["interpro:IPR000719"]):::iri 
  subgraph s1["https://sparql.nextprot.org/"]
    style s1 stroke-width:4px;
    v2 --"np:isoform"-->  a1
    a1 --"np:disease"-->  a2
    a2 --"rdfs:comment"-->  v1
  end
  v3 --"rdfs:seeAlso"-->  v2
  v3 --":name"-->  v4
  v3 --":description"-->  v5
  v3 --":memberOf"-->  v6
  v6 --":xref"-->  a3
  a3 --":xrefResource"-->  c11
  a3 --":xrefResource"-->  c12
  v6 --":ogBuiltAt"-->  a4
  a4 --"up:scientificName"-->  c15
  v6 --":hasMember"-->  v7
  v7 --":name"-->  v8
  a5 --"up:scientificName"-->  c17
  v7 --"up:organism"-->  a6
  a6 --"a"-->  a5