[Bioperl-l] error from GenBank

Rob Edwards rob at salmonella.org
Wed Dec 29 11:40:21 EST 2004


Wrap line 37 of harvest_LAB_ORF.pl in an eval like this

eval {...get sequences...};
if ($@)
{
  # this will catch the error and warn you but not stop the script
  print STDERR "There were no sequences for x\n";
  next;
}


On Dec 29, 2004, at 8:31 AM, Stefan Weckx wrote:

> hi all,
>
> does anybody have experience with this:
>
> I'm retrieving data from GenBank (protein/nucleotide) using 
> Bio::DB::Query::GenBank within a loop, based on a list of taxonomy ids 
> referring to bacterial strains. In case there is no data in GenBank 
> for a certain strain, I get an error message (see below) and the 
> script terminates ... which is not the behaviour I would like to see, 
> since there are still other taxid's waiting for being queried ...
>
> more specifically, the Bio::DB::Query::GenBank query itself runs ok, 
> only while extracting data with e.g. "my $count = $query->count" the 
> error message appears and the script terminates.
>
> Suggestions to work around this are welcome!
>
> cheers
> Stefan
>
> error message:
>
> Warning(s) from GenBank:
>                <PhraseNotFound>txid267364</PhraseNotFound>
> ------------- EXCEPTION  -------------
> MSG: Error from Genbank: No items found.
> STACK Bio::DB::Query::GenBank::_parse_response 
> /usr/lib/perl5/site_perl/5.8.0/Bio/DB/Query/GenBank.pm:267
> STACK Bio::DB::Query::WebQuery::_run_query 
> /usr/lib/perl5/site_perl/5.8.0/Bio/DB/Query/WebQuery.pm:268
> STACK Bio::DB::Query::WebQuery::_fetch_ids 
> /usr/lib/perl5/site_perl/5.8.0/Bio/DB/Query/WebQuery.pm:239
> STACK Bio::DB::Query::WebQuery::ids 
> /usr/lib/perl5/site_perl/5.8.0/Bio/DB/Query/WebQuery.pm:205
> STACK toplevel ./harvest_LAB_ORF.pl:37
> --------------------------------------
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list