robot: UncheckedExecutionException: java.lang.NullPointerException converting to OBO

Hi.

We’re getting an exception when converting an OWL file to OBO with robot. We get the same error when exporting from Protégé (https://github.com/PHI-base/PHI-base_ontologies/issues/13#issuecomment-384944157). The exception doesn’t tell us where to look in the OWL file for problems so we’re a bit stuck.

We are attempting to convert this OWL file: https://github.com/PHI-base/PHI-base_ontologies/blob/9db31987944144aa321451753a25dcc1f2b6f2c6/phipo.owl

We’re about to start from scratch using the starter kit pointed out to us by @cmungall (https://github.com/INCATools/ontology-starter-kit/) so that we more closely follow what other groups do. Because we’re starting over this exception isn’t going to hold us up but we’d like to understand it so we avoid it in future.

Our command line was:

./bin/robot convert --input phipo.owl --output phipo.obo

And the error is:

2018-05-01 02:41:03,190 ERROR org.obolibrary.obo2owl.OWLAPIObo2Owl - error executing obo id to IRI                                                                                            
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException                                                                                                 
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)                                                                                                               
        at com.google.common.cache.LocalCache.get(LocalCache.java:3937)                                                                                                                       
        at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)                                                                                                                 
        at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)                                                                                                     
        at org.obolibrary.obo2owl.OWLAPIObo2Owl.oboIdToIRI(OWLAPIObo2Owl.java:1664)
        at org.obolibrary.oboformat.writer.OBOFormatWriter$OWLOntologyNameProvider.getName(OBOFormatWriter.java:1182)
        at org.semanticweb.owlapi.oboformat.OBOFormatRenderer$1.getName(OBOFormatRenderer.java:74)
        at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:637)
        at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:363)
        at org.obolibrary.oboformat.writer.OBOFormatWriter.write(OBOFormatWriter.java:203)
        at org.semanticweb.owlapi.oboformat.OBOFormatRenderer.render(OBOFormatRenderer.java:88)
        at org.semanticweb.owlapi.oboformat.OBOFormatStorer.storeOntology(OBOFormatStorer.java:42)
        at org.semanticweb.owlapi.util.AbstractOWLStorer.store(AbstractOWLStorer.java:99)
        at org.semanticweb.owlapi.util.AbstractOWLStorer.storeOntology(AbstractOWLStorer.java:64)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.saveOntology(OWLOntologyManagerImpl.java:1302)
        at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:477)
        at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:432)
        at org.obolibrary.robot.ConvertCommand.execute(ConvertCommand.java:167)
        at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:242)
        at org.obolibrary.robot.CommandManager.execute(CommandManager.java:174)
        at org.obolibrary.robot.CommandManager.main(CommandManager.java:139)
        at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:53)
Caused by: java.lang.NullPointerException
        at org.obolibrary.obo2owl.OWLAPIObo2Owl.translateShorthandIdToExpandedId(OWLAPIObo2Owl.java:1766)
        at org.obolibrary.obo2owl.OWLAPIObo2Owl.oboIdToIRI_load(OWLAPIObo2Owl.java:1705)
        at org.obolibrary.obo2owl.OWLAPIObo2Owl$1.load(OWLAPIObo2Owl.java:81)
        at org.obolibrary.obo2owl.OWLAPIObo2Owl$1.load(OWLAPIObo2Owl.java:77)
        at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
        at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
        at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
        ... 21 more

Thanks!

CC: @ValWood @jseager7 @CuzickA

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (12 by maintainers)

Most upvoted comments

Sorry about the extremely late reply to this issue. In terms of the oddities in the PHIPO OWL file, it seems the owl:Nothing subClassOf owl:Nothing assertion is gone from the ontology now.


The oboInOwl#Subset subClassOf IAO_0000102 assertion in still in the latest version of the ontology, now with an owl:equivalentClass assertion as well. I’m not sure where these assertions are coming from, since I can’t find them in the upstream oboInOwl ontology.

    <!-- http://www.geneontology.org/formats/oboInOwl#Subset -->

    <owl:Class rdf:about="http://www.geneontology.org/formats/oboInOwl#Subset">
        <owl:equivalentClass>
            <owl:Class>
                <owl:oneOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://purl.obolibrary.org/obo/IAO_0000224"/>
                </owl:oneOf>
            </owl:Class>
        </owl:equivalentClass>
        <rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/IAO_0000102"/>
    </owl:Class>

I can’t find anything in the latest version of the ontology that matches this property:

<owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/pato#towards"/>

Most of our onProperty properties have IRIs that end in OBO ID form, like the following:

http://purl.obolibrary.org/obo/BFO_0000050 http://purl.obolibrary.org/obo/RO_0000052

The hash IRIs are all from the ChEBI ontology and PATO, for example:

http://purl.obolibrary.org/obo/chebi#has_functional_parent http://purl.obolibrary.org/obo/pato#reciprocal_of

Is there anything that we can even do about this? As far as I can tell it seems the OBO Library PURL system just can’t cope with IRIs with URI fragments; I can’t find any corresponding OBO-style IRIs for these object properties. Is this something that needs addressing in the source ontologies?

Thanks! This helped me write: https://github.com/owlcs/owlapi/issues/830

We should never have truncated obo in any pipeline if we use the -o $@.tmp && mv $@.tmp $@ idiom.

@kimrutherford there are a few oddities in the OWL that cause problems in translation

    <!-- http://www.geneontology.org/formats/oboInOwl#Subset -->

    <rdf:Description rdf:about="http://www.geneontology.org/formats/oboInOwl#Subset">
        <rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/IAO_0000102"/>
    </rdf:Description>
    


    <!-- http://www.w3.org/2002/07/owl#Nothing -->

    <rdf:Description rdf:about="http://www.w3.org/2002/07/owl#Nothing">
        <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Nothing"/>
    </rdf:Description>

and also use of hash IRIs for object properties, Nico can advise on correct object property yo use

        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/pato#towards"/>
                <owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/CHEBI_28909"/>
            </owl:Restriction>
        </rdfs:subClassOf>