[Bioperl-l] swissprot giving no id exception

Guoneng Zhong Guoneng.Zhong@med.nyu.edu
Mon, 15 Apr 2002 11:37:28 -0400


No, I wasn't expecting anyone to debug it.  More like Jason wanted to 
see what I was doing.  Like I said, I used the get_seq_by_acc instead of 
the get_Stream_by_acc, and it is working fine with no exception.  I was 
curious to know why mine didn't work with using Stream.  Sorry!  Didn't 
mean to bug anyone to debug my code.

Thanks to all!
G

On Monday, April 15, 2002, at 11:26 AM, Ewan Birney wrote:

> On Mon, 15 Apr 2002, Guoneng Zhong wrote:
>
>> Oh right, I looked at your code earlier and I see that it is -verbose
>> and I put in verbose.  I replaced the stream method with accessing each
>> id at a time.  That way worked with no problem, so it can't be the
>> accession numbers.  So it's working now, but it didn't work using the
>> following code:
>>
>> 	while(@subarr = splice @ids,0,$MAX_IDS_SENT){
>> 		print "Starting a another batch...\n";
>> 		my $sp = new Bio::DB::SwissProt;
>> 		my $sequenceIO = $sp->get_Stream_by_acc(\@ids);
>> 		my $seqObj = 1;
>> 		while($seqObj){
>> 			eval{
>> 				$seqObj = $sequenceIO->next_seq();
>> 				if($seqObj){
>> 					push @seqs,$seqObj;
>> 					print $seqObj->primary_id."\n";
>> 				}
>> 			};
>> 			print "uh oh:\n$@\n" if($@);
>> 		}
>> 	}
>>
>>
>> Do you see anything wrong?  The exception is thrown only at the last
>> round of the outer while loop when the remaining ids were sent to
>> creating the stream.  There were 70 ids to start with, and 25 were sent
>> each time (apparently this DB object only allows something like 50 ids
>> sent at a time).
>
> What was the exception? Same again?
>
>
> Have you made use of perl -d to debug
>
>
> in general people wont really have to time to debug your own code here, 
> so
> please make sure that you think the bug truely is in bioperl before you
> just post here as soon as things go wrong. (or rather, feel free to 
> post,
> but don't expect other people to find your bugs... ;)).
>
>
>
>
>>
>> G
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l@bioperl.org
>> http://bioperl.org/mailman/listinfo/bioperl-l
>>
>
> -----------------------------------------------------------------
> Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
> <birney@ebi.ac.uk>.
> -----------------------------------------------------------------
>