sparql-examples

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

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

enzyme_with_threonine_as_active_site

Find enzymes with a Tyrosine (Y) as an active site

Use at

PREFIX faldo: <http://biohackathon.org/resource/faldo#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT
  ?protein
WHERE {
  ?protein up:annotation ?activeSiteAnnotation .
  ?activeSiteAnnotation a up:Active_Site_Annotation ;
    up:range ?range .
  ?range faldo:begin ?begin .
  ?begin faldo:position ?beginPosition ;
    faldo:reference ?sequence .
  ?sequence rdf:value ?sequenceVal .
  FILTER(SUBSTR(?sequenceVal, ?beginPosition, 1) = 'Y')
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v4("?activeSiteAnnotation")
  v6("?begin")
  v2("?beginPosition")
  v3("?protein"):::projected 
  v5("?range")
  v7("?sequence")
  v1("?sequenceVal")
  c5(["up:Active_Site_Annotation"]):::iri 
  f0[["substring(?sequenceVal,?beginPosition,'1^^xsd:integer') = 'Y'"]]
  f0 --> v1
  f0 --> v2
  v3 --"up:annotation"-->  v4
  v4 --"a"-->  c5
  v4 --"up:range"-->  v5
  v5 --"faldo:begin"-->  v6
  v6 --"faldo:position"-->  v2
  v6 --"faldo:reference"-->  v7
  v7 --"rdf:value"-->  v1