[Bioperl-l] Re: more on Genscan.pm
Hilmar Lapp
hlapp@gmx.net
Fri, 30 Nov 2001 08:18:24 -0800
"Osborne, Brian" wrote:
>
> Hilmar,
>
> One thing that's nice about this module is that I can ask if something's
> defined, and avoid fatalities :
>
> $genscan = Bio::Tools::Genscan->new( -file => "test" );
> while ( $gene = $genscan->next_prediction ({
> my $pep = $gene->predicted_protein;
> print $pep->display_id if ( defined $pep );
> }
> But, I can't seem to be able to test for "defined $genscan". This test is
> useful when confronted with a file like the one I'm attaching.
> <<test.genscan>>
>
(Note: the file was a prediction with only one promoter, and hence
no sequence predicted at all. The parser crashed on this one, as
well as complaining about a number of undefined values when using
-w.)
Brian, this was obviously a bug. I fixed it on main trunk as well
as 0.7.x branch. I still have to add the according test for it.
(BTW feel free to add this yourself to the Genscan tests if you
feel up to it.)
-hilmar
--
-----------------------------------------------------------------
Hilmar Lapp email: hilmarl@yahoo.com
San Diego, Ca. 92130 phone: +1 858 812 1757
-----------------------------------------------------------------