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 ;

IRI.png (694×828 px, 252 KB)

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

Screen Shot 2018-07-20 at 08.52.29.png (328×1 px, 41 KB)

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

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
StalledNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedSalgo60
DeclinedNone
OpenNone
OpenNone
OpenNone
StalledNone
ResolvedSalgo60
InvalidNone
ResolvedSalgo60
OpenNone
ResolvedSalgo60
DeclinedNone
ResolvedSalgo60
ResolvedSalgo60
ResolvedSalgo60
ResolvedSalgo60
ResolvedSalgo60
ResolvedSalgo60
ResolvedSalgo60
ResolvedSalgo60
DeclinedSalgo60
ResolvedSalgo60
ResolvedSalgo60
DeclinedSalgo60
DeclinedSalgo60

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)
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.

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.

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.

@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)