[Bioperl-l] issue with Bio::Tools::Run::Primer3Redux

kumar Saurabh kumarsaurabh20 at gmail.com
Thu Sep 15 11:20:47 UTC 2011


Hi,

I need to integrate the primer3 module in one of our pipeline. In a process,
I was testing the initial code given on the CPAN website. But whenever I try
to run this program its giving me error...that "Cannot locate the Object
method add_target via the package Bio::Tools:Run::Primer3Redux...."

The line of codes I am using is as follows:

# design some primers.
  # the output will be put into temp.out
  use Bio::Tools::Primer3Redux;
  use Bio::Tools::Run::Primer3Redux;
  use Bio::SeqIO;

  my $seqio = Bio::SeqIO->new(-file=>'sample.dna');
  my $seq = $seqio->next_seq;

  my $primer3 = Bio::Tools::Run::Primer3Redux->new(-outfile => "temp.out",
                                            -path =>
"/home/singh/Downloads/primer3-2.2.3/src/primer3_core");

  # or after the fact you can change the program_name
  $primer3->program_name('my_superfast_primer3');

  unless ($primer3->executable) {
    print STDERR "primer3 can not be found. Is it installed?\n";
    exit(-1)
  }

  # set the maximum and minimum Tm of the primer
  $primer3->add_targets('PRIMER_MIN_TM'=>56, 'PRIMER_MAX_TM'=>90);

  # Design the primers. This runs primer3 and returns a
  # Bio::Tools::Primer3::result object with the results
  # Primer3 can run in several modes (see explanation for
  # 'PRIMER_TASK' in the primer3 doccumentation). To run a task,
  # either call it by its PRIMER_TASK name as in these examples:
  $pcr_primer_results = $primer3->pick_pcr_primers($seq);
  $pcr_and_hyb_results = $primer3->pick_pcr_primers_and_hyb_probe( $seq );
  $check_results = $primer3->check_primers();

  # Alternatively, explicitly set the PRIMER_TASK parameter and
  # use the generic 'run' method (this is mainly here for backwards
  # compatibility) :
  $primer3->PRIMER_TASK( 'pick_left_only' );
  $result = $primer3->run( $seq );

  # If no task is set and the 'run' method is called, primer3 will default
to
  # pick pcr primers.

  # see the Bio::Tools::Primer3Redux POD for
  # things that you can get from this. For example:

  print "There were ", $results->num_primer_pairs, " primer pairs\n";


Can anyone help me with this???


Best regards,
Kumar



More information about the Bioperl-l mailing list