[Bioperl-l] how to suppress Bioperl exceptions

Mark A. Jensen maj at fortinbras.us
Sat Apr 11 15:32:16 UTC 2009


missed the list.
----- Original Message ----- 
From: "Mark A. Jensen" <maj at fortinbras.us>
To: "云 何" <jarodpardon at yahoo.com.cn>
Sent: Saturday, April 11, 2009 10:52 AM
Subject: Re: [Bioperl-l] how to suppress Bioperl exceptions


> Hey Jarod-
> You can try setting the verbosity of the object negative, as
>
> $seqio->verbose(-1);
>
> I've found, though, that the warning messages still come through
> sometimes. I've gotten control of these using the Error package:
>
> use Error qw(:try);
>
> try {
>    $seqio = Bio::SeqIO->new(-file='my.fas');
> }
> catch Error with {
>    my $e = shift;
>    # $e->test will contain the message
> };
>
> Note the lack of ; after the try block, and the
> presence thereof after the catch block.
>
> cheers -Mark
> ----- Original Message ----- 
> From: "云 何" <jarodpardon at yahoo.com.cn>
> To: <Bioperl-l at lists.open-bio.org>
> Sent: Saturday, April 11, 2009 9:50 AM
> Subject: [Bioperl-l] how to suppress Bioperl exceptions
>
>
>>
>> Hi, all,
>> I use Bio::SeqIO driver to parse data files. The input data is somewhat 
>> buggy, and some of entries are not strict in format. The parser will throw 
>> exceptions and halt when meeting these bad entries. However, I want to just 
>> skip these entries, not stop there. So how to suppress exceptions?
>> Thanks.
>>
>> Jarod
>>
>>
>>
>>      ___________________________________________________________
>>  好玩贺卡等你发,邮箱贺卡全新上线!
>> http://card.mail.cn.yahoo.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