Page MenuHomePhabricator

Test Federated search Wikidata SPARQL with TORA sparql (LIBRIS)
Open, Needs TriagePublic

Description

as part of [T199979]

Would be interesting if we could do Federated searches between TORA and Wikidata see video and start understand how to design WD - Federated search (Linked data fragments??!?!)

NOTE: My understanding of how this should be set up is 0 but I have seen some tests
NOTE: It looks like this will als impact how a TORA object is mapped in Wikidata [[T199794]]

How to

IMPORTANT: this needs to be investigated further

I can see that Q21113158 is used in this query and has property Property 2888 exact match

wdt:P2888 ?iri ;

and that Q21113158 has Q21113158#P2888 set as https://www.uniprot.org/uniprot/P48165

More

Example

See

Example "external" SPARQL query see 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")    
    }}

Define endpoints in Wikidata

see also

Related Objects

Event Timeline

Salgo60 renamed this task from Test Wikidata SPARQL with TORA sparql to Test Federated search Wikidata SPARQL with TORA sparql.Jul 19 2018, 9:59 AM
Salgo60 created this task.
Salgo60 updated the task description. (Show Details)Jul 19 2018, 10:49 AM
Salgo60 updated the task description. (Show Details)
Salgo60 updated the task description. (Show Details)Jul 19 2018, 12:41 PM
Salgo60 updated the task description. (Show Details)Jul 19 2018, 4:22 PM
Salgo60 updated the task description. (Show Details)Jul 19 2018, 10:24 PM
Salgo60 renamed this task from Test Federated search Wikidata SPARQL with TORA sparql to Test Federated search Wikidata SPARQL with TORA sparql (LIBRIS).Jul 20 2018, 12:09 AM
Salgo60 updated the task description. (Show Details)
Salgo60 added a subscriber: Andrawaag.
Salgo60 updated the task description. (Show Details)Jul 20 2018, 6:18 AM
Salgo60 updated the task description. (Show Details)Jul 20 2018, 6:53 AM
Salgo60 updated the task description. (Show Details)Jul 20 2018, 6:57 AM
Salgo60 updated the task description. (Show Details)Jul 20 2018, 7:19 AM
Salgo60 added a subscriber: Daniel_Mietchen.EditedJul 20 2018, 7:51 AM

Asked on twitter Daniel Mietchen (@Daniel_Mietchen) who is down in Cape Town this weekend and has some experience of Federated search. Areas of interest I think is

Through the WDQS content from WIkidata can be extracted and integrated with federated queries on external SPARQL endpoints. To allow these queries a property is needed that captures the link between a concept in Wikidata and its URI. The property equivalent class Property:P1709 does exist, however using this property to express similarity is a bit problematic, as by the W3C definition : "NOTE: The use of owl:equivalentClass does not imply class equality." I would like to propose the propety exact match, tailored around skos:exactMatch, to be able to store mappings to external URIs, allowing querying Wikidata content in external SPARQL endpoints.

Salgo60 updated the task description. (Show Details)Jul 20 2018, 8:29 AM

There are license issues if the federated queries are run from the WDQS. However, if you set up a SPARQL endpoint that support federated querying you can include Wikidata through the WDQS immediately. The example you gave above from Uniprot is exactly where this is happening. Happy to discuss, I am at Wikimania.

Salgo60 updated the task description. (Show Details)Jul 20 2018, 8:42 AM
Salgo60 added a subscriber: Lokal_Profil.EditedJul 20 2018, 9:10 AM

@Andrawaag thanks for fast feedback

I am not down in sunny SA but maybe Andres Costa WMSE @Lokal_Profil is there. He is involved with the Swedish National Libraries and much more skilled than me and I think he also is interested in experiences with Federated searches

see tweet
related tasks for LIBRIS [[T200067]]

Update Andra and Andres will try to meet in SA see tweet

Salgo60 updated the task description. (Show Details)Jul 21 2018, 5:57 AM
Salgo60 updated the task description. (Show Details)Jul 23 2018, 11:23 AM
Salgo60 removed a subscriber: Daniel_Mietchen.
Salgo60 updated the task description. (Show Details)Jul 25 2018, 5:23 PM
Salgo60 updated the task description. (Show Details)Jul 26 2018, 7:33 AM
Salgo60 updated the task description. (Show Details)Jul 26 2018, 8:43 AM
Salgo60 updated the task description. (Show Details)Jul 26 2018, 8:56 AM
Salgo60 updated the task description. (Show Details)Aug 3 2018, 6:56 AM
Salgo60 updated the task description. (Show Details)
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMay 9 2019, 8:16 PM
Salgo60 changed the status of subtask T199998: Test Federated search Wikidata LIBRIS XL from Open to Stalled.May 9 2019, 8:17 PM