[Bioperl-l] swissprot giving no id exception

Jason Stajich jason@cgt.mc.duke.edu
Fri, 12 Apr 2002 21:26:54 -0400 (EDT)


Which version of bioperl?

On Fri, 12 Apr 2002, Guoneng Zhong wrote:

> Hi,
> I am wondering if others have this problem.  Here's my code, followed by
> the exception thrown.  I get the same exception when I try to do a
> next_seq on the sequenceIO object.  The array of ids I send is verified
> to contain non-empty ids.  Now, I can't guarantee tht those ids are
> valid, but if they are not, must an exception be thrown to ruin the
> whole process?  I tried to "catch" the exception using "eval" but
> stranger things happen, like next_seq would give me the same sequence
> again!
>
> Thanks in advance!
> G
>
> 		my $sp = new Bio::DB::SwissProt;
> 		my $sequenceIO = $sp->get_Stream_by_acc(\@ids);
> 		my $fh = $sequenceIO->fh;
> 		my $tmp = <$fh>;
>
>
> -------------------- EXCEPTION --------------------
> MSG: swissprot stream with no ID. Not swissprot in my book
> STACK Bio::SeqIO::swiss::next_seq /Library/Perl/Bio/SeqIO/swiss.pm:155
> STACK Bio::SeqIO::READLINE /Library/Perl/Bio/SeqIO.pm:570
> STACK HypotheticalProteinSearch::retrieveSequences
> HypotheticalProteinSearch.pm:37
> STACK main::retrieveList retrieve_gpi.pl:54
> STACK toplevel retrieve_gpi.pl:14
> -------------------------------------------
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

-- 
Jason Stajich
Duke University
jason@cgt.mc.duke.edu