Phenomics / ontolib

A modern Java library for working with (biological) ontologies.
https://ontolib.readthedocs.org
Other
9 stars 2 forks source link

Parse error for hp.obo caused by Date format #13

Closed pnrobinson closed 7 years ago

pnrobinson commented 7 years ago

[INFO] [08-31-2017 15:33:59] (OboParser.java:70) - Parsing OBO file /home/robinp/data/hpo/hp.obo... Exception in thread "main" com.github.phenomics.ontolib.base.OntoLibRuntimeException: Problem parsing date string 2008-02-27T02:20:00Z at com.github.phenomics.ontolib.io.obo.hpo.HpoOboFactory.constructTerm(HpoOboFactory.java:141) at com.github.phenomics.ontolib.io.obo.hpo.HpoOboFactory.constructTerm(HpoOboFactory.java:49) at com.github.phenomics.ontolib.io.obo.OboImmutableOntologyLoader$HelperListener.parsedStanza(OboImmutableOntologyLoader.java:372) at com.github.phenomics.ontolib.io.obo.OboParserListener.exitStanza(OboParserListener.java:188) at de.charite.compbio.ontolib.io.obo.parser.Antlr4OboParser$StanzaContext.exitRule(Antlr4OboParser.java:604) at org.antlr.v4.runtime.Parser.triggerExitRuleEvent(Parser.java:408) at org.antlr.v4.runtime.Parser.exitRule(Parser.java:642) at de.charite.compbio.ontolib.io.obo.parser.Antlr4OboParser.oboFile(Antlr4OboParser.java:214) at com.github.phenomics.ontolib.io.obo.OboParser.parseInputStream(OboParser.java:119) at com.github.phenomics.ontolib.io.obo.OboParser.parseFile(OboParser.java:71) at com.github.phenomics.ontolib.io.obo.OboImmutableOntologyLoader.load(OboImmutableOntologyLoader.java:100) at com.github.phenomics.ontolib.io.obo.hpo.HpoOboParser.parse(HpoOboParser.java:75) at org.monarchinitiative.lr2pg.hpo.HPOParser.parseOntology(HPOParser.java:31) at org.monarchinitiative.lr2pg.LR2PG.parseHPOData(LR2PG.java:41) at org.monarchinitiative.lr2pg.LR2PG.(LR2PG.java:34) at org.monarchinitiative.lr2pg.LR2PG.main(LR2PG.java:26) Caused by: java.text.ParseException: Unparseable date: "2008-02-27T02:20:00Z" at java.text.DateFormat.parse(DateFormat.java:366) at com.github.phenomics.ontolib.io.obo.hpo.HpoOboFactory.constructTerm(HpoOboFactory.java:139)

holtgrewe commented 7 years ago

Can you try whether the fix in the feature/ontolib-cli branch fixes the parsing?

It works for me with the latest release.

holtgrewe commented 7 years ago

Fixed by #14. Will make a new release tomorrow.

pnrobinson commented 7 years ago

This works fine now with version v0.2