drdozer / oboformat

Automatically exported from code.google.com/p/oboformat
0 stars 0 forks source link

tag-value pairs lost from header in roundtrip OBO2OWL2OBO #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
format version
date
default namespace
remark

Original issue reported on code.google.com by dosu...@gmail.com on 20 Jun 2011 at 4:19

GoogleCodeExporter commented 9 years ago

Original comment by shahid.m...@gmail.com on 20 Jun 2011 at 4:24

GoogleCodeExporter commented 9 years ago
The header is lost only when a ontology in rdf/xml format is converted into 
obo. The obo2owl tool default ouputs in rdf/xml format. We have now changed the 
ontology default output format to OWL/XML. With this new change the header tags 
in obo format are not lost. 

Original comment by shahid.m...@gmail.com on 21 Jun 2011 at 8:00

GoogleCodeExporter commented 9 years ago
I don't think this is an adequate solution. Can you write a junit? That way we 
can determine if this is an OWL API bug or something else.

Have you tried other tests? For example, if you load an OWL/XML ontology in 
Protege4 and save as RDF/XML, then load and save back to OWL/XML, is there any 
change?

Original comment by cmung...@gmail.com on 21 Jun 2011 at 8:10

GoogleCodeExporter commented 9 years ago
I'd rather have rdf/xml if at all possible. But can live with this fix for a 
while if hard to get it to work for rdf/xml. 

Original comment by dosu...@gmail.com on 21 Jun 2011 at 9:04

GoogleCodeExporter commented 9 years ago
Round-trip of header tags is now working, but when I open the owl/xml file in 
Protege 4, the obo header stuff doesn't turn up as annotation on the ontology.  
It does if using the internal Protege 4 conversion to load the OBO file. Is 
this an indication that there is something wrong with the mapping of ontology 
annotations into OWL or just an issue with how Protege 4 works?

Saving that from Protege and comparing the OWL XML:

obolib conversion
=>

    <AnnotationAssertion>        
<AnnotationProperty IRI="http://purl.obolibrary.org/obo/IAO_remark"/>
        <IRI></IRI>
        <Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#string">Release version: 1.16.  </Literal>
    </AnnotationAssertion>
    <AnnotationAssertion>

Protege 4.1 conversion
=>

    <Annotation>
        <AnnotationProperty IRI="http://www.geneontology.org/formats/oboInOwl#remark"/>
        <Literal datatypeIRI="&xsd;string">Release version: 1.16.</Literal>
    </Annotation>

Should the empty IRI field in the first example contain the ontology IRI?

Original comment by dosu...@gmail.com on 22 Jun 2011 at 3:39

GoogleCodeExporter commented 9 years ago
During obo 2 owl translation all annotations are inserted through 
AnnotationAssertionAxiom statements. Writing the converted owl through 
RDFXMLOntologyFormat (the writer for rdf/xml), the AnnotationAssertionAxiom 
axioms for the ontology header are written as:

    <rdf:Description rdf:about="http://purl.obolibrary.org/obo/test.owl">
        <obo:IAO_format-version rdf:datatype="http://www.w3.org/2001/XMLSchema#string">1.4</obo:IAO_format-version>
        <obo:IAO_date rdf:datatype="http://www.w3.org/2001/XMLSchema#string">20-06-2011 05-05</obo:IAO_date>
    </rdf:Description>

When the above rdf/xml is translated back into obo, the OWL API treats the 
IAO_format and IAO_date annotations as Annotation statements instead of 
treating them as  AnnotationAssertionAxioms axioms. Our program expects all 
annotations encoded as AnnotationAssertionAxiom, and that's why all header tags 
are lost. 

I have double checked with protege and the same problem is reproduced.
Below are the steps I performed in protege:

--obo file is converted into owlxml format through our tool
--the owlxml file is converted into rdfxml through protege. Protege
produced the similar output as output is producing by OWL API:
---------------Protege output------------------------
   <rdf:Description rdf:about="&obo;test.owl">
       <obo:IAO_remark rdf:datatype="&xsd;string"></obo:IAO_remark>
       <obo:IAO_format-version
rdf:datatype="&xsd;string">1.4</obo:IAO_format-version>
       <obo:IAO_date rdf:datatype="&xsd;string">20-06-2011 05-05</obo:IAO_date>
   </rdf:Description>

I have also done the conversion in other way round.

--obo file is converted into rdfxml format through our tools
--the rdfxml file is converted into owlxml format through protege. The
file produced by protege contains the Annotation statement instead of
AnnotationAssertion as below:

   <Annotation>
       <AnnotationProperty abbreviatedIRI="obo:IAO_date"/>
       <Literal datatypeIRI="&xsd;string">20-06-2011 05-05</Literal>
   </Annotation>
   <Annotation>
       <AnnotationProperty abbreviatedIRI="obo:IAO_format-version"/>
       <Literal datatypeIRI="&xsd;string">1.4</Literal>
   </Annotation>

Original comment by shahid.m...@gmail.com on 5 Jul 2011 at 4:50

GoogleCodeExporter commented 9 years ago

Original comment by shahid.m...@gmail.com on 7 Jul 2011 at 10:12