[Bioperl-l] tempfile problem with standalone blast
Gopal
gopal.cshl at gmail.com
Fri Jun 4 17:51:04 UTC 2010
Hi Chris,
I followed your suggestion and changed the loop into:
On Fri, Jun 4, 2010 at 12:44 PM, Chris Fields <cjfields at illinois.edu> wrote:
>
> > while( my $input = $seqio_obj->next_seq() ) {
> > #
> > $blast_report = $blast_obj->blastall($input);
> >
> > push(@reports,$blast_report);
> >
> > }
> > ...
>
> Yep, you're caching your SearchIO instances here. No need;
while( my $input = $seqio_obj->next_seq() ) {
$blast_report = $blast_obj->blastall($input);
while(my $result=$blast_report->next_result){
Now no objects are cached in arrays. The script worked fine with one genome
already and the other is running.
thanks for cleaning things up. I will remember to avoid this snag.
best,
-gopal
> if you want to cache you should cache the Result object instead. Something
> like
>
> push(@reports, $blast_report->next_result);
>
> Probably best to rethink this strategy unless you have absolutely no other
> way to deal with your data, if you have lots of BLAST reports you will suck
> up memory very quickly.
>
> > --
> > Gopal Gopinathrao, PhD
> > Bioinformaticist / Biologist
> > CFSAN, US FDA
> > www.patrn.net/patrn
> > gopal.gopinathrao at fda.hhs.gov
> > P: 301-210-7881
>
>
> chris
--
Gopal Gopinathrao, PhD
Bioinformaticist / Biologist
CFSAN, US FDA
www.patrn.net/patrn
gopal.gopinathrao at fda.hhs.gov
P: 301-210-7881
More information about the Bioperl-l
mailing list