sparql-examples

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

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

neXtProt/NXQ_00290

Proteins that are enzymes requiring the cofactor Ca(2+) and with a calcium binding site

Use at

PREFIX : <http://nextprot.org/rdf/>
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?entry (str(?name) as ?prot_name) (str(?ec) as ?ecs) where

{ ?entry :recommendedName ?name_entity .
 ?name_entity a :ProteinName; rdfs:label ?name.
 ?entry :isoform ?iso.
 ?iso :enzymeClassification /rdfs:comment ?ec.
 ?iso :cofactor /:interactant /skos:exactMatch CHEBI:29108. # Ca(2+) cofactor
 ?iso :bindingSite /:interactant ?inter.
 ?inter :accession "CHEBI:29108"^^xsd:string # binding site interactant Ca(2+)
}
order by asc(?ec)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?ec"):::projected 
  v8("?ecs")
  v2("?entry"):::projected 
  v6("?inter")
  v5("?iso")
  v4("?name"):::projected 
  v3("?name_entity")
  v7("?prot_name")
  a1((" "))
  a2((" "))
  a3((" "))
  a4((" "))
  c14(["CHEBI:29108"]):::literal 
  c11(["CHEBI:29108"]):::iri 
  c3([":ProteinName"]):::iri 
  v2 --":recommendedName"-->  v3
  v3 --"a"-->  c3
  v3 --"rdfs:label"-->  v4
  v2 --":isoform"-->  v5
  v5 --":enzymeClassification"-->  a1
  a1 --"rdfs:comment"-->  v1
  v5 --":cofactor"-->  a2
  a2 --":interactant"-->  a3
  a3 --"skos:exactMatch"-->  c11
  v5 --":bindingSite"-->  a4
  a4 --":interactant"-->  v6
  v6 --":accession"-->  c14
  bind0[/"str(?name)"/]
  v4 --o bind0
  bind0 --as--o v7
  bind1[/"str(?ec)"/]
  v1 --o bind1
  bind1 --as--o v8