[Bioperl-l] Bio::Seq::PrimedSeq::new exception

Mike Muratet muratem at eng.uah.edu
Wed Apr 6 03:17:21 EDT 2005


I am using Bio::Tools::Run::Primer3 inside a script to design primers. It
will run primer3 just fine, but trying to get the results inside the
script yields:

------------- EXCEPTION  -------------
MSG: The target_sequence must be a Bio::Seq to create this object.
STACK Bio::Seq::PrimedSeq::new
STACK Bio::Tools::Primer3::next_primer
STACK toplevel ./processBlast.pl:318

I am using the method thus:

my $genomic_seqobj = Bio::PrimarySeq->new ( -seq =>$genomic_seq,
                                      -id =>$orf_accession,
                                      -accession_number=> $orf_accession,
                                      -alphabet =>"dna",
                                      -is_circular => 0
my $primer3nested = Bio::Tools::Run::Primer3->new(-seq=>$genomic_seqobj,
-outfile=>$orf_accession.".nested.out", -path => "/usr/local/bin/");
$primer3nested->add_targets('PRIMER_NUM_RETURN' => 1);
my $results = $primer3nested->run;
my $primer = $results->next_primer();

I can use Bio::Tools::Primer3 to read the file back in and everything
works just fine. The offending line from Bio::Tools::Primer3 is:

232  if (! ref($self->{target_sequence}) ||
233      ! $self->{target_sequence}->isa('Bio::SeqI') ) {
234      $self->throw("The target_sequence must be a Bio::Seq to create
this object.");

It appears to me that the object is created in Bio::Tools::Run::Primer3 in
the run method as:

396  # convert the results to individual results
397  $self->{results_obj}=new Bio::Tools::Primer3;
398  $self->{results_obj}->_set_variable('results',$self->{results});
399  $self->{results_obj}->_set_variable('seqobject',$self->{seqobject});
400  $self->{results_separated}= $self->{results_obj}->_separate();
401  return $self->{results_obj};
So, it looks to me that if you pass the constructor a valid child of
Bio::SeqI (and PrimarySeq is, is it not?) Can anyone help me see what I'm



More information about the Bioperl-l mailing list