[Bioperl-l] 1.3.02 failed tests

Hilmar Lapp hlapp at gnf.org
Wed Oct 22 15:25:40 EDT 2003


On 10/22/03 11:40 AM, "Allen Day" <allenday at ucla.edu> wrote:

>> Allen, your recent change to require only 1 digit instead of 3 after
>> the colon broke the parser. The change makes the regular expressions
>> pick up EC numbers as secondary GO accessions. Did the test quoted
>> below not fail on your machine?
> 
> i tested my changes on Ontology.t and OntologyEngine.t, i didn't see
> simpleGOparser.t, and so didn't run it before i checked in.  it does fail
> on my machine.

It's generally not a bad idea to run *all* tests before checking in, as
bioperl is so complex meanwhile that it is difficult to predict with
certainty what knock-on effects a change may or may not have. Yes I know
running all tests takes a while and is painful, but I don't think there is a
good reason not to.

> 
>> I'm going to reverse that change. The MPATH ontology needs to be
>> accommodated in a way that doesn't break the parser, possibly by having
>> its own.
> 
> i keep loosening the regular expression to accommodate the different
> DAG-Edit IDs i enounter.  how about i write a regular expression that is
> as strict as possible but still matches everything that DAG-Edit allows?

Sure, you'd be welcome. Note though that non-conforming or
not-so-well-conforming formats may clearly justify their own parser in order
to avoid making a brittle one-catch-all monolithic parser. Also, complex
regular expressions have a tendency to become arcane and impossible to
maintain, so I'm actually not a big fan of coming up with ever more
sophisticated patterns with all kinds of subtle recognition features.

Rather, I'd try to find a pattern that identifies the token as an ID,
whether seconday ID or dbxref ID, and then leave it up to a method that may
be overridden to actually parse the ID and assign it to one of the term's
properties. (You'd then have 2 parsers, which would share most of the code
though.)

Event-based parsing may also be a way out, but that'd be big change.

    -hilmar

> 
>> Also, I should urge you to add test cases for all the ontologies for
>> which you found yourself having to adapt the parser. Otherwise the
>> ability to parse those too may be abolished silently at any time by
>> anyone changing the code.
>> 
> 
> sure.
> 
> -allen
> 
>> -hilmar
>> 
>> On Tuesday, October 21, 2003, at 06:57  PM, Jason Stajich wrote:
>> 
>>> I also get this on perl 5.8.0
>>> 
>>> not ok 11
>>> # Test 11 got: <UNDEF> (t/simpleGOparser.t at line 82)
>>> #    Expected: 'EC:5.3.99.5'
>>> 
>>> 
>>> and perl 5.6.0
>>> not ok 11
>>> # Test 11 got: <UNDEF> (t/simpleGOparser.t at line 82)
>>> #    Expected: 'EC:5.3.99.5'
>>> 
>>> 
>>> On Tue, 21 Oct 2003, Hilmar Lapp wrote:
>>> 
>>>> On 10/18/03 6:34 PM, "Rob Edwards" <redwards at utmem.edu> wrote:
>>>> 
>>>>> t/simpleGOparser.t               88    1   1.14%  11
>>>> 
>>>> Do these just fail under Mac OSX perl 5.8.x? I can only check for perl
>>>> 5.6.0.
>>>> 
>>>>     -hilmar
>>>> 
>>> 
>>> --
>>> Jason Stajich
>>> Duke University
>>> jason at cgt.mc.duke.edu
>>> 
>> 
> 
> 
> 
> 

-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------





More information about the Bioperl-l mailing list