owlcollab / owltools

OWLTools
BSD 3-Clause "New" or "Revised" License
107 stars 33 forks source link

Parse error using .obo URLs #302

Open kimrutherford opened 4 years ago

kimrutherford commented 4 years ago

Hi.

We're seeing a problem with .obo URLs using the 2020-04-06 release.

Command lines this work fine:

owltools http://purl.obolibrary.org/obo/cl.owl --ancestors neuron

But changing to a .obo purl results in a parse error. Here's an example:

owltools http://purl.obolibrary.org/obo/cl.obo --ancestors neuron

Here is the full output from the command: errors.txt

@jseager7 noticed this in the error output and suggested that perhaps the 304 redirect isn't being followed:

Parser: org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser@35835fa
    Stack trace:
LINENO: 1 - Could not find tag separator ':' in line.
LINE: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">        org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser.parse(OBOFormatOWLAPIParser.java:60)

The pattern seems the same with other ontologies. @jseager7 first noticed the problem with: http://purl.obolibrary.org/obo/phipo/phipo-simple.obo

Please let us know if you need any other details.

Thanks.

matentzn commented 4 years ago

I noticed that as well! High priority, because it happens for robot as well! @balhoff @jamesaoverton

robot -vvv merge -i http://purl.obolibrary.org/obo/cl.obo -o test.obo

balhoff commented 4 years ago

@matentzn so must be related to OWL API version?

matentzn commented 4 years ago

But that has not been updated for so long! No one noticed for such a long time?

balhoff commented 4 years ago

By the way your command should be: robot -vvv merge -I http://purl.obolibrary.org/obo/cl.obo -o test.obo

(does show the problem)

matentzn commented 4 years ago

Oh yeah sorry.

matentzn commented 4 years ago

@ignazio1977 did we know about this? Is this a problem with how the obo purls are redirected?

balhoff commented 4 years ago

owltools is on OWL API 4.5.6. I tested rolling back to 4.5.1 and it works again.

Update—4.5.4 also errors. For some reason I can't compile owltools with 4.5.2.

balhoff commented 4 years ago

owltools has been using this OWL API version for about 18 months: https://github.com/owlcollab/owltools/commit/ad678691f43d1cdb1c445a294f77ac9f6ed3fc26#diff-852a5f234948b0c35064c26937d12558

Not sure how no one noticed this!

ignazio1977 commented 4 years ago

@matentzn Nothing I'm aware of but the OBO parser manages imports and URL loading differently from the other parsers, and more so in those fairly ancient releases.

matentzn commented 4 years ago

Thanks, @ignazio1977, do you know if anyone has changed the OBO parser between 4.5.1 and 4.5.6?

ignazio1977 commented 4 years ago

Most likely me :-) I'll replicate and see if it can be fixed.

matentzn commented 4 years ago

Thanks a ton! :)

ignazio1977 commented 4 years ago

Failure can be replicated on the latest version 4 but not on version 5 and 6. So this seems tied to the changes in handling HTTP connections, if I remember correctly we changed http libraries in version 5.

matentzn commented 4 years ago

Thanks a lot @ignazio1977! Do you think the churn is too high to fix this for the 4.X versions of OWL API as well? I have started to migrate some tools to 5 and 6, but it may take a while for other toolkits like this here owltools to catch up..

ignazio1977 commented 4 years ago

Can't tell just yet.

ignazio1977 commented 4 years ago

Adapting the obo parser to behave like the other parsers seems to have been effective. https://github.com/owlcs/owlapi/commit/7919ca9b865b703cf0ac9c70efbba10968b1206a

matentzn commented 4 years ago

Wow that is a serious change :) THANKS a lot! If you remember to: ping us when the change is live. Thank you again!

ignazio1977 commented 4 years ago

Fix included in OWLAPI 4.5.17