ncbo / BioPortal-to-KGX

Assemble a BioPortal Knowledge Graph
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

ROBOT preprocessing fails due to null value #15

Closed caufieldjh closed 2 years ago

caufieldjh commented 2 years ago

The ROBOT relax fails because of the following error when parsing DOID_617:

ROBOT encountered an error:

  RAN: /home/harry/BioPortal-to-KGX/robot relax --input /tmp/tmpq3t8cyv0 --output transformed/ontologies/DOID/DOID_617_relaxed.json --vvv

  STDOUT:
2022-03-07 14:01:21,081 DEBUG org.obolibrary.robot.IOHelper - Loading ontology /tmp/tmpq3t8cyv0 with catalog file null
2022-03-07 14:01:21,082 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading file META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
2022-03-07 14:01:21,083 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:/home/harry/BioPortal-to-KGX/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
2022-03-07 14:01:21,083 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:/home/harry/BioPortal-to-KGX/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
2022-03-07 14:01:21,083 DEBUG org.semanticweb.owlapi... (24347 more, please see e.stdout)

  STDERR:
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:1684)
        at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:838)
        at org.obolibrary.robot.CommandLineHelper.maybeSaveOutput(CommandLineHelper.java:671)
        at org.obolibrary.robot.RelaxCommand.execute(RelaxCommand.java:113)
        at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:248)
        at org.obolibrary.robot.CommandManager.execute(CommandManager.java:192)
        at org.obolibrary.robot.CommandManager.main(CommandMa... (97 more, please see e.stderr)
ROBOT relax of DOID_617 failed - skipping.

The next transform continues as expected, but DOID doesn't get transformed.

caufieldjh commented 2 years ago

This also happens with: (see #22)

caufieldjh commented 2 years ago

The full trace from trying to run robot relax on the raw DOID:

$ robot relax -vvv --input e67d70df45f6f4cc5b70b1296091 --output ./DOID_617_relaxed.json
DEBUG Loading ontology e67d70df45f6f4cc5b70b1296091 with catalog file null
DEBUG Loading file META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
DEBUG Loading file META-INF/services/org.semanticweb.owlapi.model.OWLDataFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLDataFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLDataFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLDataFactory
DEBUG Injecting object uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl@7203c7ff
DEBUG Loading file META-INF/services/org.semanticweb.owlapi.model.OWLOntologyIRIMapper
DEBUG No files found for META-INF/services/org.semanticweb.owlapi.model.OWLOntologyIRIMapper
DEBUG Injecting values [[]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setIRIMappers(java.util.Set).
DEBUG Loading file META-INF/services/org.semanticweb.owlapi.io.OWLParserFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.io.OWLParserFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.io.OWLParserFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.io.OWLParserFactory
DEBUG Injecting values [[org.semanticweb.owlapi.rdf.turtle.parser.TurtleOntologyParserFactory@4a194c39, org.semanticweb.owlapi.functional.parser.OWLFunctionalSyntaxOWLParserFactory@c4ed84, org.semanticweb.owlapi.rio.RioJsonLDParserFactory@65045a87, org.semanticweb.owlapi.rio.RioRDFaParserFactory@4fce136b, org.semanticweb.owlapi.rio.RioNQuadsParserFactory@d3957fe, org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParserFactory@6b3e12b5, org.semanticweb.owlapi.rio.RioNTriplesParserFactory@5e1fa5b1, org.semanticweb.owlapi.rio.RioTrixParserFactory@6b53bcc2, org.semanticweb.owlapi.rio.RioN3ParserFactory@7216fb24, org.semanticweb.owlapi.owlxml.parser.OWLXMLParserFactory@59252cb6, org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxOntologyParserFactory@5b619d14, org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParserFactory@1d730606, org.semanticweb.owlapi.rio.RioJsonParserFactory@4af0df05, org.semanticweb.owlapi.rio.RioTurtleParserFactory@7a560583, org.semanticweb.owlapi.krss2.parser.KRSS2OWLParserFactory@1817f1eb, org.semanticweb.owlapi.rio.RioBinaryRdfParserFactory@3700ec9c, org.semanticweb.owlapi.rio.RioRDFXMLParserFactory@3300f4fd, org.semanticweb.owlapi.rio.RioTrigParserFactory@7cbc3762]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyParsers(java.util.Set).
DEBUG Loading file META-INF/services/org.semanticweb.owlapi.model.OWLOntologyFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyFactory
DEBUG Injecting values [[uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl@61c9c3fd]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyFactories(java.util.Set).
DEBUG Loading file META-INF/services/org.semanticweb.owlapi.model.OWLStorerFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLStorerFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLStorerFactory
DEBUG Loading URL for service jar:file:/usr/local/bin/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLStorerFactory
DEBUG Injecting values [[org.semanticweb.owlapi.dlsyntax.renderer.DLSyntaxStorerFactory@4c5474f5, org.semanticweb.owlapi.krss2.renderer.KRSS2OWLSyntaxStorerFactory@333dd51e, org.semanticweb.owlapi.rio.RioBinaryRdfStorerFactory@54a67a45, org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterSyntaxStorerFactory@4097cac, org.semanticweb.owlapi.rio.RioN3StorerFactory@dfddc9a, org.semanticweb.owlapi.rio.RioJsonStorerFactory@13e547a9, org.semanticweb.owlapi.rio.RioNQuadsStorerFactory@6955cb39, org.semanticweb.owlapi.rdf.turtle.renderer.TurtleStorerFactory@710b18a6, org.semanticweb.owlapi.functional.renderer.FunctionalSyntaxStorerFactory@6f2cfcc2, org.semanticweb.owlapi.owlxml.renderer.OWLXMLStorerFactory@4566d049, org.semanticweb.owlapi.dlsyntax.renderer.DLSyntaxHTMLStorerFactory@3ecd267f, org.semanticweb.owlapi.rio.RioTrigStorerFactory@68fa0ba8, org.semanticweb.owlapi.rio.RioTrixStorerFactory@5c10f1c3, org.semanticweb.owlapi.rio.RioTurtleStorerFactory@3f6db3fb, org.semanticweb.owlapi.rdf.rdfxml.renderer.RDFXMLStorerFactory@1b2c4efb, org.semanticweb.owlapi.rio.RioJsonLDStorerFactory@5ee2b6f9, org.semanticweb.owlapi.rio.RioRDFXMLStorerFactory@256f8274, org.semanticweb.owlapi.latex.renderer.LatexStorerFactory@55562aa9, org.semanticweb.owlapi.oboformat.OBOFormatStorerFactory@544820b7, org.semanticweb.owlapi.rio.RioNTriplesStorerFactory@18b0930f]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyStorers(java.util.Set).
DEBUG Registered service class org.semanticweb.owlapi.rio.RioFunctionalSyntaxParserFactory
DEBUG Registered service class org.semanticweb.owlapi.rio.RioManchesterSyntaxParserFactory
DEBUG Registered service class org.semanticweb.owlapi.rio.RioOWLXMLParserFactory
DEBUG Registered service class org.openrdf.rio.binary.BinaryRDFParserFactory
DEBUG Registered service class org.openrdf.rio.n3.N3ParserFactory
DEBUG Registered service class org.openrdf.rio.nquads.NQuadsParserFactory
DEBUG Registered service class org.openrdf.rio.ntriples.NTriplesParserFactory
DEBUG Registered service class org.openrdf.rio.rdfjson.RDFJSONParserFactory
DEBUG Registered service class org.openrdf.rio.rdfxml.RDFXMLParserFactory
DEBUG Registered service class org.openrdf.rio.trix.TriXParserFactory
DEBUG Registered service class org.openrdf.rio.turtle.TurtleParserFactory
DEBUG Registered service class org.openrdf.rio.trig.TriGParserFactory
DEBUG Registered service class com.github.jsonldjava.sesame.SesameJSONLDParserFactory
DEBUG Registered service class org.semarglproject.sesame.rdf.rdfa.SesameRDFaParserFactory
DEBUG Registered service class org.openrdf.rio.datatypes.XMLSchemaDatatypeHandler
DEBUG Registered service class org.openrdf.rio.datatypes.RDFDatatypeHandler
DEBUG Registered service class org.openrdf.rio.datatypes.DBPediaDatatypeHandler
DEBUG Registered service class org.openrdf.rio.datatypes.VirtuosoGeometryDatatypeHandler
DEBUG Registered service class org.openrdf.rio.datatypes.GeoSPARQLDatatypeHandler
DEBUG Registered service class org.openrdf.rio.languages.RFC3066LanguageHandler
DEBUG Parsed: 10000 triples
DEBUG Parsed: 20000 triples
DEBUG Parsed: 30000 triples
DEBUG Parsed: 40000 triples
DEBUG Parsed: 50000 triples
DEBUG 1000: Annotations Cache stats: CacheStats{hitCount=982, missCount=18, loadSuccessCount=18, loadFailureCount=0, totalLoadTime=49700, evictionCount=0, evictionWeight=0}
DEBUG Parsed: 60000 triples
DEBUG Parsed: 70000 triples
DEBUG Parsed: 80000 triples
DEBUG Parsed: 90000 triples
DEBUG 2000: Annotations Cache stats: CacheStats{hitCount=1980, missCount=20, loadSuccessCount=20, loadFailureCount=0, totalLoadTime=57300, evictionCount=0, evictionWeight=0}
DEBUG Parsed: 100000 triples
DEBUG Parsed: 110000 triples
DEBUG Parsed: 120000 triples
DEBUG Parsed: 130000 triples
DEBUG 3000: Annotations Cache stats: CacheStats{hitCount=2979, missCount=21, loadSuccessCount=21, loadFailureCount=0, totalLoadTime=70200, evictionCount=0, evictionWeight=0}
DEBUG Parsed: 140000 triples
DEBUG Parsed: 150000 triples
DEBUG Parsed: 160000 triples
DEBUG Parsed: 170000 triples
DEBUG 4000: Annotations Cache stats: CacheStats{hitCount=3979, missCount=21, loadSuccessCount=21, loadFailureCount=0, totalLoadTime=70200, evictionCount=0, evictionWeight=0}
DEBUG Parsed: 180000 triples
DEBUG Parsed: 190000 triples
DEBUG Parsed: 200000 triples
DEBUG 5000: Annotations Cache stats: CacheStats{hitCount=4979, missCount=21, loadSuccessCount=21, loadFailureCount=0, totalLoadTime=70200, evictionCount=0, evictionWeight=0}
DEBUG Parsed: 210000 triples
DEBUG Parsed: 220000 triples
DEBUG Parsed: 230000 triples
DEBUG Parsed: 240000 triples
DEBUG 6000: Annotations Cache stats: CacheStats{hitCount=5979, missCount=21, loadSuccessCount=21, loadFailureCount=0, totalLoadTime=70200, evictionCount=0, evictionWeight=0}
DEBUG Total number of triples: 248103
DEBUG 7000: Annotations Cache stats: CacheStats{hitCount=6050, missCount=950, loadSuccessCount=950, loadFailureCount=0, totalLoadTime=577200, evictionCount=0, evictionWeight=0}
DEBUG 8000: Annotations Cache stats: CacheStats{hitCount=6080, missCount=1920, loadSuccessCount=1920, loadFailureCount=0, totalLoadTime=760600, evictionCount=1304, evictionWeight=1304}
DEBUG 9000: Annotations Cache stats: CacheStats{hitCount=6122, missCount=2878, loadSuccessCount=2878, loadFailureCount=0, totalLoadTime=916600, evictionCount=2213, evictionWeight=2213}
DEBUG 10000: Annotations Cache stats: CacheStats{hitCount=6150, missCount=3850, loadSuccessCount=3850, loadFailureCount=0, totalLoadTime=1090300, evictionCount=3311, evictionWeight=3311}
DEBUG 11000: Annotations Cache stats: CacheStats{hitCount=6183, missCount=4817, loadSuccessCount=4817, loadFailureCount=0, totalLoadTime=1226200, evictionCount=4303, evictionWeight=4303}
DEBUG 12000: Annotations Cache stats: CacheStats{hitCount=6227, missCount=5773, loadSuccessCount=5773, loadFailureCount=0, totalLoadTime=1393300, evictionCount=5261, evictionWeight=5261}
DEBUG 13000: Annotations Cache stats: CacheStats{hitCount=6257, missCount=6743, loadSuccessCount=6743, loadFailureCount=0, totalLoadTime=1583600, evictionCount=6230, evictionWeight=6230}
DEBUG 14000: Annotations Cache stats: CacheStats{hitCount=6287, missCount=7713, loadSuccessCount=7713, loadFailureCount=0, totalLoadTime=1808100, evictionCount=7199, evictionWeight=7199}
DEBUG 15000: Annotations Cache stats: CacheStats{hitCount=6321, missCount=8679, loadSuccessCount=8679, loadFailureCount=0, totalLoadTime=1975800, evictionCount=8162, evictionWeight=8162}
DEBUG 16000: Annotations Cache stats: CacheStats{hitCount=6357, missCount=9643, loadSuccessCount=9643, loadFailureCount=0, totalLoadTime=2110400, evictionCount=9130, evictionWeight=9130}
DEBUG 17000: Annotations Cache stats: CacheStats{hitCount=6395, missCount=10605, loadSuccessCount=10605, loadFailureCount=0, totalLoadTime=2253500, evictionCount=10093, evictionWeight=10093}
DEBUG 18000: Annotations Cache stats: CacheStats{hitCount=6435, missCount=11565, loadSuccessCount=11565, loadFailureCount=0, totalLoadTime=2426200, evictionCount=11049, evictionWeight=11049}
DEBUG 19000: Annotations Cache stats: CacheStats{hitCount=6455, missCount=12545, loadSuccessCount=12545, loadFailureCount=0, totalLoadTime=2587800, evictionCount=12026, evictionWeight=12026}
DEBUG 20000: Annotations Cache stats: CacheStats{hitCount=6488, missCount=13512, loadSuccessCount=13512, loadFailureCount=0, totalLoadTime=2740900, evictionCount=12996, evictionWeight=12996}
DEBUG 21000: Annotations Cache stats: CacheStats{hitCount=6514, missCount=14486, loadSuccessCount=14486, loadFailureCount=0, totalLoadTime=2881700, evictionCount=13973, evictionWeight=13973}
DEBUG 22000: Annotations Cache stats: CacheStats{hitCount=6535, missCount=15465, loadSuccessCount=15465, loadFailureCount=0, totalLoadTime=3027900, evictionCount=14953, evictionWeight=14953}
DEBUG 23000: Annotations Cache stats: CacheStats{hitCount=6569, missCount=16431, loadSuccessCount=16431, loadFailureCount=0, totalLoadTime=3189100, evictionCount=15918, evictionWeight=15918}
DEBUG 24000: Annotations Cache stats: CacheStats{hitCount=6587, missCount=17413, loadSuccessCount=17413, loadFailureCount=0, totalLoadTime=3538100, evictionCount=16901, evictionWeight=16901}
DEBUG 25000: Annotations Cache stats: CacheStats{hitCount=6612, missCount=18388, loadSuccessCount=18388, loadFailureCount=0, totalLoadTime=3688900, evictionCount=17876, evictionWeight=17876}
DEBUG 26000: Annotations Cache stats: CacheStats{hitCount=6663, missCount=19337, loadSuccessCount=19337, loadFailureCount=0, totalLoadTime=3812100, evictionCount=18825, evictionWeight=18825}
DEBUG Loaded OntologyID(Anonymous-2)
DEBUG owlParse: timing=4140
DEBUG rioParse: timing=4140
DEBUG Injecting object uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl@160d68b8
DEBUG Loading file META-INF/services/org.semanticweb.owlapi.model.OWLOntologyIRIMapper
DEBUG No files found for META-INF/services/org.semanticweb.owlapi.model.OWLOntologyIRIMapper
DEBUG Injecting values [[]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setIRIMappers(java.util.Set).
DEBUG Injecting values [[org.semanticweb.owlapi.owlxml.parser.OWLXMLParserFactory@76c2d002, org.semanticweb.owlapi.functional.parser.OWLFunctionalSyntaxOWLParserFactory@51eeae0a, org.semanticweb.owlapi.rio.RioTrigParserFactory@352d3749, org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParserFactory@23a9400c, org.semanticweb.owlapi.rio.RioRDFXMLParserFactory@61a17f3, org.semanticweb.owlapi.rio.RioTurtleParserFactory@5935eb9c, org.semanticweb.owlapi.rdf.turtle.parser.TurtleOntologyParserFactory@2c5b4b91, org.semanticweb.owlapi.rio.RioN3ParserFactory@1f4fa465, org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxOntologyParserFactory@2af1bf5a, org.semanticweb.owlapi.rio.RioNQuadsParserFactory@1e65c4d, org.semanticweb.owlapi.rio.RioJsonLDParserFactory@6731b6bd, org.semanticweb.owlapi.rio.RioRDFaParserFactory@6414eb98, org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParserFactory@55589ef5, org.semanticweb.owlapi.krss2.parser.KRSS2OWLParserFactory@1d77d9c6, org.semanticweb.owlapi.rio.RioTrixParserFactory@1a3e8b68, org.semanticweb.owlapi.rio.RioJsonParserFactory@768f2398, org.semanticweb.owlapi.rio.RioNTriplesParserFactory@6b888692, org.semanticweb.owlapi.rio.RioBinaryRdfParserFactory@793248d]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyParsers(java.util.Set).
DEBUG Injecting values [[uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl@fc6cac6]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyFactories(java.util.Set).
DEBUG Injecting values [[org.semanticweb.owlapi.rio.RioBinaryRdfStorerFactory@50b78155, org.semanticweb.owlapi.rio.RioTurtleStorerFactory@2738a1fc, org.semanticweb.owlapi.rdf.rdfxml.renderer.RDFXMLStorerFactory@538d2308, org.semanticweb.owlapi.rio.RioTrixStorerFactory@8b71052, org.semanticweb.owlapi.rio.RioN3StorerFactory@31ecd003, org.semanticweb.owlapi.krss2.renderer.KRSS2OWLSyntaxStorerFactory@481f698f, org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterSyntaxStorerFactory@723081a2, org.semanticweb.owlapi.functional.renderer.FunctionalSyntaxStorerFactory@4b99f2ed, org.semanticweb.owlapi.latex.renderer.LatexStorerFactory@45a40353, org.semanticweb.owlapi.dlsyntax.renderer.DLSyntaxStorerFactory@fe337, org.semanticweb.owlapi.rio.RioJsonLDStorerFactory@1e284d90, org.semanticweb.owlapi.rio.RioJsonStorerFactory@61c11339, org.semanticweb.owlapi.rio.RioTrigStorerFactory@3f2feab7, org.semanticweb.owlapi.rio.RioRDFXMLStorerFactory@6894436e, org.semanticweb.owlapi.dlsyntax.renderer.DLSyntaxHTMLStorerFactory@33efa7d4, org.semanticweb.owlapi.owlxml.renderer.OWLXMLStorerFactory@3d0697da, org.semanticweb.owlapi.oboformat.OBOFormatStorerFactory@356cb230, org.semanticweb.owlapi.rio.RioNTriplesStorerFactory@1a5c0b8, org.semanticweb.owlapi.rdf.turtle.renderer.TurtleStorerFactory@41ae9f11, org.semanticweb.owlapi.rio.RioNQuadsStorerFactory@5d3d5242]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyStorers(java.util.Set).
DEBUG Saving ontology as OboGraphs JSON Syntax with to IRI file:/home/harry/Bioportal/4store-export-2022-02-02/data/cf/87/./DOID_617_relaxed.json
OBO GRAPH ERROR Could not convert ontology to OBO Graph (see https://github.com/geneontology/obographs)
For details see: http://robot.obolibrary.org/errors#obo-graph-error
java.io.IOException: errors#OBO GRAPH ERROR Could not convert ontology to OBO Graph (see https://github.com/geneontology/obographs)
        at org.obolibrary.robot.IOHelper.saveOntologyFile(IOHelper.java:1720)
        at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:846)
        at org.obolibrary.robot.CommandLineHelper.maybeSaveOutput(CommandLineHelper.java:667)
        at org.obolibrary.robot.RelaxCommand.execute(RelaxCommand.java:113)
        at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:244)
        at org.obolibrary.robot.CommandManager.execute(CommandManager.java:188)
        at org.obolibrary.robot.CommandManager.main(CommandManager.java:135)
        at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:60)
caufieldjh commented 2 years ago

I think the error starts here in obographs: https://github.com/geneontology/obographs/blob/1a892a802dfb362018a7deea879ce75b54bbb563/obographs-owlapi/src/main/java/org/geneontology/obographs/owlapi/FromOwl.java#L410-L413

suggesting that lv is null in a comment in the source triples. (and maybe this block should be preceded by if (lv != null))

I know the first line of the file begins with a comment, but that's removed prior to passing it to robot.

There are 1090 <http://www.w3.org/2000/01/rdf-schema#comment> predicates in the DOID RDF - some are not explicitly XMLSchema#string, e.g.,

<http://purl.obolibrary.org/obo/SYMP_0000051> <http://www.w3.org/2000/01/rdf-schema#comment> "doid/symp duplicate" .
caufieldjh commented 2 years ago

Tried this but the output seemed to be missing too much content:

robot remove -vvv --input e67d70df45f6f4cc5b70b1296091 --axioms annotation --output DOID_617_fixed.json

Including --trim false raised a similar error as before:

robot remove -vvv --input e67d70df45f6f4cc5b70b1296091 --axioms annotation --trim false --output DOID_617_fixed.json
...
OBO GRAPH ERROR Could not convert ontology to OBO Graph (see https://github.com/geneontology/obographs)
For details see: http://robot.obolibrary.org/errors#obo-graph-error
java.io.IOException: errors#OBO GRAPH ERROR Could not convert ontology to OBO Graph (see https://github.com/geneontology/obographs)
        at org.obolibrary.robot.IOHelper.saveOntologyFile(IOHelper.java:1720)
        at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:846)
        at org.obolibrary.robot.CommandLineHelper.maybeSaveOutput(CommandLineHelper.java:667)
        at org.obolibrary.robot.RemoveCommand.execute(RemoveCommand.java:202)
        at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:244)
        at org.obolibrary.robot.CommandManager.execute(CommandManager.java:188)
        at org.obolibrary.robot.CommandManager.main(CommandManager.java:135)
        at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:60)

Alternate option: http://robot.obolibrary.org/query#sparql-update Other alternate: just parse the file and remove offending lines with a regex prior to robot relax

caufieldjh commented 2 years ago

This should work:

robot remove -vvv --input e67d70df45f6f4cc5b70b1296091 --term rdfs:comment --output DOID_617_fixed.json