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

Jelle86 snaphit at planet.nl
Thu Oct 25 08:07:00 UTC 2007


Hi, 
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
downloaded. 
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:
perl 5.8.8.822
bioper1.5.2
winxp
behind a proxy


=========
ESTdownload;
makeChunks(){
  while (@small_list = splice(@{$gilist_ref->{gilist}}, 0, 100)) {
        $self->callStream(\@small_list);
 }
}
callStream(){
  $smallref=shift;#contains @small_list ref.
  my $query = genbankQuery->new(ids=>$smallref);
  my $part_result = $query->streamQuery();
}
=========
genbankQuery;
new{
  
  my $self = {
			ids => '',			
			@_,					
		    };
  $self->{gb}=Bio::DB::GenBank->new();
}
streamQuery(){
  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