[Bioperl-l] How to get rid of warnings

Chris Fields cjfields at uiuc.edu
Fri Aug 18 11:06:28 EDT 2006


Jeremy,

Looks like Sendu is fixing this in CVS.  The warning didn't use BioPerl's
built-in error handling.

Chris

> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Jérémy JUST
> Sent: Friday, August 18, 2006 8:52 AM
> To: bioperl-l at lists.open-bio.org
> Subject: [Bioperl-l] How to get rid of warnings
> 
> 
>     Hello,
> 
>   I can't manage to get rid of all warnings during a query from GenBank
> with BioPerl 1.4. When the query doesn't give any result, I catch the
> exception, but there is still a warning that is issued to STDERR.
> 
>   This is my code:
> 
> <<<<<<<<
> #!/usr/bin/perl
> 
> use strict ;
> use warnings ;
> 
> use Bio::DB::GenBank ;
> 
> my $gb = Bio::DB::GenBank->new( -verbose => -1 ) ;
> 
> my $query = Bio::DB::Query::GenBank->new
>                (-query   => "FooBar",
>                 -db      => 'nuccore',
>                 -verbose => -1
>                ) ;
> 
> my $seqio ;
> eval
>   {$seqio = $gb->get_Stream_by_query( $query ) ;
>   } ;
> 
> if ( $@ )
>   {print STDERR "Cannot find a sequence for FooBar\n" ;
>   }
> 
> exit 0 ;
> >>>>>>>>
> 
> and the unwanted warning is:
> <<<<<
> Warning(s) from GenBank:
>                 <PhraseNotFound>FooBar</PhraseNotFound>
> >>>>>
> 
>   How could I set verbosity so that I don't get this warning?
> 
> 
>   Thanks,
> 
> --
> Jérémy JUST  <jeremy_just at netcourrier.com>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list