# parse primer3 output to get some data
 # this is also called from Bio::Tools::Run::Primer3Redux
 use Bio::Tools::Primer3Redux;

 # read a primer3 output file
 my $p3 = Bio::Tools::Primer3Redux->new(-file=>"data/primer3_output.txt");

 # iterate through each result in the file
 while (my $result = $p3->next_result) {
    # iterate through each primer pair
    while (my $pair = $p3->next_primer_pair) {
        # do stuff with primer pairs...


Bio::Tools::Primer3Redux creates the input files needed to design primers using primer3 and provides mechanisms to access data in the primer3 output files.

This module provides a bioperl interface to the program primer3. See for details and to download the software.

This module is a reimplementation of the original Bio::Tools::Primer3 module by Rob Edwards, itself largely based on one written by Chad Matsalla ( Due to significant API changes between this and the previous Primer3 module, this has been redubbed Bio::Tools::Primer3Redux.


Bio::Tools::Primer3Redux - BioPerl-based tools for Primer3 (redone)


Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.                  - General discussion  - About the mailing lists


Please direct usage questions or support issues to the mailing list:

rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.

Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:


  Chris Fields


  Rob Edwards

  Brian Osborne bosborne at

  Based heavily on work of Chad Matsalla


The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _


  Title   : new()
  Usage   : my $primer3 = Bio::Tools::Primer3->new(-file=>$file)
            to read a primer3 output file.
  Function: Parse primer3 output
  Returns : Does not return anything. If called with a filename will
            allow you to retrieve the results
  Args    : -file (optional) file of primer3 results to parse -verbose
            (optional) set verbose output
  Notes   :
  Status  : stable


  Title    : next_result
  Usage    : $obj->next_result
  Function : Returns the next Bio::Tools::Primer3Redux::Result instance (if one)
  Returns  : Bio::Tools::Primer3Redux::Result || undef
  Args     : none
  Status   : stable


 Title    : start_document
 Usage    : $obj->start_document
 Function : initialize Primer3 output parsing
 Returns  : none
 Args     : none


 Title    : end_document
 Usage    : $obj->end_document
 Function : clean up after parsing of Primer3 document is complete
 Returns  : L<Bio::Tools::Primer3Redux::Result>
 Args     : none


cjfields <>


This software is copyright (c) 2011 by Chris Fields.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.