sparql-examples

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

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

drosophila_enzymes_derived_from_at_least_two_mRNAs

Find Drosophila proteins, that depend on more than one transcript (requires cross-references to Ensembl family of resources).

Use at

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT
  ?protein
WHERE {
  ?protein up:organism taxon:7227 ;
    a up:Protein ;
    up:reviewed true ;
    rdfs:seeAlso ?transcript .
  ?transcript  a up:Transcript_Resource .
} GROUP BY ?protein HAVING(COUNT(?transcript) >= 2)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?_anon_524857e97b124dceaa8a4ecc8d1a18276648")
  v1("?protein"):::projected 
  v2("?transcript")
  a1((" "))
  c3(["taxon:7227"]):::iri 
  c9(["up:Transcript_Resource"]):::iri 
  c7(["true^^xsd:boolean"]):::literal 
  c5(["up:Protein"]):::iri 
  f0[[" >= '2^^xsd:integer'"]]
  f0 --> a1
  v1 --"up:organism"-->  c3
  v1 --"a"-->  c5
  v1 --"up:reviewed"-->  c7
  v1 --"rdfs:seeAlso"-->  v2
  v2 --"a"-->  c9
  bind2[/"count(?transcript)"/]
  v2 --o bind2
  bind2 --as--o v3