[Bioperl-l] Re: [Bioperl-guts-l] Error in tempfile() using /tmp/XXXXXXXXXX: Could not create temp /usr/local/lib/perl5/site_perl/5.6.1/Bio/Root/IO.pm line 614

Jason Stajich jason at cgt.mc.duke.edu
Wed Apr 2 20:21:55 EST 2003


This is a known and reported bug - I think it is covered in Bugzilla -
http://bugzilla.bioperl.org

Upgrade to bioperl-1.2.1  - should be a link on the main page,
http://bioperl.org/DIST/bioperl-1.2.1.tar.gz
otherwise.

-jason

On Wed, 2 Apr 2003, Nicolas Bertin wrote:

> Hi,
>
> i am experiencing problems with StandAloneBlast (well it seems that this
> is the problem)
> and going thru the mailing list i couldn't find any solution.
>
>
> I use the current released of bioperl (1-2) , i am facing a problem :
> after 200 or so blasts, the script crash and give me this error message:
>
>       Error in tempfile() using /tmp/XXXXXXXXXX: Could not create temp
> file /tmp/IEm8LWzN5o: Too many open files at
> /usr/local/lib/perl5/site_perl/5.6.1/Bio/Root/IO.pm line 614
>         Carp::croak('Error in tempfile() using /tmp/XXXXXXXXXX: Could
> not create temp...') called at /usr/local/lib/perl5/5.6.1/File/Temp.pm
> line 1052
>         File::Temp::tempfile('UNLINK', 1, 'DIR', '/tmp') called at
> /usr/local/lib/perl5/site_perl/5.6.1/Bio/Root/IO.pm line 614
>         Bio::Root::IO::tempfile('Bio::Root::IO=HASH(0x89a0f94)') called
> at /usr/local/lib/perl5/site_perl/5.6.1/Bio/Tools/Run/StandAloneBlast.pm
> line 656
>
> Bio::Tools::Run::StandAloneBlast::_setinput('Bio::Tools::Run::StandAloneBlast=HASH(0x8904e80)',
> 'bl2seq', 'Bio::PrimarySeq=HASH(0x8a867e4)', 'Bio::Seq=HASH(0x8ab57a0)')
> called at
> /usr/local/lib/perl5/site_perl/5.6.1/Bio/Tools/Run/StandAloneBlast.pm
> line 523
>
> Bio::Tools::Run::StandAloneBlast::bl2seq('Bio::Tools::Run::StandAloneBlast=HASH(0x8904e80)',
> 'Bio::PrimarySeq=HASH(0x8a867e4)', 'Bio::Seq=HASH(0x8ab57a0)') called at
> PPiDB/Progyz/Perl/Get_Frame_v8.1.pl line 295
>         main::GuessFrame('Bio::Seq::SeqWithQuality=HASH(0x8b2ece8)',
> 'Bio::Seq=HASH(0x8ab57a0)', 21.6666666666667) called at
> PPiDB/Progyz/Perl/Get_Frame_v8.1.pl line 148
>
>
>
>  From browsing the mailing list, I went thru several threads relating a
> bug in StandAloneBlast where temp files from the blasting where not
> cleaned up ,
> this bug could be tackled by calling _io_cleanup() before each blast,
> but this is only reported for the former released of bioperl . This bug
> should have been fixed in the release 1.2
> I tried  to call the  _io_cleanup() method before each blast, but it
> didn't work
>
> here is a sample of my code :
>
> sub GuessFrame{
>   my $seqobj = shift;
>   my $tag_pepobj = shift;
>   my $hit_match_start = shift;
>   my @frame = (0,1,2);
>   my @pepobj;
>   my $score = 0;
>
>   ## Blast The 3 possible pep sequences againt the tag
>   my @pepobj;
>   my @bl2seq_Report;
>   my @AlignScore;
>   my $AlignStart;
>   my $AlignEnd;
>   ## BestScore set a threshold for the min score for the positionning of
> Gal4
>   my $BestScore = 10;
>   my $frame_wBestScore;
>
>   foreach my $frame (@frame){
>     $pepobj[$frame] = $seqobj->translate(undef,undef,$frame);
>     my $outfile = 'bl2seq'.$frame.'out';
>     my @bl2seq_Params = ( 'program'     => 'blastp',
>               '_READMETHOD' => 'Blast',
>               'oufile'      => $outfile);
>     my $bl2seq_Factory =
> Bio::Tools::Run::StandAloneBlast->new(@bl2seq_Params);
>     $bl2seq_Factory->io->_io_cleanup();
>     $bl2seq_Report[$frame] = $bl2seq_Factory->bl2seq( $pepobj[$frame],
> $tag_pepobj);
>     if (defined $bl2seq_Report[$frame]->{'_current_sbjct'}) {
>       while (my $hsp = $bl2seq_Report[$frame]->next_feature){
>     $AlignScore[$frame] = $hsp->score;
>     #print $AlignScore[$frame],"\n";
>     if  ( ($AlignScore[$frame] > $BestScore) and ($hit_match_start >
> $hsp->query->end )) {
>       $BestScore = $AlignScore[$frame];
>       $frame_wBestScore = $frame;
>       $AlignStart = $hsp->query->start;
>       $AlignEnd= $hsp->query->end;
>       $score = $BestScore;  #print "score:",$score,"\n";
>     }
>   }
>  }
>   # etc...
> }
>
>
> Thanks
> nicolas.
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list