sparql-examples

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

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

NXQ_00139

rq turtle/ttl

Protein kinases which are high-confidence drug targets according to CHEMBL

Use at

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.
}
https://idsm.elixir-czech.cz/sparql/endpoint/idsm
cco:hasTargetComponent
cco:taxonomy
cco:targetCmptXref
a
cco:hasMolecule
cco:hasAssay
cco:hasMechanism
cco:hasTarget
cco:hasTarget
cco:targetConfScore
skos:exactMatch
:isoform
:uniprotKeyword
:term
:gene
:recommendedName
rdfs:label
as
?score > '8^^xsd:integer'
?score
contains(str(?protein),'uniprot')
?protein
?tarComp
?target
http://identifiers.org/taxonomy/9606
cco:Activity
?activity
?drug
?assay
?entry
?gen
?gene
:terminology/KW-0418
str(?gen)