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] BioPortal sparql

manuelso manuelso at stanford.edu
Fri Dec 14 10:09:48 PST 2012


Hi Nikolina,

The IRIs for graphs use acronyms capitalized. You need to ONTODM instead of OntoDM. The following query should give the results you expect:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT * WHERE {
GRAPH <http://bioportal.bioontology.org/ontologies/ONTODM> {

   <http://www.ifomis.org/bfo/1.1/snap#MaterialEntity> rdfs:subClassOf ?parent.
       OPTIONAL {?parent rdfs:label ?label}.
       } 
   }

Best,

Manuel


On Dec 14, 2012, at 6:29 AM, Nikolina Koleva <nikolina.koleva19 at yahoo.de> wrote:

> Dear all,
> 
> I have a question about the BioPortal sparql.  
> For a list of hits found in the BioPortal by searching for the term "material entity", I try to get the parent concept and ask for its label (optionally). 
> I am running the following query in a loop as long as I get a parent and in each iteration I set the parent to the value of the term:
> 
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> 
>    SELECT * WHERE {
>    GRAPH <http://bioportal.bioontology.org/ontologies/SWO> {
> 
>        <http://www.ifomis.org/bfo/1.1/snap#MaterialEntity> rdfs:subClassOf ?parent.
>            OPTIONAL {?parent rdfs:label ?label}.
>            } 
>        }
> 
> thereby:
> 
> 1. http://bioportal.bioontology.org/ontologies/SWO is the ontology in which I found the term
> 
> 2. http://www.ifomis.org/bfo/1.1/snap#MaterialEntity is the full id of the term 
> 
> Well, this works and returns results but unfortunately not for every hit I got. I have tested it on 70 of the hits for the term "material entity" and in 27 of the cases I got no results.
> 
> For
> 1. http://bioportal.bioontology.org/ontologies/OGMS
> 2. http://www.ifomis.org/bfo/1.1/snap#MaterialEntity 
> 
> I do get results 
> but 
> for 
> 1. http://bioportal.bioontology.org/ontologies/OntoDM
> 2. http://www.ifomis.org/bfo/1.1/snap#MaterialEntity
> 
> no results are retrieved although the id of the term is the same.
> 
> 
> When I checked both entries in BioPortal web interface they both have the subClassOf property ...
> 
> It would be great if you have any ideas why this happens. 
> 
> 
> Best regards,
> Nikolina
> 
> _______________________________________________
> bioontology-support mailing list
> bioontology-support at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/bioontology-support



More information about the bioontology-support mailing list