[Bioperl-l] Primer 3: MSG: Can't open RESULTS
Greg Wilson
gdw1 at cornell.edu
Thu May 12 11:11:35 EDT 2005
Ok, I think I figured this out. The following line (***) needs to be
added to Bio/Tools/Run/Primer3.pm:
356 # make a temporary file and print the instructions to it.
357 my ($temphandle, $tempfile)=$self->io->tempfile;
358 print $temphandle join "\n", @{$self->{'primer3_input'}}, "=\n";
359 open (RESULTS, "$executable < $tempfile|") || $self->throw("Can't
open RESULTS");
*** close $temphandle || $self->throw("Can't close TEMPFILE");
The temporary file never gets closed so the file descriptors just pile
up until the overall script ends. This will clean them up as soon as we
do not need them any more.
Not sure who needs to do the actual patching of the module in CVS though.
Greg
Gregory Drake Wilson wrote:
> I am resurrecting a question posted last June (archived here
> http://bioperl.org/pipermail/bioperl-l/2004-June/016255.html) regarding
> bioperl's usage of Primer3 because the issue continues to plague me. All
> of my implementations die reliably after a fixed number of attempts at
> generating primers with this error:
>
> ------------- EXCEPTION -------------
> MSG: Can't open RESULTS
> STACK Bio::Tools::Run::Primer3::run
> /usr/lib/perl5/vendor_perl/5.8.2/Bio/Tools/Run/Primer3.pm:360
> STACK toplevel ./primer_maker.pl:128
>
> --------------------------------------
>
> The offending line (360) is:
> open (RESULTS, "$executable < $tempfile|") || $self->throw("Can't open
> RESULTS");
>
> As the old thread suggests it is probably a numer of open files issue.
>
>
>>lsof -c pri +Lr
>
> returns an ever increasing amount of entries like:
> primer_ma 28830 gdw1 425u REG 3,6 1140 0 807353
> /tmp/twdZa7turz (deleted)
> primer_ba 28830 drakos7 426u REG 3,6 1170 0 807354
> /tmp/QDJv6Mb8iV (deleted)
>
> Does anyone know a way to make sure those file descriptors are cleaned up
> after each primer generation?
>
> Greg
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
More information about the Bioperl-l
mailing list