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] Ungrounded graphs in Bioportal SPARQL endpoint

manuelso manuelso at
Fri Jul 13 18:39:15 PDT 2012

Hi Bastien,

You can use the predicates map:source_ontology or map:target_ontology to restrict the mappings to certain pairs of ontologies.

These two predicates do not use acronym based URIs they use virtual ID based ontology URIs.  The following query returns a table that can help you to understand how to move between acronym and virtual ID URIs:

PREFIX meta: <> 
    ?vrtID meta:hasVersion ?version .
    ?version meta:hasDataGraph ?graph .

As you can see in the result set ...

ABA is
MSH is

You can use these URIs and write a query that does something like:

?m map:source_ontology <> .
?m map:target_ontology <> .

If you want bidirectional mappings you can use a UNION:

?m map:source_ontology <> .
?m map:target_ontology <> .
?m map:target_ontology <>
?m map:source_ontology <>

Does this help you to rewrite your queries without using FROM ? 

I do not entirely understand what you are trying to do. We only have CUIs for things that originally come from UMLS. Could you please explain your use case in further detail ? Maybe a descriptive example might help me.

On a side note, our SPARQL endpoint has  timeouts enabled so if you try to retrieve too much data your query result set will be cut. It is always better to run smaller (more selective) queries even if you have to run several of them.



On Jul 13, 2012, at 4:38 PM, Rance, Bastien (NIH/NLM/LHC) [C] wrote:

> Hi,
> I am playing with the BioPortal SPARQL endpoint. I would like to retrieve the CUIs mapped to concepts of terminologies not included in the UMLS.
> The query below allows to retrieve the results for two given ontologies. I would like to be able to find the results without specifying the ontologies (in the FROM).
> Is it possible or do I have to include all the ontologies in the FROM clause?
> Thanks in advance,
> Bastien
> ----- 
> Query retrieving CUIs mapped to ABA concepts through MeSH.
> PREFIX owl:  <>
> PREFIX rdfs: <>
> PREFIX skos: <>
> PREFIX map: <>
> PREFIX umls: <>
> SELECT DISTINCT ?s ?label ?m ?r ?umls_s ?cui
> FROM <>
> FROM <>
> FROM <> 
> FROM <>
>       ?s a owl:Class .
>       ?s rdfs:label ?label .
>       ?m map:target ?s .
>       ?m map:relation ?r .
>       ?m map:source ?umls_s .
>       ?umls_s umls:cui ?cui .
> }
> LIMIT 10
> _______________________________________________
> bioontology-support mailing list
> bioontology-support at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the bioontology-support mailing list