geneontology / obographs

Basic and Advanced OBO Graphs: specification and reference implementation
64 stars 12 forks source link

EDAM.owl throwing an exception #79

Closed hrshdhgd closed 1 year ago

hrshdhgd commented 3 years ago

I'm trying to convert EDAM.owl (Always the latest stable version, in OWL format) into JSON format using ROBOT which in turn is calling the obographs library. Obographs throws a NullPointerException in generateGraph() which looks like this:

DEBUG org.obolibrary.robot.ExceptionHelper - Missing exception ID: Cannot invoke "String.toString()" because "lv" is null
Cannot invoke "String.toString()" because "lv" is null
java.lang.NullPointerException: Cannot invoke "String.toString()" because "lv" is null
    at org.geneontology.obographs.owlapi.FromOwl.generateGraph(FromOwl.java:409)
    at org.geneontology.obographs.owlapi.FromOwl.generateGraphDocument(FromOwl.java:63)
    at org.obolibrary.robot.IOHelper.saveOntologyFile(IOHelper.java:1488)
    at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:717)
    at org.obolibrary.robot.CommandLineHelper.maybeSaveOutput(CommandLineHelper.java:670)
    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:59)

One of my colleagues tracked it down to this part of the code throwing the error.

Just thought of creating an issue here.

cc: @cmungall

cmungall commented 3 years ago

Thanks, this is the correct place to make an issue

I reported the issue with EDAM: https://github.com/edamontology/edamontology/issues/751

While the EDAM OWL is still valid, it violates some of the norms expected by the conversion to JSON. The JSON conversion should be more robust. And we also need better validation of ontology schemas which will be provided by OMO

matuskalas commented 3 years ago

https://github.com/edamontology/edamontology/issues/751 is now fixed, big thanks for finding it!

This issue might be a more appropriate place to ask this: Is it such a showstopper for your workflow that you'd prefer us patching it also in the (otherwise) stable release at https://edamontology.org/EDAM.owl?