[Bioperl-l] swissprot giving no id exception

Guoneng Zhong Guoneng.Zhong@med.nyu.edu
Fri, 12 Apr 2002 13:35:41 -0400


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
-------------------------------------------