changes all issue tracking in preparation for switch to github issues
[bioperl-live.git] / Bio / Restriction / Enzyme / MultiSite.pm
blob441c3cd48b096470512fabaa7c2ac83c7a015547
1 #------------------------------------------------------------------
3 # BioPerl module Bio::Restriction::Enzyme::MultiSite
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Heikki Lehvaslaiho, heikki-at-bioperl-dot-org
9 # You may distribute this module under the same terms as perl itself
10 #------------------------------------------------------------------
12 ## POD Documentation:
14 =head1 NAME
16 Bio::Restriction::Enzyme::MultiSite - A single restriction endonuclease
18 =head1 SYNOPSIS
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
24 use Bio::Restriction::Enzyme;
27 =head1 DESCRIPTION
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
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<others|others> which stores references to other objects
37 with alternative sites.
39 In this schema each object within an EnzymeCollection can be checked
40 for matching a sequence.
42 =head1 FEEDBACK
44 =head2 Mailing Lists
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.
50 bioperl-l@bioperl.org - General discussion
51 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
53 =head2 Support
55 Please direct usage questions or support issues to the mailing list:
57 I<bioperl-l@bioperl.org>
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.
64 =head2 Reporting Bugs
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:
70 https://github.com/bioperl/bioperl-live/issues
72 =head1 AUTHOR
74 Heikki Lehvaslaiho, heikki-at-bioperl-dot-org
76 =head1 CONTRIBUTORS
78 Rob Edwards, redwards@utmem.edu
80 =head1 COPYRIGHT
82 Copyright (c) 2003 Rob Edwards.
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.
88 =head1 SEE ALSO
90 L<Bio::Restriction::Enzyme>, L<Bio::Restriction::Analysis>,
91 L<Bio::Restriction::EnzymeCollection>
93 =head1 APPENDIX
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.
100 =cut
102 package Bio::Restriction::Enzyme::MultiSite;
103 use strict;
105 use Data::Dumper;
107 use vars qw ();
108 use base qw(Bio::Restriction::Enzyme);
110 =head2 new
112 Title : new
113 Function
114 Function : Initializes the enzyme object
115 Returns : The Restriction::Enzyme::MultiSite object
116 Argument :
118 =cut
120 sub new {
121 my($class, @args) = @_;
122 my $self = $class->SUPER::new(@args);
124 my ($others) =
125 $self->_rearrange([qw(
126 OTHERS
127 )], @args);
129 $others && $self->others($others);
130 return $self;
133 =head2 others
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.
143 =cut
145 sub others {
146 my $self = shift;
147 push @{$self->{_others}}, @_ if @_;
148 return unless $self->{_others};
149 return @{$self->{'_others'}};
153 =head2 purge_others
155 Title : purge_others
156 Usage : $re->purge_references();
157 Function : Purges the set of references for this enzyme
158 Arguments :
159 Returns :
161 =cut
163 sub purge_others {
164 my ($self) = shift;
165 $self->{_others} = [];