sparql-examples

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

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

54

Proteins with binding sites for ligands similar to heme

Use at

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sachem: <http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#>
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT 
  ?protein
  ?mnemonic
  ?proteinName
  ?ligandSimilarityScore
  ?ligand
WHERE {
  SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/chebi> {
    ?ssc sachem:compound ?ligand; 
      sachem:score ?ligandSimilarityScore ;
      sachem:similaritySearch ?sss .
        # Smiles of Heme
    ?sss    sachem:query "CC1=C(CCC([O-])=O)C2=[N+]3C1=Cc1c(C)c(C=C)c4C=C5C(C)=C(C=C)C6=[N+]5[Fe-]3(n14)n1c(=C6)c(C)c(CCC([O-])=O)c1=C2";
      sachem:cutoff "8e-1"^^xsd:double ;
      sachem:aromaticityMode sachem:aromaticityDetect ;
      sachem:similarityRadius 1 ;
      sachem:tautomerMode sachem:ignoreTautomers .
  }
  ?protein up:mnemonic ?mnemonic ;
    up:recommendedName/up:fullName ?proteinName ;
    up:annotation ?annotation .
  ?annotation a up:Binding_Site_Annotation ;
      up:ligand/rdfs:subClassOf ?ligand .
}
ORDER BY DESC(?ligandSimilarityScore)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v8("?annotation")
  v3("?ligand"):::projected 
  v1("?ligandSimilarityScore"):::projected 
  v6("?mnemonic"):::projected 
  v5("?protein"):::projected 
  v7("?proteinName"):::projected 
  v2("?ssc")
  v4("?sss")
  a1((" "))
  a2((" "))
  c20(["up:Binding_Site_Annotation"]):::iri 
  c8(["8e-1^^xsd:double"]):::literal 
  c12(["1^^xsd:integer"]):::literal 
  c14(["sachem:ignoreTautomers"]):::iri 
  c10(["sachem:aromaticityDetect"]):::iri 
  c6(["CC1=C(CCC(#91;O-#93;)=O)C2=#91;N+#93;3C1=Cc1c(C)c(C=C)c4C=C5C(C)=C(C=C)C6=#91;N+#93;5#91;Fe-#93;3(n14)n1c(=C6)c(C)c(CCC(#91;O-#93;)=O)c1=C2"]):::literal 
  subgraph s1["https://idsm.elixir-czech.cz/sparql/endpoint/chebi"]
    style s1 stroke-width:4px;
    v2 --"sachem:compound"-->  v3
    v2 --"sachem:score"-->  v1
    v2 --"sachem:similaritySearch"-->  v4
    v4 --"sachem:query"-->  c6
    v4 --"sachem:cutoff"-->  c8
    v4 --"sachem:aromaticityMode"-->  c10
    v4 --"sachem:similarityRadius"-->  c12
    v4 --"sachem:tautomerMode"-->  c14
  end
  v5 --"up:mnemonic"-->  v6
  v5 --"up:recommendedName"-->  a1
  a1 --"up:fullName"-->  v7
  v5 --"up:annotation"-->  v8
  v8 --"a"-->  c20
  v8 --"up:ligand"-->  a2
  a2 --"rdfs:subClassOf"-->  v3