BioPerl-Run
view release on metacpan or search on metacpan
lib/Bio/Tools/Run/Primer3.pm view on Meta::CPAN
#
# This is the original copyright statement. I have relied on Chad's module
# extensively for this module.
#
# Copyright (c) 1997-2001 bioperl, Chad Matsalla. All Rights Reserved.
# This module is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# Copyright Chad Matsalla
#
# You may distribute this module under the same terms as perl itself
# POD documentation - main docs before the code
#
# But I have modified lots of it, so I guess I should add:
#
# Copyright (c) 2003 bioperl, Rob Edwards. All Rights Reserved.
# This module is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# Copyright Rob Edwards
#
# You may distribute this module under the same terms as perl itself
# POD documentation - main docs before the code
=head1 NAME
Bio::Tools::Run::Primer3 - Create input for and work with the output
from the program primer3
=head1 SYNOPSIS
Bio::Tools::Primer3 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
http://frodo.wi.mit.edu/primer3/primer3_code.html for
details and to download the software. This module only works for
primer3 release 1 but is not guaranteed to work with earlier versions.
# design some primers.
# the output will be put into temp.out
use Bio::Tools::Run::Primer3;
use Bio::SeqIO;
my $seqio = Bio::SeqIO->new(-file=>'data/dna1.fa');
my $seq = $seqio->next_seq;
my $primer3 = Bio::Tools::Run::Primer3->new(-seq => $seq,
-outfile => "temp.out",
-path => "/usr/bin/primer3_core");
# or after the fact you can change the program_name
$primer3->program_name('my_suprefast_primer3');
unless ($primer3->executable) {
print STDERR "primer3 can not be found. Is it installed?\n";
exit(-1)
}
# what are the arguments, and what do they mean?
my $args = $primer3->arguments;
print "ARGUMENT\tMEANING\n";
foreach my $key (keys %{$args}) {print "$key\t", $$args{$key}, "\n"}
# 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::Run::Primer3 object with the results
$results = $primer3->run;
# see the Bio::Tools::Run::Primer3 pod for
# things that you can get from this. For example:
( run in 2.467 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )