[Bioperl-l] Failed tests for FeatureIO

Chris Fields cjfields at uiuc.edu
Mon Sep 25 11:19:37 EDT 2006


Torsten, Sendu,

Sendu's fix makes sense; if I just iterate through the lines of  
test.ptt using $self->readline() using a while loop, this is what I  
get for the first lines:

Leptospira interrogans serovar Lai str. 56601 chromosome II, complete  
sequence - 0..358943
g protein
46207..47850    +       547     24217118        batD    LB057    
-       -       BatD
47847..49670    +       607     24217119        htpG2   LB058    
-       COG0326O        heat shock protein 90
....

It skipped a ton of lines.  The combination of the mode() bug and  
_readline() did it.

Chris

On Sep 25, 2006, at 10:02 AM, Sendu Bala wrote:

> Torsten Seemann wrote:
>> Chris,
>>
>>> I am getting failed tests for FeatureIO.t on make test using  
>>> bioperl-
>>> live on Mac OS X (10.4.7, perl 5.8.6):
>>> pyr:~/src/bioperl-live cjfields$ perl -I. -w t/FeatureIO.t
>>> ------------- EXCEPTION: Bio::Root::Exception -------------
>>> MSG: Invalid protein count
>>> STACK: Error::throw
>>> STACK: Bio::Root::Root::throw Bio/Root/Root.pm:331
>>> STACK: Bio::FeatureIO::ptt::_initialize Bio/FeatureIO/ptt.pm:147
>>> STACK: Bio::FeatureIO::new Bio/FeatureIO.pm:266
>>> STACK: Bio::FeatureIO::new Bio/FeatureIO.pm:286
>>> STACK: t/FeatureIO.t:189
>>> -----------------------------------------------------------
>>
>> Hmmm, I committed that module last week. I just did a fresh  
>> complete checkout
>> of current CVS, and all the tests pass fine for me on Linux 2.6 +  
>> Perl 5.8.5 ?
>
> The problem is your use of Bio::Root::IO::mode. Your's is the only
> module in bioperl that seems to use it, and for good reason: it was
> broken. I've fixed it and tested under Linux and Mac OS X, not tried
> Windows but hopefully that's ok too.
>
> (Briefly, mode() would call IO::Handle::getline which would return a
> seemingly random (but consistent per platform) line from the file, and
> then mode() would happily push that random line into the buffer.  
> Worse,
> under Mac OS X, getlines() would leave Root::IO's filehandle at the
> point after that random line, so all subsequent _readline's would be
> from the wrong point in the file)
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign





More information about the Bioperl-l mailing list