/usr/share/perl5/Bio/PrimerDesigner/Result.pm is in libbio-primerdesigner-perl 0.07-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | package Bio::PrimerDesigner::Result;
# $Id: Result.pm 14 2008-11-07 02:40:49Z kyclark $
=head1 NAME
Bio::PrimerDesigner::Result - a class for handling primer
design or validation results
=head1 SYNOPSIS
use Bio::PrimerDesigner;
#
# primer3
#
my $primer3_obj = Bio::PrimerDesigner->new( program => 'primer3 );
my $result = $primer3_obj->design( %hash_of_options );
my $left_primer = $result->left;
my @left_primers = $result->left(1..$num_primers);
#
# e-PCR -- first make a hash of options from primer3 results
# then run e-PCR
#
my $epcr_obj = Bio::PrimerDesigner->new( program => 'primer3 );
my $epcr_result = $epcr_obj->design( %hash_of_options );
my $num_products = $epcr_result->products;
#
# one product
#
my $first_prod_size = $epcr_result->size;
my $first_prod_start = $epcr_result->start;
my $first_prod_stop = $epcr_result->start;
#
# more than one product
#
my @pcr_product_sizes = ();
for (1..$num_products) {
push @pcr_product_sizes, $epcr_result->size;
}
=head1 DESCRIPTION
Bio::PrimerDesigner::Result will autogenerate result access methods
for for Native Boulder IO keys and Bio::PrimerDesigner keys for
primer3, e-PCR, isPcr and ipcress.
=head1 METHODS
=cut
use strict;
use warnings;
use Readonly;
Readonly our
$VERSION => sprintf "%s", q$Revision: 24 $ =~ /(\d+)/;
use base 'Class::Base';
Readonly my @AUTO_FIELDS => qw(
***PRIMER3_KEYS***
PRIMER_LEFT_EXPLAIN PRIMER_RIGHT_EXPLAIN PRIMER_PAIR_EXPLAIN
PRIMER_INTERNAL_OLIGO_EXPLAIN left_explain right_explain
hyb_oligo_explain hyb_oligo lselfend PRIMER_LEFT rendstab
PRIMER_LEFT_SEQUENCE prod SEQUENCE TARGET PRIMER_RIGHT_END_STABILITY
right lselfany PRIMER_RIGHT_GC_PERCENT left PRIMER_PRODUCT_SIZE_RANGE
PRIMER_PAIR_COMPL_END raw_output lendstab PRIMER_INTERNAL_OLIGO_TM
hyb_tm PRIMER_RIGHT_SEQUENCE PRIMER_PRODUCT_SIZE PRIMER_PAIR_COMPL_ANY
leftgc PRIMER_LEFT_SELF_END rightgc rqual qual PRIMER_PAIR_PENALTY
PRIMER_LEFT_SELF_ANY PRIMER_SEQUENCE_ID PRIMER_LEFT_TM PRIMER_RIGHT_TM
tmright PRIMER_RIGHT startright tmleft pairendcomp PRIMER_RIGHT_SELF_END
PRIMER_LEFT_GC_PERCENT rselfend PRIMER_LEFT_PENALTY PRIMER_RIGHT_PENALTY
EXCLUDED_REGION PRIMER_LEFT_END_STABILITY PRIMER_NUM_RETURN
PRIMER_RIGHT_SELF_ANY rselfany pairanycomp lqual startleft
***other keys***
products size start stop end amplicon strand
);
# -------------------------------------------------------------------
sub init {
my ( $self, $config ) = @_;
$self->params( $config, 'data' );
for my $sub_name ( @AUTO_FIELDS ) {
next if $sub_name =~ /^\*/;
no strict 'refs';
*{ $sub_name } = sub {
my $self = shift;
my @nums = @_;
$nums[0] ||= 1;
my @result = map { $self->{$_}->{$sub_name} } @nums;
return @result > 1 ? @result : $result[0];
}
}
return $self;
}
# -------------------------------------------------------------------
sub keys {
=pod
=head2 keys
This handles result method calls made via the
Bio::PrimerDesigner::Result object. Returns either a scalar or list
depending on the on the arguments:
------------------+------------------------
Args passed | Returns
------------------+------------------------
none scalar value for set 1
numeric n scalar value for set n
numeric list 1..n list with n elements
The aliased output methods (below) return a string when called in a
scalar context and a list when called in a list context. The native
primer3 (Boulder IO) keys can also be used. There are also e-PCR,
isPcr and ipcress specific methods
B<Primer3 keys>
=over 4
=item * left -- left primer sequence
=item * right -- right primer sequence
=item * hyb_oligo -- internal oligo sequence
=item * startleft -- left primer 5' sequence coordinate
=item * startright -- right primer 5' sequence coordinate
=item * tmleft -- left primer tm
=item * tmright -- right primer tm
=item * qual -- primer pair penalty (Q value)
=item * lqual -- left primer penalty
=item * rqual -- right primer penalty
=item * leftgc -- left primer % gc
=item * rightgc -- right primer % gc
=item * lselfany -- left primer self-complementarity (any)
=item * lselfend -- left primer self-complementarity (end)
=item * rselfany -- right primer self-complementarity (any)
=item * rselfend -- right primer self-complementarity (end)
=item * pairanycomp -- primer pair complementarity (any)
=item * pairendcomp -- primer pair complementarity (end)
=item * lendstab -- left primer end stability
=item * rendstab -- right primer end stability
=item * amplicon -- amplified PCR product
=back
B<Other keys>
=over 4
=item * products -- number of PCR products
=item * size -- product size
=item * start -- product start coordinate
=item * stop -- product stop coordinate
=item * end -- synonymous with stop
=item * strand -- strand of product relative to the ref. sequence (isPCR, ipcress)
=item * amplicon -- returns the PCR product (isPCR only)
=back
=cut
my $self = shift;
return $self->error('method not implemented');
}
1;
# -------------------------------------------------------------------
=pod
=head1 AUTHOR
Copyright (c) 2003-2009 Sheldon McKay E<lt>mckays@cshl.eduE<gt>,
Ken Youens-Clark E<lt>kclark@cpan.orgE<gt>.
=head1 LICENSE
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 3 or any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA.
=head1 SEE ALSO
Bio::PrimerDesigner.
=cut
|