[Bioperl-l] get_Stream_by_gi: Memory going up every call.

Jelle86 snaphit at planet.nl
Thu Oct 25 04:07:00 EDT 2007

I have a problem when using Bio::DB::GenBank->get_Stream_by_gi . My usage
memory for the perl script keeps going up each time a piece of the list is
I have a gilist, that consist of about 1300 gi's, and i split it in pieces
of 100gi's since get_stream_by_gi doesn't work on more than 300 or so (don't
know why..). 
But either way, using this constructing makes the script take more and more
memory each time 100entries are downloaded. For 1300 gi's not a problem, but
i'm planning on doing it for at least 200.000 gi's.
How can i solve it. At the end of the end of the loops and end of the usage
of the package genbankQuery I empty all the used objects with undef. 
Below are some snippets of my code. Is there a way to find out what actually
causes the problem and more how to solve it?

I use:
behind a proxy

  while (@small_list = splice(@{$gilist_ref->{gilist}}, 0, 100)) {
  $smallref=shift;#contains @small_list ref.
  my $query = genbankQuery->new(ids=>$smallref);
  my $part_result = $query->streamQuery();
  my $self = {
			ids => '',			
  my $stream_obj = $self->{gb}->get_Stream_by_gi(\@ids);
  my $seq_obj;       
  #Step through the results 
  while ($seq_obj = $stream_obj->next_seq) {
    #make lines from features and return them in an array ref
View this message in context: http://www.nabble.com/get_Stream_by_gi%3A-Memory-going-up-every-call.-tf4689188.html#a13401838
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.

More information about the Bioperl-l mailing list