query-b8e83a36d1580f7e1d085fb3cb64e9f7

rq turtle/ttl

Get all Gene Ontology information and references for proteins, but only show statements where the refernece is a journal article published in Nature, Cell, or Science SELECT ?proteinLabel ?uniprot ?valueLabel ?goTypeLabel ?paperLabel ?PMID ?PMCID WHERE { ?protein wdt:P352 ?uniprot . ?protein p:P680|p:P681|p:P682 ?statement . ?statement ps:P680|ps:P681|ps:P682 ?value . ?value wdt:P31 ?goType . ?statement prov:wasDerivedFrom/pr:P248 ?paper . ?paper wdt:P698 ?PMID . ?paper wdt:P1433 ?journal . values ?journal {wd:Q192864 wd:Q180445 wd:Q655814} SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } limit 1000

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 prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Get all Gene Ontology information and references for proteins, but only show statements where the refernece is a journal article published in Nature, Cell, or Science
SELECT ?proteinLabel ?uniprot ?valueLabel ?goTypeLabel ?paperLabel ?PMID ?PMCID WHERE {
  ?protein wdt:P352 ?uniprot .
  ?protein p:P680|p:P681|p:P682 ?statement .
  ?statement ps:P680|ps:P681|ps:P682 ?value . 
  ?value wdt:P31 ?goType .
  ?statement prov:wasDerivedFrom/pr:P248 ?paper .
  ?paper wdt:P698 ?PMID .
  ?paper wdt:P1433 ?journal .
  values ?journal {wd:Q192864 wd:Q180445 wd:Q655814}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} limit 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?PMID"):::projected v5("?goType") v9("?journal") v6("?paper") v1("?protein") v3("?statement") v2("?uniprot"):::projected v4("?value") a1((" ")) c16(["en"]):::literal c14(["bd:serviceParam"]):::iri v1 --"p:direct/P352"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v1 --"p:P682"--> v3 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P681"--> v3 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P680"--> v3 end union0r <== or ==> union0l end subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; v3 --"p:statement/P682"--> v4 end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; v3 --"p:statement/P681"--> v4 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v3 --"p:statement/P680"--> v4 end union2r <== or ==> union2l end v4 --"p:direct/P31"--> v5 v3 --"prov:wasDerivedFrom"--> a1 a1 --"p:reference/P248"--> v6 v6 --"p:direct/P698"--> v7 v6 --"p:direct/P1433"--> v9 bind0[/VALUES ?journal/] bind0-->v9 bind00(["wd:Q192864"]) bind00 --> bind0 bind01(["wd:Q180445"]) bind01 --> bind0 bind02(["wd:Q655814"]) bind02 --> bind0 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end