[Bioperl-l] Bio::DB::GenBank question

Jason Stajich jason.stajich at gmail.com
Sat Jul 24 16:41:30 UTC 2010


Hi. You should ask questions to the list. There are many who can  
answer your question there.

In the older versions you can put the retrieve statement in an eval  
block. I think newer behavior may be only to issue a warning and keep  
going.

You may be able to also set verbose to -1 (-verbose => -1) in the  
initialization of the db obj and see whether it skips or fails on  
missing ID.
  -Jason.
Sent from my iPod

On Jul 23, 2010, at 6:48, Hongseok Tae <htae at vbi.vt.edu> wrote:

> Hi Jason Stajich,
>
> I am using Bioperl and it is very useful. I have a question about  
> Bio::DB::GenBank.
> This is a simple code.
>
> --------------------------
>
> $db = Bio::DB::GenBank->new();
> @ids = ("LOC441435", "X78121");
> foreach $id (@ids){
> $seqobj = $db->get_Seq_by_id($id);
> $seqstr   = $seqobj->seq();
> print "$>id\n$seqstr\n";
> }
>
> --------------------------
>
> If there is no entry for an ID, I would like to skip it and to get  
> next one. But this code stops running when an ID does not exist in  
> genbank.
> How can I solve this problem?
>
> Thanks.
> Hongseok Tae
>



More information about the Bioperl-l mailing list