sheenams/Bio-AGP — Issue #2: agp_parse with validate_syntax => 1 can be problematic
Author: dbolser
Created: 2011-11-21 20:19:25+00:00
State: open

My AGP has a few blank lines that cause errors to be output when validate_syntax => 1. Fair enough. However, I'd still like agp_parse to return the lines that it *was* able to parse, rather than return nothing. Basically, blank lines aren't that big a deal, and I'd like to check syntax but ignore such 'warnings'.

The above is more of a feature request, but the following is a bug I think.

When I pass an AGP file with multiple 'objects', i.e. the AGP for a set of chromosomes rather than the AGP for just one chromosome, I get warnings from the parser (and no output as a consequence). AGP for multiple objects is valid AGP syntax.

The warnings are related to 'non sequential component identifiers' IIRC. Basically the parser should notice that the object has changed and reset those checks (and probably check for non-contiguous object identifiers too).

I can get round these problems by just turning off validate_syntax, but I'd really rather not do that.

One final thing, the POD says:
validate_syntax => if true, error if there are any syntax errors,

However, it isn't clear what an 'error' is (i.e. do you mean, die, warn, return 0 or undef, or something else). OK, it's clarified later on. Ignore me.

Thanks for the otherwise excellent software :D
Dan.