[Bioperl-l] problem with Primer3: too many files open
Andy Nunberg
andyn108 at gmail.com
Thu Jan 19 18:28:36 UTC 2006
Hi, I am using bioperl-1.4 running Primer3 to select a bunch of primers.
While running the script, I get an exception at the same point with
the following error:
------------- EXCEPTION -------------
MSG: Can't open RESULTS:Too many open files
STACK Bio::Tools::Run::Primer3::run
/compbio/pkg/bio-perl/bioperl-run/Bio/Tools/Run/Primer3.pm:361
STACK (eval) find_primers_first_pass.pl:183
STACK main::_primer3 find_primers_first_pass.pl:182
STACK main::get_primer find_primers_first_pass.pl:141
STACK toplevel find_primers_first_pass.pl:86
--------------------------------------
Now if I take this sequence out of the list and run the script, it
runs just fine.
here is the subroutine calling primer3:
sub _primer3{
my($seq,$qual_region)=@_;
my $primer3=Bio::Tools::Run::Primer3->new(-seq=>$seq,-verbose=>0,-flush=>1);
my @qual = @{$seq->qual};
#set the start of the search window for primer3
my $primer3_start=1;
if($seq->length > ($window+100)){
$primer3_start=$qual_region->end-($window+100);
}
#set up primer3
$primer3->add_targets('INCLUDED_REGION'=>"$primer3_start,$window");
$primer3->add_targets('PRIMER_FIRST_BASE_INDEX'=>1,
'PRIMER_TASK'=>'pick_left_only');
$primer3->add_targets('PRIMER_SEQUENCE_QUALITY'=>"@qual");
$primer3->add_targets('PRIMER_MIN_QUALITY'=>$minqual,
'PRIMER_NUM_RETURN'=>1,
'PRIMER_MAX_POLY_X'=>3);
$primer3->add_targets('PRIMER_GC_CLAMP'=>1) unless($no_gc_clamp);
#run primer3
my $prim3_results;
eval {
$prim3_results=$primer3->run;
};
die $seq->id." :$@" if ($@);
#fetch result for the first primer
my $hash_ref=$prim3_results->primer_results(0);
return $hash_ref;
}
any suggestions? any thoughts on why I am getting the error to begin with?
thanks
More information about the Bioperl-l
mailing list