1 # BioPerl module for Bio::Tools::Primer::Pair
3 # Please direct questions and support issues to <bioperl-l@bioperl.org>
5 # Cared for by Ewan Birney <birney@ebi.ac.uk>
7 # Copyright Ewan Birney
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::Tools::Primer::Pair - two primers on left and right side
19 use Bio::Tools::Primer::Pair;
21 my $pair = Bio::Tools::Primer::Pair->new( -left => $leftp , -right => $rightp);
25 print "GC percentage different",$pf->gc_difference(),"\n";
26 print "product length is ",$pf->product_length,"\n";
32 Primer Pairs represents one primer in a primer pair. This object is mainly for
33 designing primers, and probably principly used in the primer design system
39 User feedback is an integral part of the evolution of this and other
40 Bioperl modules. Send your comments and suggestions preferably to
41 the Bioperl mailing list. Your participation is much appreciated.
43 bioperl-l@bioperl.org - General discussion
44 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
48 Please direct usage questions or support issues to the mailing list:
50 I<bioperl-l@bioperl.org>
52 rather than to the module maintainer directly. Many experienced and
53 reponsive experts will be able look at the problem and quickly
54 address it. Please include a thorough description of the problem
55 with code and data examples if at all possible.
59 Report bugs to the Bioperl bug tracking system to help us keep track
60 of the bugs and their resolution. Bug reports can be submitted via the
63 https://github.com/bioperl/bioperl-live/issues
65 =head1 AUTHOR - Ewan Birney
67 Email birney-at-ebi.ac.uk
71 The rest of the documentation details each of the object methods.
72 Internal methods are usually preceded with a _
77 # Let the code begin...
81 package Bio
::Tools
::Primer
::Pair
;
83 use base
qw(Bio::Root::Root);
86 my ( $caller, @args) = @_;
87 my ($self) = $caller->SUPER::new
(@args);
89 my ($left,$right) = $self->_rearrange([qw(LEFT RIGHT)],@args);
91 if( !defined $left || !defined $right ) {
92 $self->throw("Pair must be initialised with left and right primers");
106 if( defined $left ) {
107 if( !ref $left || !$left->isa("Bio::Tools::Primer::Feature") ) {
108 $self->throw("left primer must be a Bio::Tools::Primer::Feature, not $left");
110 $self->{'left'} = $left;
113 return $self->{'left'};
121 if( defined $right ) {
122 if( !ref $right || !$right->isa("Bio::Tools::Primer::Feature") ) {
123 $self->throw("right primer must be a Bio::Tools::Primer::Feature, not $right");
125 $self->{'right'} = $right;
128 return $self->{'right'};
134 return abs ( $self->left->gc_percent - $self->right->gc_percent );
140 return $self->right->end - $self->left->start +1;