query-d1d1b06b8d9649db5fd11b4266c11f31
Given a variant ID, find drugs that may target the corresponding protein SELECT ?variant ?variantLabel ?gene ?geneLabel ?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 . ?protein 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 bd: <http://www.bigdata.com/rdf#>
# Given a variant ID, find drugs that may target the corresponding protein
SELECT ?variant ?variantLabel ?gene ?geneLabel ?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 .
?protein 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;
v5("?drug"):::projected
v3("?gene"):::projected
v1("?hgvsid")
v4("?protein")
v2("?variant"):::projected
c6(["bd:serviceParam"]):::iri
c8(["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
v4 --"wdt:P129"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end