[Bioperl-l] Primer3 help

Paolo Pavan paolo.pavan at gmail.com
Fri Mar 6 17:00:08 UTC 2009


Hi all,
Is the first time I need to use Primer3 with bioperl and I was trying to
investigate the API. I found the snip of code below but it reports to me:
Can't locate Bio/Tools/Run/Primer3.pm in @INC (@INC contains:
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.7/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.7/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/5.8.8 .) at primers.3.pl line 8.
BEGIN failed--compilation aborted at primers.3.pl line 8.

In fact the file:
/usr/lib/perl5/site_perl/5.8.8/Bio/Tools/Run/Primer3.pm
does not exist in my system.

My bioperl's instalation dir is /usr/lib/perl5/site_perl/5.8.8/Bio that is
in the path and the bioperl distribution is 1.6.
Do I haven't understood how to use Primer3 or is a distribution problem?

Thank you in advance,
Paolo



# The easiest way to use this is probably either, (i), get the
# output from Bio::Tools::Run::Primer3, Bio::Tools::Primer3, or
# Bio::Tools::PCRSimulation:

# For example, start with a fasta file
use Bio::SeqIO;
use Bio::Tools::Run::Primer3;

my $file = shift || die "need a file to read";
my $seqin = Bio::SeqIO->new(-file => $file);
my $seq = $seqin->next_seq;

# use primer3 to design some primers
my $primer3run = Bio::Tools::Run::Primer3->new(-seq => $seq);
$primer3run -> run; # run it with the default parameters

# create a file to write the results to
my $seqout = Bio::SeqIO->new(-file => ">primed_sequence.gbk",
   -format => 'genbank');

# now just get all the results and write them out.
while (my $results = $primer3run->next_primer) {
 $seqout->write_seq($results->annotated_seq);
}



More information about the Bioperl-l mailing list