VICO-ontology / VICO

VICO: Vaccination Informed Consent Ontology
1 stars 0 forks source link

different SPARQL queries in Ontobee (virtuoso transitive) and using TopBraid #4

Open linikujp opened 8 years ago

linikujp commented 8 years ago

I wanted to query what kind of questions being asked in quesionaries between Costco and Walgreens. Since there are different levels of question, I will need to use subClassOf* in OWL2 to search all the way up to the1st level subclass of the question class in VICO: question textual entity (ICO_0000141).

The following SPARQL runs well in both TopBraid(TopBraid Composer Free Edition version 4.5) and Protege (5.0, build beta-15) SPARQL query plugin:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX questionnaire: <http://purl.obolibrary.org/obo/OBI_0001000>
PREFIX has_component: <http://purl.obolibrary.org/obo/RO_0002180>

SELECT distinct ?label 

WHERE
{

  {?questionnaire1 rdfs:subClassOf questionnaire: .
  ?questionnaire1 rdfs:subClassOf ?questionnaire1_axiom .
  ?questionnaire1 rdfs:label ?label1 .
  ?questionnaire1_axiom owl:onProperty has_component:; owl:someValuesFrom ?question .
  ?question rdfs:subClassOf* ?question_kind .
  ?question_kind rdfs:subClassOf obo:ICO_0000141 .
  ?question_kind rdfs:label ?label .
  FILTER REGEX(str(?label1), "Costco") .}
 UNION
  {?questionnaire1 rdfs:subClassOf questionnaire: .
  ?questionnaire1 rdfs:subClassOf ?questionnaire1_axiom .
  ?questionnaire1 rdfs:label ?label1 .
  ?questionnaire1_axiom owl:onProperty has_component:; owl:someValuesFrom ?question .
  ?question rdfs:subClassOf* ?question_kind .
  ?question_kind rdfs:subClassOf obo:ICO_0000141 .
  ?question_kind rdfs:label ?label .
  FILTER REGEX(str(?label1), "Walgreens") .}
}

The result is the same:

  1. Protege result: protege_query
  2. TopBraid result: topbraid_query

However, if I go to Ontobee's SPARQL endpoint supported by Virtuoso, this code doesn't work. So I change the 'subClassOf*' to 'option (transitive)', blue highlighted in the figure below. I thought the result should be the same, but Virtuoso gets much less than Protege and TopBraid.

ontobee_query

Need to find out later!

yongqunh commented 8 years ago

It’s likely the Ontobee online version of VICO is not updated. I will check later. Oliver

yongqunh commented 8 years ago

Jie suggested another possible reason: Ontobee version of VICO is not inferred version. We did not do reasoning on the version of VICO submitted to Ontobee triple store.

This’s an indication of why we should first do reasoning and submitted a merged inferred version.

Oliver


Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues

linikujp commented 8 years ago

Infer first and then upload to Ontobee should be resolved in Ontobee. However, in VICO, there is no need to do any inference for solving this problem.

On Sat, Oct 31, 2015 at 3:03 PM, Yongqun Oliver He <notifications@github.com

wrote:

Jie suggested another possible reason: Ontobee version of VICO is not inferred version. We did not do reasoning on the version of VICO submitted to Ontobee triple store.

This’s an indication of why we should first do reasoning and submitted a merged inferred version.

Oliver


Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues

— Reply to this email directly or view it on GitHub https://github.com/VICO-ontology/VICO/issues/4#issuecomment-152764212.