[Bioperl-l] exonerate

alan alan at tll.org.sg
Mon Oct 8 05:02:45 UTC 2007


Hi Chris,

On 02 Oct 2007, at 11:03 PM, Chris Fields wrote:

> One option is to try running $run->cleanup() after you finish  
> parsing, which gets rid of the tempfiles on each run.
>

I tried this option in the past but it did not change anything.

I found a temporary solution: I am using tcsh and the ulimit for open  
files (descriptors) was set to 256. I changed this limit to 2000 and  
I got my code to run to completion. This imply that I am  
circumventing the real problem of open files. I will continue to look  
at the file closing step in bioperl but the ulimit or limit option  
allows me to get a quick work around for now.

for bash shell (ulimit -n [number])

for tcsh shell (limit descriptors [number])

alan




> chris
>
> On Sep 30, 2007, at 8:53 PM, alan wrote:
>
>> Hi,
>>
>>
>>>> I am calling exonerate.pm within my script while attempting to
>>>> align cDNA  to multiple genomic fragments. After processing about
>>>> 120+ genomic fragments my code crashes with the following error:
>>>>
>>>> ** ERROR **: Could not open [/tmp/tlInatbOED] : Too many open files
>>>> aborting...
>>>> MSG: Exonerate call (/usr/local/bin/exonerate   /tmp/8X9jQuHUGF /
>>>> tmp/tlInatbOED  > /tmp/EolF5qCNLZ/cIf0HfIRf5) crashed: 34304
>>>> STACK Bio::Tools::Run::Alignment::Exonerate::_run /nfs1/alan/
>>>> cvs_src/bioperl-run/Bio/Tools/Run/Alignment/Exonerate.pm:214
>>>> STACK Bio::Tools::Run::Alignment::Exonerate::run /nfs1/alan/
>>>> cvs_src/bioperl-run/Bio/Tools/Run/Alignment/Exonerate.pm:174
>>>>
>>>> The code in Exonerate.pm closes the tmpfile at the end of the
>>>> routine yet I get the error message about "too many open files".
>>>> Any suggestions on how I should be closing these files?
>>>>
>>>>
>>>> Extract from my code that runs exonerate is listed below.
>>>>
>>>> foreach my $f(@files) {
>>>>   next unless (-f  "$dir/$f");
>>>>   my $q_in = Bio::SeqIO->new(-file=>$query, -format=>"Fasta");
>>>>   my $query_obj = $q_in->next_seq();
>>>>   my $target_in = Bio::SeqIO->new(-file=>"$dir/$f", -
>>>> format=>"Fasta");
>>>>   my $target_obj = $target_in->next_seq();
>>>>   my $run = Bio::Tools::Run::Alignment::Exonerate->new();
>>>>   my $exonerate_io = $run->run($query_obj, $target_obj);
>>>>
>>>>   [code for parsing the data.......]
>>>>
>>>>   $exonerate_io->close; #tried this line out of desperation but it
>>>> did not help :-)
>>>> }
>>>>
>>>> thanks
>>>> alan
>
>




More information about the Bioperl-l mailing list