[Bioperl-l] StandAloneBlast : 2 newbie questions

Jason Stajich jason@chg.mc.duke.edu
Mon, 18 Jun 2001 17:04:36 -0400 (EDT)


On Mon, 18 Jun 2001, Peter Schattner wrote:

> Alexandre Irrthum wrote:
> 
> > Two naive questions about the StandAloneBlast module.
> >
> > In the following script, the call to blastall doesn't seem to work
> > because I modify the input record separator variable $/.
> 
> I believe that $/ is a global variable in perl and consequently I would
> not be surprised that changing its value might well confuse any bioperl
> modules that input and parse data (such as BPlite.pm or Blast.pm, and,
> implicitly, StandAloneBlast.pm) .  To accomplish what I think you are
> trying to do I would set $/ = ".." in your script immediately before your
> input statement where you want the atypical record separator, and I would
> return it to its default value, $/ = "\n"  as soon as you are finished
> and definitely before you start calling bioperl modules that do their own
> I-O.  Hopefully that should help.
> 
> >
> > I have to perform a large number a blast iterations and would like
> > to avoid accumulation of temporary input sequence files in /tmp.
> > Can I get the name of these files after each iteration to unlink them,
> > or is there another way ?
> 
> Interesting question that I don't have a good answer to.  Can you help on
> this, Jason?
> 
Simpliest way is to use the private method _io_cleanup even though this is
probably bad programming practice since you are calling a private method.

So after each round of blastall (or whatever you are calling) call
$factory->_io_cleanup();

and you *SHOULD* have your tempfiles cleaned up.  

BioPerl: Should this behavior be required at the end of each _run call in 
         StandAloneBlast instead?  Or maybe it is a flag one can toggle to
         cleanup after each run?

> - Peter
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
> 

Jason Stajich
jason@chg.mc.duke.edu
Center for Human Genetics
Duke University Medical Center 
http://www.chg.duke.edu/