query-9478b29e70b58181639308cd94e5a3a7
Given a variant ID, find drugs that may target a protein in the same pathway SELECT ?gene ?geneLabel ?pathway ?pathwayLabel ?pathwayProtein ?pathwayProteinLabel ?drug ?drugLabel WHERE { values ?hgvsid {"NC_000007.13:g.140453136A>T"} # currently basing on HGVS ID because we don't have dbsnp IDs yet ?variant wdt:P3331 ?hgvsid . ?variant wdt:P3433 ?gene . ?gene wdt:P688 ?protein .
?pathway wdt:P527 ?protein . ?pathway wdt:P31 wd:Q4915012 . ?pathway wdt:P527 ?pathwayProtein . ?pathwayProtein wdt:P31 wd:Q8054 . ?pathwayProtein wdt:P129 ?drug . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Given a variant ID, find drugs that may target a protein in the same pathway
SELECT ?gene ?geneLabel ?pathway ?pathwayLabel ?pathwayProtein ?pathwayProteinLabel ?drug ?drugLabel WHERE {
values ?hgvsid {"NC_000007.13:g.140453136A>T"} # currently basing on HGVS ID because we don't have dbsnp IDs yet
?variant wdt:P3331 ?hgvsid .
?variant wdt:P3433 ?gene .
?gene wdt:P688 ?protein .
?pathway wdt:P527* ?protein .
?pathway wdt:P31 wd:Q4915012 .
?pathway wdt:P527* ?pathwayProtein .
?pathwayProtein wdt:P31 wd:Q8054 .
?pathwayProtein wdt:P129 ?drug .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?drug"):::projected
v3("?gene"):::projected
v1("?hgvsid")
v5("?pathway"):::projected
v6("?pathwayProtein"):::projected
v4("?protein")
v2("?variant")
c10(["bd:serviceParam"]):::iri
c6(["wd:Q4915012"]):::iri
c7(["wd:Q8054"]):::iri
c12(["en"]):::literal
bind0[/VALUES ?hgvsid/]
bind0-->v1
bind00(["NC_000007.13:g.140453136A>T"])
bind00 --> bind0
v2 --"wdt:P3331"--> v1
v2 --"wdt:P3433"--> v3
v3 --"wdt:P688"--> v4
v5 --"wdt:P527"--> v4
v5 --"wdt:P31"--> c6
v5 --"wdt:P527"--> v6
v6 --"wdt:P31"--> c7
v6 --"wdt:P129"--> v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end