Re: EMBL file with space before quoted, multi-line qualifier value

"Fields, Christopher J" <[email protected]>
Newsgroups gmane.comp.lang.perl.bio.general
Message-ID <[email protected]>
On Apr 9, 2015, at 8:03 AM, Adam Sjøgren <[email protected]> wrote:
> 
> Adam writes:
> 
>> -        my( $qualifier, $value ) = m{^/([^=]+)(?:=(.+))?}
>> +        my( $qualifier, $value ) = m{^/([^=]+)*(?:=\s*(.+))?}
>                                                 |
> I got a '*' to many there -----------------------'
> 
> I (only) meant to add the '\s*' after the '=':
> 
> +        my( $qualifier, $value ) = m{^/([^=]+)(?:=\s*(.+))?}
> 
> Sorry!
> 
> -- 
>                                                          Adam Sjøgren
>                                                    [email protected]

As long as this passes current tests I don’t have a problem with adding it in.  I would suggest adding a simple test case for it; you could modify a current EMBL file in the data directory if needed for a test case, probably no need to add a new file.

I’ve long felt there's a fine line between having a parser being a strict validation tool and having it be flexible enough to allow for idiosyncrasies from various tools (e.g. see any GenBank output from anywhere).  I tend to veer in the direction of flexibility within reason; having a test suite helps quite a bit.

chris

_______________________________________________
Bioperl-l mailing list
[email protected]
http://mailman.open-bio.org/mailman/listinfo/bioperl-l
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.