Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing OBO file fails if it imports another OBO file #28

Open
cbielow opened this issue Aug 11, 2022 · 1 comment
Open

Parsing OBO file fails if it imports another OBO file #28

cbielow opened this issue Aug 11, 2022 · 1 comment

Comments

@cbielow
Copy link

cbielow commented Aug 11, 2022

Trying to open
https://raw.githubusercontent.com/HUPO-PSI/psi-ms-CV/master/psi-ms.obo
in Protege 5.5 fails.
The log shows:

  INFO  11:02:13  Finished loading https://raw.githubusercontent.com/HUPO-PSI/psi-ms-CV/master/psi-ms.obo
  ERROR  11:02:13  An error occurred whilst loading the ontology at https://raw.githubusercontent.com/HUPO-PSI/psi-ms-CV/master/psi-ms.obo. Cause: Could not load imported ontology: <http://purl.obolibrary.org/obo/pato.obo> Cause: Problem parsing http://purl.obolibrary.org/obo/pato.obo
Could not parse ontology.  Either a suitable parser could not be found, or parsing failed.  See parser logs below for explanation.
The following parsers were tried:
1) org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParser@334b08db
2) org.semanticweb.owlapi.owlxml.parser.OWLXMLParser@251ad59c
3) org.semanticweb.owlapi.functional.parser.OWLFunctionalSyntaxOWLParser@56ed667f

which mean that Protege is trying to parse this line in psi-ms.obo:

import: http://purl.obolibrary.org/obo/pato.obo

using an XML parser (and fails, since OBO is not XML...)

Now, obviously, Protege knows how to parse OBO, but seems to invoke the wrong parser when encountering an import.

Quickfix:
Replacing the imports to use OWL instead of OBO leads to successful parse:

import: http://purl.obolibrary.org/obo/pato.owl

But I feel this is a bug in Protege, unless import ... should not be used for OBOs, but I don't see why that would be?!

@cbielow
Copy link
Author

cbielow commented Aug 11, 2022

Here is a minimal example, which I feel should parse successfully:

Minimal example (save as bug.obo)

import: http://purl.obolibrary.org/obo/pato.obo

[Typedef]
id: has_regexp
name: has regexp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant