[Bioperl-l] Bio::DB:: queries

Hilmar Lapp hlapp at gnf.org
Tue Jun 10 12:41:44 EDT 2003


Does that still hold if you submit a batch of accs, some of which could
not be found?


	-hilmar

> -----Original Message-----
> From: Jason Stajich [mailto:jason at cgt.duhs.duke.edu] 
> Sent: Tuesday, June 10, 2003 11:52 AM
> To: Prachi Shah
> Cc: bioperl
> Subject: Re: [Bioperl-l] Bio::DB:: queries
> 
> 
> The differences in your code would be:
> 
> foreach my $acc ( @acc ) {
>   eval {
>    $seq = $db->get_Seq_by_acc($acc);
>   };
>   if( $@) {
>     print STDERR "skipping $acc, it could not be found\n";
>     next;
>   }
> 
> }
> 
> OR
> 
> foreach my $acc ( @acc ) {
>   my $seq = $db->get_Seq_by_acc($acc);
>   if( ! $seq ) {
>    print STDERR "skipping $acc, it could not be found\n";
>    next;
>   }
> }
> 
> 
> If you call get_Stream_by_acc([@listofaccs]) I don't think it 
> will currently throw an exception, just if the entire query fails.
> 
> -jason
> On Tue, 10 Jun 2003, Prachi Shah wrote:
> 
> > I would be happier if warnings were sent out instead
> > of exceptions. If we are using a large accession list,
> > it is quite likely that there will be atleast some
> > accessions which may belong to some other database or 
> something like 
> > it.
> >
> > Prachi.
> >
> >
> > --- Jason Stajich <jason at cgt.duhs.duke.edu> wrote:
> > > Does it make sense for us to be throwing exceptions
> > > when an accession or
> > > id is not found in a db search (i.e.
> > > Bio::DB::GenBank) or give a warning
> > > (which can be silenced with -verbose => -1) and
> > > return undef?
> > >
> > > Do people have a strong feeling one way or another
> > > here?
> > > -jason
> > >
> > > --
> > > Jason Stajich
> > > Duke University
> > > jason at cgt.mc.duke.edu 
> > > _______________________________________________
> > > Bioperl-l mailing list
> > > Bioperl-l at portal.open-bio.org
> > >
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Calendar - Free online calendar with sync to Outlook(TM). 
> > http://calendar.yahoo.com 
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org 
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >
> 
> --
> Jason Stajich
> Duke University
> jason at cgt.mc.duke.edu 
> _______________________________________________
> 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