query-6acf1cc371fe9ce2d84f8c157650ae89
Get all genetic association claims linking gene to disease, along with the determination method (GWAS, TAS, etc). SELECT distinct ?geneLabel ?gene ?diseaseLabel ?disease ?determinationLabel WHERE { ?gene p:P2293 ?statement . # all gene disease genetic associations ?statement ps:P2293 ?disease . # get the value associated with the statement ?statement pq:P459 ?determination . # get 'determination method' qualifiers associated with the statements SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Get all genetic association claims linking gene to disease, along with the determination method (GWAS, TAS, etc).
SELECT distinct ?geneLabel ?gene ?diseaseLabel ?disease ?determinationLabel WHERE {
?gene p:P2293 ?statement . # all gene disease genetic associations
?statement ps:P2293 ?disease . # get the value associated with the statement
?statement pq:P459 ?determination . # get 'determination method' qualifiers associated with the statements
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;
v4("?determination")
v3("?disease"):::projected
v1("?gene"):::projected
v2("?statement")
c5(["bd:serviceParam"]):::iri
c7(["en"]):::literal
v1 --"p:P2293"--> v2
v2 --"p:statement/P2293"--> v3
v2 --"p:qualifier/P459"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end