as part of [T199979]
Would be interesting if we could do Federated searches between TORA and Wikidata
Nota bene: My understanding of how this should be set up is 0 but I have seen some tests
See
* [[ https://www.wikidata.org/wiki/Wikidata:SPARQL_federation_input | Wikidata:SPARQL_federation_input ]]
* [[ https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries#Federation:_working_with_external_data_sources | Query examples ]]
* [[ http://sulab.org/2017/07/integrating-wikidata-and-other-linked-data-sources-federated-sparql-queries/ | Blog ]] Integrating Wikidata and other linked data sources – Federated SPARQL queries
Example "external" SPARQL query see [[ http://sparql.uniprot.org/sparql/?query=PREFIX+keywords%3A%3Chttp%3A%2F%2Fpurl.uniprot.org%2Fkeywords%2F%3E+%0D%0APREFIX+uniprotkb%3A%3Chttp%3A%2F%2Fpurl.uniprot.org%2Funiprot%2F%3E+%0D%0APREFIX+ec%3A%3Chttp%3A%2F%2Fpurl.uniprot.org%2Fenzyme%2F%3E+%0D%0APREFIX+rdf%3A%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E+%0D%0APREFIX+skos%3A%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E+%0D%0APREFIX+owl%3A%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E+%0D%0APREFIX+bibo%3A%3Chttp%3A%2F%2Fpurl.org%2Fontology%2Fbibo%2F%3E+%0D%0APREFIX+dc%3A%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E+%0D%0APREFIX+xsd%3A%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E+%0D%0APREFIX+faldo%3A%3Chttp%3A%2F%2Fbiohackathon.org%2Fresource%2Ffaldo%23%3E+%0D%0APREFIX+up%3A%3Chttp%3A%2F%2Fpurl.uniprot.org%2Fcore%2F%3E+%0D%0APREFIX+taxon%3A%3Chttp%3A%2F%2Fpurl.uniprot.org%2Ftaxonomy%2F%3E+%0D%0APREFIX+rdfs%3A%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+wdt%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0D%0APREFIX+wd%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%0D%0APREFIX+pq%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fqualifier%2F%3E%0D%0APREFIX+ps%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fstatement%2F%3E%0D%0APREFIX+p%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fwd_item+%3Fphysically_interacts_with+%3FinteractswithLabel+%3Ftype+%3Firi+%3Funiprot+%3Ftext++WHERE++%7B%0D%0A+++%7BSELECT+*+WHERE+%7B+%3Firi+a+up%3AProtein+%3B%0D%0A%09%09++++up%3Aorganism+taxon%3A9606+%3B+%0D%0A%09%09++++up%3Aannotation+%3Fannotation+.%0D%0A%09%09%3Fannotation+a+up%3ANatural_Variant_Annotation+%3B+%0D%0A%09%09++++++++++++rdfs%3Acomment+%3Ftext+.%0D%0A%09%09FILTER+%28CONTAINS%28%3Ftext%2C+%27loss+of+function%27%29%29%0D%0A+++++%7D%7D%0D%0A++++SERVICE+%3Chttps%3A%2F%2Fquery.wikidata.org%2Fbigdata%2Fnamespace%2Fwdq%2Fsparql%3E+%7B%0D%0A++++++VALUES+%3Fuse+%7Bwd%3AQ427492%7D%0D%0A++++%3Fwd_item+wdt%3AP352+%3Funiprot+%3B%0D%0A+++++++++++++wdt%3AP129+%3Fphysically_interacts_with+%3B+++++%0D%0A++++++++wdt%3AP2888+%3Firi+%3B%0D%0A++++++++wdt%3AP703+wd%3AQ15978631+.%0D%0A++++%3Fwd_item+p%3AP129+%3Fphys_interacts_with_node+.%0D%0A++++%3Fphys_interacts_with_node+ps%3AP129+%3Fphysically_interacts_with+%3B%0D%0A++++++++++++++++++++++++++++++pq%3AP366+%3Fuse+.++++%0D%0A++++%3Fphysically_interacts_with+wdt%3AP31+%3Ftype+%3B%0D%0A+++++++++++++++++++++++++++++++rdfs%3Alabel+%3FinteractswithLabel+.%0D%0A++++FILTER+%28lang%28%3FinteractswithLabel%29+%3D+%22en%22%29++++%0D%0A++++%7D%7D | example ]]
```
PREFIX keywords:<http://purl.uniprot.org/keywords/>
PREFIX uniprotkb:<http://purl.uniprot.org/uniprot/>
PREFIX ec:<http://purl.uniprot.org/enzyme/>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX bibo:<http://purl.org/ontology/bibo/>
PREFIX dc:<http://purl.org/dc/terms/>
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#>
PREFIX faldo:<http://biohackathon.org/resource/faldo#>
PREFIX up:<http://purl.uniprot.org/core/>
PREFIX taxon:<http://purl.uniprot.org/taxonomy/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT DISTINCT ?wd_item ?physically_interacts_with ?interactswithLabel ?type ?iri ?uniprot ?text WHERE {
{SELECT * WHERE { ?iri a up:Protein ;
up:organism taxon:9606 ;
up:annotation ?annotation .
?annotation a up:Natural_Variant_Annotation ;
rdfs:comment ?text .
FILTER (CONTAINS(?text, 'loss of function'))
}}
SERVICE <https://query.wikidata.org/bigdata/namespace/wdq/sparql> {
VALUES ?use {wd:Q427492}
?wd_item wdt:P352 ?uniprot ;
wdt:P129 ?physically_interacts_with ;
wdt:P2888 ?iri ;
wdt:P703 wd:Q15978631 .
?wd_item p:P129 ?phys_interacts_with_node .
?phys_interacts_with_node ps:P129 ?physically_interacts_with ;
pq:P366 ?use .
?physically_interacts_with wdt:P31 ?type ;
rdfs:label ?interactswithLabel .
FILTER (lang(?interactswithLabel) = "en")
}}
```