Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] Federated Sparql Question

manuelso manuelso at stanford.edu
Wed Feb 26 09:50:01 PST 2014


Hi Tom,

So your initial query could be decompose in: 

(a) A query to return target and source elements. This query needs to run against http://sparql.bioontology.org/mappings/sparql/

PREFIX map: <http://protege.stanford.edu/ontologies/mappings/mappings.rdfs#>
SELECT DISTINCT ?target ?source 
WHERE {
?m map:source_ontology
         <http://bioportal.bioontology.org/ontologies/1553> .
?m map:target_ontology
         <http://bioportal.bioontology.org/ontologies/1353> .
?m map:source ?source .
?m map:target ?target .
} 

results

?source                                                                                         ?target
<http://purl.bioontology.org/ontology/SNOMEDCT/203323007>  <http://purl.bioontology.org/ontology/ICD10CM/M94.0> 
<http://purl.bioontology.org/ontology/SNOMEDCT/123249005>  <http://purl.bioontology.org/ontology/ICD10CM/M65.4> 
(…)

(b) The second query needs to be dynamically generated from the results of query (a):

This query needs to run against http://sparql.bioontology.org/ontologies/sparql/

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?label ?notation
FROM <http://bioportal.bioontology.org/ontologies/SNOMEDCT>
FROM <http://bioportal.bioontology.org/ontologies/ICD10CM>
WHERE {
	?id skos:prefLabel ?label .
        ?id skos:notation ?notation .
        FILTER(?id = <http://purl.bioontology.org/ontology/SNOMEDCT/203323007> || ?id = <http://purl.bioontology.org/ontology/ICD10CM/M94.0> 
        || ?id = <http://purl.bioontology.org/ontology/SNOMEDCT/123249005> || ?id =  <http://purl.bioontology.org/ontology/ICD10CM/M65.4> ) 
} 

It is important to slice query (b) if query (a) returns hundreds of term ids, avoiding to construct filters that are too long.

NOTE: ICD10 graph is <http://bioportal.bioontology.org/ontologies/ICD10CM> and not <http://bioportal.bioontology.org/ontologies/ICD10>

I hope this helps.

Manuel

On Feb 20, 2014, at 12:08 PM, tomd <tom.dwyer at patientfirst.com> wrote:

> Hi Manuel,
> I tried playing around with this for a couple of hrs, I do not think I am
> implementing your suggestions properly.  Can you be more specific about what
> the query would look like?
> TIA,
> Tom
> 
> 
> 
> --
> View this message in context: http://ncbo-support.2288202.n4.nabble.com/Federated-Sparql-Question-tp4652567p4652587.html
> Sent from the NCBO Support mailing list archive at Nabble.com.
> _______________________________________________
> bioontology-support mailing list
> bioontology-support at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/bioontology-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20140226/39978903/attachment.html>


More information about the bioontology-support mailing list