[Bioperl-l] use primer3 to design primers with multiple sequences

chen li chen_li3 at yahoo.com
Mon May 8 20:21:42 EDT 2006

Dear all,

The following is the script I use to design primers
for one sequence:


use warnings;
use strict;

use Bio::Tools::Run::Primer3;
use Bio::SeqIO;

my $file_in='piwil2.fa';
my $file_out='temp.out';
my $seqio=Bio::SeqIO->new(-file=>$file_in)
my $seq=$seqio->next_seq;      
my $primer3=Bio::Tools::Run::Primer3->new(
- path=>"c:/Perl/local/primer3_1.0.0/src/primer3.exe" 
  unless ($primer3->executable){                	print
"primer3 can not be found. 
             Is it installed?\n"; 

# set your own parameters for the primers or product
'PRIMER_OPT_GC_PERCENT'=>' 50   ',		
'PRIMER_OPT_SIZE'=>  '24    ',		
'PRIMER_OPT_TM'=>  ' 60   ');
  my $result=$primer3->run;    


I try to modify it for multiple sequences by using a
while loop as following:

while ($seq=$seqio->next_seq){

my $primer3=Bio::Tools::Run::Primer3->new()
# design the primer}

I get primers only for the last sequence. It seems the
earlier ones are overwritten.

Any idea will be highly aprreciated.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Bioperl-l mailing list