OBOFoundry/COB

Cant serialise COB in OBO format

Opened this issue · 8 comments

When trying to serialised cob-edit.owl as OBO,

  • Protege crashes entirely
  • ROBOT convert chokes with a non-descript error message
2021-09-08 19:17:38,957 DEBUG org.obolibrary.robot.ExceptionHelper - {} missing exception message.
java.lang.NullPointerException
	at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:619)
	at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:351)
	at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:197)
	at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:171)
	at org.obolibrary.robot.IOHelper.saveOntologyFile(IOHelper.java:1700)
	at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:838)
	at org.obolibrary.robot.CommandLineHelper.maybeSaveOutput(CommandLineHelper.java:671)
	at org.obolibrary.robot.ConvertCommand.execute(ConvertCommand.java:141)
	at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:248)
	at org.obolibrary.robot.CommandManager.execute(CommandManager.java:192)
	at org.obolibrary.robot.CommandManager.main(CommandManager.java:139)
	at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:60)
null

Not sure how to debug.. Perhaps some missing ontology annotation or some such?

Having same problem, can't get ROBOT to parse COB

Are you running with --check false? There's an issue with the error handling for that, which will be fixed in the next release (see ontodev/robot#959).

The OBO error that it gives me is "multiple comment tags". That should be ignored with --check false, but even if I remove rdfs:comment, the error persists. After a little bit more digging, the error is thrown from this line in OWLAPI: https://github.com/owlcs/owlapi/blob/version4/oboformat/src/main/java/org/obolibrary/oboformat/writer/OBOFormatWriter.java#L622

... which is not super helpful.

I was able to track it down to this axiom on COB:0000061 (information), though:

 inverse (concretizes) some COB_0000120

"plan" and "characteristic" also both use inverse.

After removing these three axioms, I can convert to OBO using --check false.

ETA: We're using OWLAPI 4 for ROBOT, I'm not sure if the OBO writer has better error handling and/or resolves this in later versions.

yes, this error is really really problematic for me as well. A few ontologies like OMRSE and others use expressions in place of relationships, and OBO format files hard and cryptically with these.

I dont think this can be fixed, I would think extending convert to deal with this has much more hope of success (dropping axioms we know cause such errors).

@matentzn I don't know if it's better to have a convert --clean-obo true option or make a new command (I can't think of a good name for it right now). Maybe we should open an issue in the ROBOT tracker. I'm partial to the convert option, I guess.

My concern is, if we implement something like that, that we cover all problematic axioms.

I like --clean-obo. The main problems that need fixing: dropping at random multiple definitions/labels and filtering out certain kinds of axioms.. Its a hack, but I think it belongs in convert. wouldn't be that hard to implement either.

Dropping multiple definitions/labels/comments could be dangerous. Do we drop all of them, or do we just pick a random one to drop? That could result in some faulty outputs and spurious diffs.

Let's move this to the ROBOT tracker - ontodev/robot#995