sparql-examples

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

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

30

Find UniProtKB entries with merged loci in Bordetella avium

Use at

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

SELECT
  ?protein 
  (GROUP_CONCAT(?locusName; separator=',') AS ?locusNames)
WHERE 
{ 
  ?protein a up:Protein ;
    up:organism taxon:360910 ;
    up:encodedBy ?gene .
  ?gene up:locusName ?locusName .
} 
GROUP BY ?protein 
HAVING (COUNT(?locusName) > 1)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v4("?_anon_524857e97b124dceaa8a4ecc8d1a18276479")
  v2("?gene")
  v3("?locusName"):::projected 
  v5("?locusNames")
  v1("?protein"):::projected 
  a1((" "))
  c5(["taxon:360910"]):::iri 
  c3(["up:Protein"]):::iri 
  f0[[" > '1^^xsd:integer'"]]
  f0 --> a1
  v1 --"a"-->  c3
  v1 --"up:organism"-->  c5
  v1 --"up:encodedBy"-->  v2
  v2 --"up:locusName"-->  v3
  bind3[/"count(?locusName)"/]
  v3 --o bind3
  bind3 --as--o v4
  bind4[/"?locusName"/]
  v3 --o bind4
  bind4 --as--o v5