A set of SPARQL examples that are used in different SIB resources
Protein kinases which are high-confidence drug targets according to CHEMBL
PREFIX : <http://nextprot.org/rdf/>
PREFIX cco: <http://rdf.ebi.ac.uk/terms/chembl#>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT DISTINCT ?entry (str(?gen) as ?gene) WHERE {
SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/idsm> {
SELECT DISTINCT ?protein WHERE {
?target cco:hasTargetComponent ?tarComp .
?target cco:taxonomy <http://identifiers.org/taxonomy/9606> . # human protein target
?tarComp cco:targetCmptXref ?protein .
#?protein a cco:UniprotRef .
FILTER(contains(str(?protein),"uniprot"))
?activity a cco:Activity ; cco:hasMolecule ?drug ; cco:hasAssay ?assay .
?drug cco:hasMechanism / cco:hasTarget ?target . # known drug action mechanism
?assay cco:hasTarget ?target; cco:targetConfScore ?score .
FILTER(?score > 8) # high-confidence assay
}
}
?entry skos:exactMatch ?protein .
?entry :isoform / :uniprotKeyword / :term nextprot_cv:KW-0418. #kinase
?entry :gene / :recommendedName / rdfs:label ?gen.
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?activity")
v7("?assay")
v6("?drug")
v8("?entry"):::projected
v9("?gen"):::projected
v10("?gene")
v2("?protein")
v1("?score")
v4("?tarComp")
v3("?target")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
c19([":terminology/KW-0418"]):::iri
c6([http://identifiers.org/taxonomy/9606]):::iri
c9(["cco:Activity"]):::iri
subgraph s1["https://idsm.elixir-czech.cz/sparql/endpoint/idsm"]
style s1 stroke-width:4px;
f0[["?score > '8^^xsd:integer'"]]
f0 --> v1
f1[["contains(str(?protein),'uniprot')"]]
f1 --> v2
v3 --"cco:hasTargetComponent"--> v4
v3 --"cco:taxonomy"--> c6
v4 --"cco:targetCmptXref"--> v2
v5 --"a"--> c9
v5 --"cco:hasMolecule"--> v6
v5 --"cco:hasAssay"--> v7
v6 --"cco:hasMechanism"--> a1
a1 --"cco:hasTarget"--> v3
v7 --"cco:hasTarget"--> v3
v7 --"cco:targetConfScore"--> v1
end
v8 --"skos:exactMatch"--> v2
v8 --":isoform"--> a2
a2 --":uniprotKeyword"--> a3
a3 --":term"--> c19
v8 --":gene"--> a4
a4 --":recommendedName"--> a5
a5 --"rdfs:label"--> v9
bind2[/"str(?gen)"/]
v9 --o bind2
bind2 --as--o v10