A set of SPARQL examples that are used in different SIB resources
Proteins binding estradiol and/or similar molecules (similarity search with SMILES), and their associated GO_MF terms
PREFIX : <http://nextprot.org/rdf/>
PREFIX cco: <http://rdf.ebi.ac.uk/terms/chembl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sachem: <http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT distinct ?entry (group_concat(distinct str(?gomflab); SEPARATOR = ",") as ?gomfx) WHERE {
SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/idsm> {
SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/cco> {
?compound sachem:similarCompoundSearch [ sachem:query "CC12CCC3C(C1CCC2O)CCC4=C3C=CC(=C4)O" ] . # smiles chain for estradiol
}
?ACTIVITY rdf:type cco:Activity;
cco:hasMolecule ?compound;
cco:hasAssay ?ASSAY.
?ASSAY cco:hasTarget ?TARGET.
?TARGET cco:taxonomy <http://identifiers.org/taxonomy/9606> . # human protein target
?TARGET cco:hasTargetComponent ?COMPONENT.
?COMPONENT cco:targetCmptXref ?UNIPROT.
filter(contains(str(?UNIPROT),"uniprot"))
}
?entry skos:exactMatch ?UNIPROT.
?entry :isoform ?iso.
?iso :goMolecularFunction / :term ?gomf .
?gomf rdfs:label ?gomflab .
}
group by ?entry
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?ACTIVITY")
v4("?ASSAY")
v6("?COMPONENT")
v5("?TARGET")
v1("?UNIPROT")
v2("?compound")
v7("?entry"):::projected
v9("?gomf")
v10("?gomflab"):::projected
v11("?gomfx")
v8("?iso")
a1((" "))
a2((" "))
c5(["CC12CCC3C(C1CCC2O)CCC4=C3C=CC(=C4)O"]):::literal
c13([http://identifiers.org/taxonomy/9606]):::iri
c8(["cco:Activity"]):::iri
subgraph s1["https://idsm.elixir-czech.cz/sparql/endpoint/idsm"]
style s1 stroke-width:4px;
f0[["contains(str(?UNIPROT),'uniprot')"]]
f0 --> v1
subgraph s2["https://idsm.elixir-czech.cz/sparql/endpoint/cco"]
style s2 stroke-width:4px;
a1 --"sachem:query"--> c5
v2 --"sachem:similarCompoundSearch"--> a1
end
v3 --"a"--> c8
v3 --"cco:hasMolecule"--> v2
v3 --"cco:hasAssay"--> v4
v4 --"cco:hasTarget"--> v5
v5 --"cco:taxonomy"--> c13
v5 --"cco:hasTargetComponent"--> v6
v6 --"cco:targetCmptXref"--> v1
end
v7 --"skos:exactMatch"--> v1
v7 --":isoform"--> v8
v8 --":goMolecularFunction"--> a2
a2 --":term"--> v9
v9 --"rdfs:label"--> v10
bind2[/"str(?gomflab)"/]
v10 --o bind2
bind2 --as--o v11