zaeleus / noodles

Bioinformatics I/O libraries in Rust
MIT License
512 stars 53 forks source link

GFF parser does not allow application-specific directives #190

Closed J-Wall closed 1 year ago

J-Wall commented 1 year ago

According to the GFF spec, "Application specific directives are allowed, but are not required to be supported by parsers".

It's unclear whether the second part of that sentence means that the concept of application-specific directives needn't be supported, or that particular application-specific directives needn't be supported, although the latter seems more reasonable to me.

I propose removing noodles::gff::directive::ParseError::InvalidName, and instead introduce something like noodles::gff::directive::ApplicationSpecific(ApplicationSpecificDirective), where ApplicationSpecificDirective holds the (custom) name of the directive, and a free-form String value.

zaeleus commented 1 year ago

Thanks for the report! noodles 0.47.0 / noodles-gff 0.18.0 now supports nonstandard directives via Directive::Other(other::Name, Option<String>).