[Bioperl-l] How put tmp file in the tmp directory when using Bio::Tools::Run::StandAloneBlastPlus?

Chris Fields cjfields at illinois.edu
Sun Jun 6 23:37:32 UTC 2010


Peng,  

You really need to read all relevant documentation prior to firing off emails to the list.  This is answered in the StandAloneBlastPlus installed documentation ('perldoc Bio::Tools::Run::StandAloneBlastPlus'):

 Cleaning up temp files
       Temporary analysis files produced under a single factory instances can
       be unlinked by running

        $fac->cleanup;

       Tempfiles are generally not removed unless this method is explicitly
       called. "cleanup()" only unlinks "registered" files and databases. All
       temporary files are automatically registered; in particular,
       "anonymous" databases (such as

        $fac->Bio::Tools::Run::StandAloneBlastPlus->new(
          -db_data => 'myseqs.fas',
          -create => 1
        );

       without a "-db_name" specification) are registered for cleanup. Any
       file or database can be registered with an internal method:

        $fac->_register_temp_for_cleanup('testdb');



chris

On Jun 6, 2010, at 5:52 PM, Peng Yu wrote:

> The following perl program generate tmp files at the current
> directory, which is annoying. Is there a way to put the tmp files in a
> tmp directory say /tmp?
> 
> #!/usr/bin/env perl
> 
> use strict;
> use warnings;
> use Bio::Tools::Run::StandAloneBlastPlus;
> use Bio::Perl;
> 
> my $factory = Bio::Tools::Run::StandAloneBlastPlus->new();
> 
> my $seq1 = Bio::Perl::read_sequence('first.fa');
> my $seq2 = Bio::Perl::read_sequence('second.fa');
> print $seq1->seq, "\n";
> print $seq2->seq, "\n";
> 
> my $blast_result=$factory->bl2seq(-method=>'blastn',
>  -query=> $seq1,
>  -subject=> $seq2
> );
> 
> -- 
> Regards,
> Peng
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list