[Bioperl-l] A possible fix for Bio::Tools::Run::Primer3::run().

George Hartzell hartzell at kestrel.alerce.com
Sun Jun 12 21:23:00 EDT 2005


George Hartzell writes:
 > 
 > Me again,
 > 
 > Can someone review this patch?
 > [...]

Sorry to respond to my own post.

Here's a better patch, knocks the original fix down to two lines and
adds another fix so that the result object doesn't have an empty
element in it (caused by processing the boulder io record terminator).

Still, comments welcome.

g.


*** Bio/Tools/Run/Primer3.pm.orig	Tue Mar  1 18:26:31 2005
--- Bio/Tools/Run/Primer3.pm	Sun Jun 12 18:17:55 2005
***************
*** 437,442 ****
--- 437,443 ----
  			print OUT $_;
  		}
  		chomp;
+ 		next if ($_ eq "="); # skip over the boulderio record terminator.
  		my ($return, $value) = split('=',$_);
  		$self->{'results'}->{$return} = $value;
  	}
***************
*** 452,457 ****
--- 453,462 ----
  	$self->{results_obj} = new Bio::Tools::Primer3;
  	$self->{results_obj}->_set_variable('results', $self->{results});
  	$self->{results_obj}->_set_variable('seqobject', $self->{seqobject});
+ 	# Bio::Tools::Primer3::_separate needs a hash of the primer3 arguments,
+ 	# with the arg as the key and the value as the value (surprise!).
+ 	my %input_hash = map {split '='} @{$self->{'primer3_input'}};
+ 	$self->{results_obj}->_set_variable('input_options', \%input_hash);
  	$self->{results_separated}= $self->{results_obj}->_separate();
  	return $self->{results_obj};
  }


More information about the Bioperl-l mailing list