[Bioperl-l] Failed tests for FeatureIO

Sendu Bala bix at sendu.me.uk
Mon Sep 25 15:02:25 UTC 2006


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)



More information about the Bioperl-l mailing list