query-c9f9b44ef1622d1734d49b5b6221b317

rq turtle/ttl

... and whose gene product is localized to membrane SELECT DISTINCT ?gene ?geneLabel where { ?gene wdt:P2293 wd:Q35869 . # gene has genetic association to "asthma"

?gene wdt:P31 wd:Q7187 . # gene is subclass of "gene"

?gene wdt:P688 ?protein . # gene encodes a protein ?protein p:P681 ?s . # protein's cell component statement ?s ps:P681 ?cp . # get statement value FILTER NOT EXISTS {?s pq:P459 wd:Q23190881 .} # determination method is not IEA ?cp wdt:P279|wdt:P361 wd:Q14349455 . # statement value is 'part of' or 'subclass of' membrane

SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
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#>
#... and whose gene product is localized to membrane
SELECT DISTINCT ?gene ?geneLabel where {
  ?gene wdt:P2293 wd:Q35869 .  # gene has genetic association to "asthma"

  ?gene wdt:P31 wd:Q7187 .     # gene is subclass of "gene"

  ?gene wdt:P688 ?protein .                        # gene encodes a protein
  ?protein p:P681 ?s .                             # protein's cell component statement
    ?s ps:P681 ?cp .                               # get statement value
    FILTER NOT EXISTS {?s pq:P459 wd:Q23190881 .}  # determination method is not IEA
    ?cp wdt:P279*|wdt:P361* wd:Q14349455 .         # statement value is 'part of' or 'subclass of' membrane

  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("?cp") v2("?gene"):::projected v3("?protein") v1("?s") c16(["en"]):::literal c11(["wd:Q14349455"]):::iri c14(["bd:serviceParam"]):::iri c6(["wd:Q7187"]):::iri c2(["wd:Q23190881"]):::iri c4(["wd:Q35869"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:qualifier/P459"--> e0c2 e0v1("?s"):::projected e0c2(["wd:Q23190881"]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> c2 v1 --"p:qualifier/P459"--> c2 v2 --"p:direct/P2293"--> c4 v2 --"p:direct/P31"--> c6 v2 --"p:direct/P688"--> v3 v3 --"p:P681"--> v1 v1 --"p:statement/P681"--> v4 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 --"p:direct/P361"--> c11 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"p:direct/P279"--> c11 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end