File Coverage

Bio/Restriction/Enzyme/MultiSite.pm
Criterion Covered Total %
statement 23 25 92.0
branch 4 6 66.6
condition n/a
subroutine 6 7 85.7
pod 3 3 100.0
total 36 41 87.8


line stmt bran cond sub pod time code
1             #------------------------------------------------------------------
2             #
3             # BioPerl module Bio::Restriction::Enzyme::MultiSite
4             #
5             # Please direct questions and support issues to
6             #
7             # Cared for by Heikki Lehvaslaiho, heikki-at-bioperl-dot-org
8             #
9             # You may distribute this module under the same terms as perl itself
10             #------------------------------------------------------------------
11              
12             ## POD Documentation:
13              
14             =head1 NAME
15              
16             Bio::Restriction::Enzyme::MultiSite - A single restriction endonuclease
17              
18             =head1 SYNOPSIS
19              
20             # set up a single restriction enzyme. This contains lots of
21             # information about the enzyme that is generally parsed from a
22             # rebase file and can then be read back
23              
24             use Bio::Restriction::Enzyme;
25              
26              
27             =head1 DESCRIPTION
28              
29             This module is used for restriction enzymes that recogonize more than
30             one site. There are some enzymes that recognize sites that cannot be
31             represented by the ambiguous genetic code. For example, M.PhiBssHII
32             recognizes the sites: ACGCGT,CCGCGG,RGCGCY,RCCGGY, and GCGCGC
33              
34             Each site gets its own object that Bio::Restriction::Enzyme will
35             refer to. Each also correlates with the other sites using the
36             method L which stores references to other objects
37             with alternative sites.
38              
39             In this schema each object within an EnzymeCollection can be checked
40             for matching a sequence.
41              
42             =head1 FEEDBACK
43              
44             =head2 Mailing Lists
45              
46             User feedback is an integral part of the evolution of this and other
47             Bioperl modules. Send your comments and suggestions preferably to one
48             of the Bioperl mailing lists. Your participation is much appreciated.
49              
50             bioperl-l@bioperl.org - General discussion
51             http://bioperl.org/wiki/Mailing_lists - About the mailing lists
52              
53             =head2 Support
54              
55             Please direct usage questions or support issues to the mailing list:
56              
57             I
58              
59             rather than to the module maintainer directly. Many experienced and
60             reponsive experts will be able look at the problem and quickly
61             address it. Please include a thorough description of the problem
62             with code and data examples if at all possible.
63              
64             =head2 Reporting Bugs
65              
66             Report bugs to the Bioperl bug tracking system to help us keep track
67             the bugs and their resolution. Bug reports can be submitted via the
68             web:
69              
70             https://github.com/bioperl/bioperl-live/issues
71              
72             =head1 AUTHOR
73              
74             Heikki Lehvaslaiho, heikki-at-bioperl-dot-org
75              
76             =head1 CONTRIBUTORS
77              
78             Rob Edwards, redwards@utmem.edu
79              
80             =head1 COPYRIGHT
81              
82             Copyright (c) 2003 Rob Edwards.
83              
84             Some of this work is Copyright (c) 1997-2002 Steve A. Chervitz. All
85             Rights Reserved. This module is free software; you can redistribute
86             it and/or modify it under the same terms as Perl itself.
87              
88             =head1 SEE ALSO
89              
90             L, L,
91             L
92              
93             =head1 APPENDIX
94              
95             Methods beginning with a leading underscore are considered private and
96             are intended for internal use by this module. They are not considered
97             part of the public interface and are described here for documentation
98             purposes only.
99              
100             =cut
101              
102             package Bio::Restriction::Enzyme::MultiSite;
103 4     4   643 use strict;
  4         5  
  4         87  
104              
105 4     4   10 use Data::Dumper;
  4         6  
  4         134  
106              
107 4     4   13 use vars qw ();
  4         4  
  4         52  
108 4     4   11 use base qw(Bio::Restriction::Enzyme);
  4         4  
  4         719  
109              
110             =head2 new
111              
112             Title : new
113             Function
114             Function : Initializes the enzyme object
115             Returns : The Restriction::Enzyme::MultiSite object
116             Argument :
117              
118             =cut
119              
120             sub new {
121 28     28 1 59 my($class, @args) = @_;
122 28         69 my $self = $class->SUPER::new(@args);
123              
124 28         87 my ($others) =
125             $self->_rearrange([qw(
126             OTHERS
127             )], @args);
128              
129 28 50       65 $others && $self->others($others);
130 28         62 return $self;
131             }
132              
133             =head2 others
134              
135             Title : others
136             Usage : $re->others(@others);
137             Function : Gets/Sets the a list of other sites that this enzyme recoginizes
138             Arguments : An array containing the other Bio::Restriction::Enzyme::MultiSite
139             objects.
140             Returns : An array containing the other Bio::Restriction::Enzyme::MultiSite
141             objects.
142              
143             =cut
144              
145             sub others {
146 165     165 1 143 my $self = shift;
147 165 100       257 push @{$self->{_others}}, @_ if @_;
  54         89  
148 165 50       254 return unless $self->{_others};
149 165         102 return @{$self->{'_others'}};
  165         283  
150             }
151              
152              
153             =head2 purge_others
154              
155             Title : purge_others
156             Usage : $re->purge_references();
157             Function : Purges the set of references for this enzyme
158             Arguments :
159             Returns :
160              
161             =cut
162              
163             sub purge_others {
164 0     0 1   my ($self) = shift;
165 0           $self->{_others} = [];
166              
167             }
168              
169              
170             1;
171