bioperl-live icon indicating copy to clipboard operation
bioperl-live copied to clipboard

Error thrown in OBO file parsing

Open AndyMenzies opened this issue 4 years ago • 2 comments

When parsing OBO ontology files the following block is causing issues

https://github.com/bioperl/bioperl-live/blob/757470f70f0cc64a53576762d47ca88cbfb2f703/lib/Bio/OntologyIO/obo.pm#L248

The error message states that a term has no ID or name, and that the term will be ignored. However it does this via a $self->throw call which raises an exception and causes the parsing to be unavoidably interrupted. The throw call is followed by a next which would skip the term if it could get there.

Which behaviour is intended? Is the malformed term supposed to be skipped, or is the parser supposed to error out?

AndyMenzies avatar Apr 28 '20 14:04 AndyMenzies

@AndyMenzies can you point to an example file throwing the error so this could be tested?

cjfields avatar Aug 06 '20 01:08 cjfields

@cjfields I think I was trying to parse Uberon at the time, its quite large and I don't have a concise file that triggers the problem.

http://purl.obolibrary.org/obo/uberon/ext.obo

AndyMenzies avatar Aug 06 '20 08:08 AndyMenzies